Skip to content

Commit

Permalink
nsfw configuration system updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetmertguduz committed Jun 1, 2024
1 parent fdbe4be commit b5f0428
Show file tree
Hide file tree
Showing 73 changed files with 714 additions and 722 deletions.
85 changes: 42 additions & 43 deletions docs/html/d0/de2/yiffy__messages_8h.html

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions docs/html/d1/d14/fetch_8c_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span> <span class="keywordtype">char</span> config_path[<a class="code hl_define" href="../../d1/d14/fetch_8c.html#a263efd24d550124313df51247f07457a">MAX_FILE_PATH</a>];</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> <span class="keywordtype">char</span> <a class="code hl_variable" href="../../d5/d56/cjson_8h.html#aff2566f4c366b48d73479bef43ee4d2e">buffer</a>[<a class="code hl_define" href="../../d1/d14/fetch_8c.html#ad4d796b98c583d49e83adabd74a63bf6">MAX_BUFFER_SIZE</a>];</div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="../../dc/dec/search_8c.html#a8e8f6f474ecc73b9d4c438b5cc2e690f">is_nsfw</a> = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span> <span class="keywordtype">bool</span> is_nsfw = <span class="keyword">false</span>;</div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span> </div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span> <span class="keywordtype">char</span> *home = getenv(<span class="stringliteral">&quot;HOME&quot;</span>);</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
Expand Down Expand Up @@ -158,15 +158,15 @@
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"> 66</span> {</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"> 67</span> <span class="keywordflow">if</span> (strcmp(token, <span class="stringliteral">&quot;nsfw&quot;</span>) == 0) </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"> 68</span> {</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> <a class="code hl_variable" href="../../dc/dec/search_8c.html#a8e8f6f474ecc73b9d4c438b5cc2e690f">is_nsfw</a> = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"> 69</span> is_nsfw = <span class="keyword">true</span>;</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> <span class="keywordflow">break</span>;</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"> 71</span> }</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"> 72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"> 73</span> token = strtok(NULL, <span class="stringliteral">&quot;:&quot;</span>);</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"> 74</span> }</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"> 76</span> <span class="comment">/* Download the JSON response. */</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <a class="code hl_function" href="../../d6/d60/aria2__download_8c.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a>(tags, page, <a class="code hl_variable" href="../../dc/dec/search_8c.html#a8e8f6f474ecc73b9d4c438b5cc2e690f">is_nsfw</a>, 20);</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"> 77</span> <a class="code hl_function" href="../../d6/d60/aria2__download_8c.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a>(tags, page, is_nsfw, 20);</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"> 78</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"> 79</span> <span class="comment">/* Check if the JSON response downloaded. */</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"> 80</span> FILE *response_json = fopen(<span class="stringliteral">&quot;posts.json&quot;</span>, <span class="stringliteral">&quot;r&quot;</span>);</div>
Expand Down Expand Up @@ -300,7 +300,6 @@
<div class="ttc" id="ano__home__error__msg_8c_html_ab360dcc8796de6e212175d6c4c77477d"><div class="ttname"><a href="../../d5/de7/no__home__error__msg_8c.html#ab360dcc8796de6e212175d6c4c77477d">no_home_error_msg</a></div><div class="ttdeci">void no_home_error_msg()</div><div class="ttdoc">Outputs the home not found error when application can not access the $HOME environment variable.</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/de7/no__home__error__msg_8c_source.html#l00016">no_home_error_msg.c:16</a></div></div>
<div class="ttc" id="ano__json__error__msg_8c_html_a6f957ecdc0150fa34ac6fd1ab5e6e253"><div class="ttname"><a href="../../d0/d31/no__json__error__msg_8c.html#a6f957ecdc0150fa34ac6fd1ab5e6e253">no_json_error_msg</a></div><div class="ttdeci">void no_json_error_msg()</div><div class="ttdoc">Outputs the error when there is no JSON file.</div><div class="ttdef"><b>Definition:</b> <a href="../../d0/d31/no__json__error__msg_8c_source.html#l00016">no_json_error_msg.c:16</a></div></div>
<div class="ttc" id="ano__results__error__msg_8c_html_a2d26f407e1cd042bfff35c4fdb673550"><div class="ttname"><a href="../../d6/dee/no__results__error__msg_8c.html#a2d26f407e1cd042bfff35c4fdb673550">no_results_error_msg</a></div><div class="ttdeci">void no_results_error_msg()</div><div class="ttdoc">Outputs the error when there is no response from the API.</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/dee/no__results__error__msg_8c_source.html#l00016">no_results_error_msg.c:16</a></div></div>
<div class="ttc" id="asearch_8c_html_a8e8f6f474ecc73b9d4c438b5cc2e690f"><div class="ttname"><a href="../../dc/dec/search_8c.html#a8e8f6f474ecc73b9d4c438b5cc2e690f">is_nsfw</a></div><div class="ttdeci">bool is_nsfw</div><div class="ttdoc">Indicates whether the NSFW option is enabled.</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/dec/search_8c_source.html#l00034">search.c:34</a></div></div>
<div class="ttc" id="astructcJSON_html"><div class="ttname"><a href="../../db/d68/structcJSON.html">cJSON</a></div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d56/cjson_8h_source.html#l00110">cjson.h:111</a></div></div>
<div class="ttc" id="astructcJSON_html_ad43f8de2571e504c4c5ce0a36990e6e1"><div class="ttname"><a href="../../db/d68/structcJSON.html#ad43f8de2571e504c4c5ce0a36990e6e1">cJSON::valuestring</a></div><div class="ttdeci">char * valuestring</div><div class="ttdef"><b>Definition:</b> <a href="../../d5/d56/cjson_8h_source.html#l00122">cjson.h:122</a></div></div>
<div class="ttc" id="ayiffy__fetch_8h_html"><div class="ttname"><a href="../../d5/d05/yiffy__fetch_8h.html">yiffy_fetch.h</a></div></div>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/d1/d33/yiffy__conf_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ <h2 class="memtitle"><span class="permalink"><a href="#a3a088a9fbd8616175ff107d4
</dd>
</dl>

<p class="definition">Definition at line <a class="el" href="../../de/dfc/conf__nsfw_8c_source.html#l00020">20</a> of file <a class="el" href="../../de/dfc/conf__nsfw_8c_source.html">conf_nsfw.c</a>.</p>
<p class="definition">Definition at line <a class="el" href="../../de/dfc/conf__nsfw_8c_source.html#l00029">29</a> of file <a class="el" href="../../de/dfc/conf__nsfw_8c_source.html">conf_nsfw.c</a>.</p>

</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/d1/d33/yiffy__conf_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d1/d33/yiffy__conf_8h.html#a3ebba735c22a2c7fed2d6deeca8f1529">conf_img_viewer_command</a>(<span class="keywordtype">char</span> *argv);</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="preprocessor">#endif </span><span class="comment">/* YIFFY_CONF_H */</span><span class="preprocessor"></span></div>
<div class="ttc" id="ayiffy__conf_8h_html_a3a088a9fbd8616175ff107d483ac33f6"><div class="ttname"><a href="../../d1/d33/yiffy__conf_8h.html#a3a088a9fbd8616175ff107d483ac33f6">conf_nsfw</a></div><div class="ttdeci">void conf_nsfw(char *argv)</div><div class="ttdoc">Configures the nsfw NSFW option.</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dfc/conf__nsfw_8c_source.html#l00020">conf_nsfw.c:20</a></div></div>
<div class="ttc" id="ayiffy__conf_8h_html_a3a088a9fbd8616175ff107d483ac33f6"><div class="ttname"><a href="../../d1/d33/yiffy__conf_8h.html#a3a088a9fbd8616175ff107d483ac33f6">conf_nsfw</a></div><div class="ttdeci">void conf_nsfw(char *argv)</div><div class="ttdoc">Configures the nsfw NSFW option.</div><div class="ttdef"><b>Definition:</b> <a href="../../de/dfc/conf__nsfw_8c_source.html#l00029">conf_nsfw.c:29</a></div></div>
<div class="ttc" id="ayiffy__conf_8h_html_a3ebba735c22a2c7fed2d6deeca8f1529"><div class="ttname"><a href="../../d1/d33/yiffy__conf_8h.html#a3ebba735c22a2c7fed2d6deeca8f1529">conf_img_viewer_command</a></div><div class="ttdeci">void conf_img_viewer_command(char *argv)</div><div class="ttdoc">Configures the image viewer command system, the image viewer command is used to show images on termin...</div><div class="ttdef"><b>Definition:</b> <a href="../../da/d93/conf__img__viewer__command_8c_source.html#l00023">conf_img_viewer_command.c:23</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
Expand Down
2 changes: 1 addition & 1 deletion docs/html/d3/d45/create__posts__window_8c.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ad1975f63b7ab6049822e7b85a4bd40ee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d45/create__posts__window_8c.html#ad1975f63b7ab6049822e7b85a4bd40ee">create_posts_window</a> (WINDOW **window, int *<a class="el" href="../../dc/dec/search_8c.html#ac5008b3b6a0e2594df27b44d93bc351d">posts_panel_height</a>)</td></tr>
<tr class="memitem:ad1975f63b7ab6049822e7b85a4bd40ee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d3/d45/create__posts__window_8c.html#ad1975f63b7ab6049822e7b85a4bd40ee">create_posts_window</a> (WINDOW **window, int *posts_panel_height)</td></tr>
<tr class="memdesc:ad1975f63b7ab6049822e7b85a4bd40ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new window to display posts and adds it to the specified position. <a href="../../d3/d45/create__posts__window_8c.html#ad1975f63b7ab6049822e7b85a4bd40ee">More...</a><br /></td></tr>
<tr class="separator:ad1975f63b7ab6049822e7b85a4bd40ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
Expand Down
7 changes: 3 additions & 4 deletions docs/html/d3/d45/create__posts__window_8c_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@
<a href="../../d3/d45/create__posts__window_8c.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#include &quot;<a class="code" href="../../de/d29/yiffy__search_8h.html">yiffy_search.h</a>&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="../../d3/d45/create__posts__window_8c.html#ad1975f63b7ab6049822e7b85a4bd40ee"> 16</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d3/d45/create__posts__window_8c.html#ad1975f63b7ab6049822e7b85a4bd40ee">create_posts_window</a>(WINDOW **window, <span class="keywordtype">int</span> *<a class="code hl_variable" href="../../dc/dec/search_8c.html#ac5008b3b6a0e2594df27b44d93bc351d">posts_panel_height</a>) </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="../../d3/d45/create__posts__window_8c.html#ad1975f63b7ab6049822e7b85a4bd40ee"> 16</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d3/d45/create__posts__window_8c.html#ad1975f63b7ab6049822e7b85a4bd40ee">create_posts_window</a>(WINDOW **window, <span class="keywordtype">int</span> *posts_panel_height) </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>{</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> <span class="comment">/* Create the posts window until information, taking 12 lines from it because the info and controls window line is 12. */</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> *<a class="code hl_variable" href="../../dc/dec/search_8c.html#ac5008b3b6a0e2594df27b44d93bc351d">posts_panel_height</a> = LINES - 12;</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> *posts_panel_height = LINES - 12;</div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> </div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> *window = newwin(*<a class="code hl_variable" href="../../dc/dec/search_8c.html#ac5008b3b6a0e2594df27b44d93bc351d">posts_panel_height</a>, COLS, 3, 0);</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> *window = newwin(*posts_panel_height, COLS, 3, 0);</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> box(*window, 0, 0);</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> </div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span> <a class="code hl_function" href="../../dc/d2b/set__window__title_8c.html#a99e678a5bf2aa342184677f946dc1439">set_window_title</a>(*window, <span class="stringliteral">&quot;POSTS&quot;</span>);</div>
Expand All @@ -127,7 +127,6 @@
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span> wrefresh(*window);</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span>}</div>
<div class="ttc" id="acreate__posts__window_8c_html_ad1975f63b7ab6049822e7b85a4bd40ee"><div class="ttname"><a href="../../d3/d45/create__posts__window_8c.html#ad1975f63b7ab6049822e7b85a4bd40ee">create_posts_window</a></div><div class="ttdeci">void create_posts_window(WINDOW **window, int *posts_panel_height)</div><div class="ttdoc">Creates a new window to display posts and adds it to the specified position.</div><div class="ttdef"><b>Definition:</b> <a href="../../d3/d45/create__posts__window_8c_source.html#l00016">create_posts_window.c:16</a></div></div>
<div class="ttc" id="asearch_8c_html_ac5008b3b6a0e2594df27b44d93bc351d"><div class="ttname"><a href="../../dc/dec/search_8c.html#ac5008b3b6a0e2594df27b44d93bc351d">posts_panel_height</a></div><div class="ttdeci">int posts_panel_height</div><div class="ttdoc">Height of the posts panel in the user interface.</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/dec/search_8c_source.html#l00037">search.c:37</a></div></div>
<div class="ttc" id="aset__window__title_8c_html_a99e678a5bf2aa342184677f946dc1439"><div class="ttname"><a href="../../dc/d2b/set__window__title_8c.html#a99e678a5bf2aa342184677f946dc1439">set_window_title</a></div><div class="ttdeci">void set_window_title(WINDOW *window, const char *title)</div><div class="ttdoc">Writes a title to the top-left corner of the specified window.</div><div class="ttdef"><b>Definition:</b> <a href="../../dc/d2b/set__window__title_8c_source.html#l00016">set_window_title.c:16</a></div></div>
<div class="ttc" id="ayiffy__search_8h_html"><div class="ttname"><a href="../../de/d29/yiffy__search_8h.html">yiffy_search.h</a></div><div class="ttdoc">This header file is used to handle the fetching and searching system.</div></div>
</div><!-- fragment --></div><!-- contents -->
Expand Down
6 changes: 3 additions & 3 deletions docs/html/d4/d65/show__github_8c_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span> </div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"><a class="line" href="../../d4/d65/show__github_8c.html#ae31a1275940d22cd5cb90427c1ac92c6"> 16</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d4/d65/show__github_8c.html#ae31a1275940d22cd5cb90427c1ac92c6">show_github</a>()</div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span>{</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> fprintf(stdout, <span class="stringliteral">&quot;&lt;https://github.com/MertGunduz/yiffy&gt;\n\n&quot;</span>);</div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span> fprintf(stdout, <span class="stringliteral">&quot;https://github.com/MertGunduz/yiffy\n\n&quot;</span>);</div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span> fprintf(stdout, <span class="stringliteral">&quot;contribution and issue creating links\n&quot;</span>);</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span> fprintf(stdout, <span class="stringliteral">&quot;-------------------------------------\n&quot;</span>);</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> fprintf(stdout, <span class="stringliteral">&quot;go to &lt;https://github.com/MertGunduz/yiffy/issues/new&gt; to open an issue.\n&quot;</span>);</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> fprintf(stdout, <span class="stringliteral">&quot;go to &lt;https://github.com/MertGunduz/yiffy/issues&gt; to view issues.\n&quot;</span>);</div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span> fprintf(stdout, <span class="stringliteral">&quot;go to https://github.com/MertGunduz/yiffy/issues/new to open an issue.\n&quot;</span>);</div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span> fprintf(stdout, <span class="stringliteral">&quot;go to https://github.com/MertGunduz/yiffy/issues to view issues.\n&quot;</span>);</div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span>}</div>
<div class="ttc" id="ashow__github_8c_html_ae31a1275940d22cd5cb90427c1ac92c6"><div class="ttname"><a href="../../d4/d65/show__github_8c.html#ae31a1275940d22cd5cb90427c1ac92c6">show_github</a></div><div class="ttdeci">void show_github()</div><div class="ttdoc">Shows the project github URL, current issues to user.</div><div class="ttdef"><b>Definition:</b> <a href="../../d4/d65/show__github_8c_source.html#l00016">show_github.c:16</a></div></div>
<div class="ttc" id="ayiffy__text__menus_8h_html"><div class="ttname"><a href="../../d5/dff/yiffy__text__menus_8h.html">yiffy_text_menus.h</a></div><div class="ttdoc">This header file is used to generate text based information menus for yiffy.</div></div>
Expand Down
Loading

0 comments on commit b5f0428

Please sign in to comment.