Skip to content

Commit

Permalink
search function documented
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetmertguduz committed May 20, 2024
1 parent 2d03efd commit 5795458
Show file tree
Hide file tree
Showing 44 changed files with 525 additions and 285 deletions.
2 changes: 1 addition & 1 deletion docs/html/annotated.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
<table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="db/d68/structcJSON.html" target="_self">cJSON</a></td><td class="desc"></td></tr>
<tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/d55/structcJSON__Hooks.html" target="_self">cJSON_Hooks</a></td><td class="desc"></td></tr>
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/dee/structcontrol.html" target="_self">control</a></td><td class="desc"></td></tr>
<tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dd/dee/structcontrol.html" target="_self">control</a></td><td class="desc">Stores the control name and key for displaying in the controls panel </td></tr>
<tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="df/d8b/structerror.html" target="_self">error</a></td><td class="desc"></td></tr>
<tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="df/d6b/structfetch__option.html" target="_self">fetch_option</a></td><td class="desc">The general struct for handling the fetch arguments </td></tr>
<tr id="row_5_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="dc/db4/structgeneral__option.html" target="_self">general_option</a></td><td class="desc">The general struct for handling the general arguments </td></tr>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/d0/de2/yiffy__messages_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
<area shape="rect" href="../../d8/d32/conf__plog_8c.html" title="This file is used to configure the plog system. If on, it basically generates a collection website." alt="" coords="5,169,156,196"/>
<area shape="rect" href="../../d6/d60/aria2__download_8c.html" title="Downloads the JSON file by using aria2c, works with the system function." alt="" coords="815,169,1011,196"/>
<area shape="rect" href="../../d1/d14/fetch_8c.html" title="This file is used to send requests to e621&#45;e926 with the specified tags by user and outputs or output..." alt="" coords="664,169,791,196"/>
<area shape="rect" href="../../dc/dec/search_8c.html" title="This file is used to interact with the terminal user interface version of yiffy, it provides download..." alt="" coords="493,169,639,196"/>
<area shape="rect" href="../../dc/dec/search_8c.html" title="This file is used to interact with the terminal user interface version of yiffy, providing download,..." alt="" coords="493,169,639,196"/>
<area shape="rect" href="../../dc/d3b/show__config_8c.html" title="This file is used to show current configurations of the app to the user." alt="" coords="1473,169,1657,196"/>
<area shape="rect" href="../../d4/d65/show__github_8c.html" title="This file is used to show project github URL, current issues to the user." alt="" coords="1681,169,1867,196"/>
<area shape="rect" href="../../de/d0c/show__help_8c.html" title="This file is used to show general help to the user by showing how to use the cli options." alt="" coords="1891,169,2065,196"/>
Expand Down
7 changes: 4 additions & 3 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> is_nsfw = <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> <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="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> is_nsfw = <span class="keyword">true</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="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, is_nsfw, 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, <a class="code hl_variable" href="../../dc/dec/search_8c.html#a8e8f6f474ecc73b9d4c438b5cc2e690f">is_nsfw</a>, 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,6 +300,7 @@
<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_aaaed77adad2afa7f86c4d4c4703564aa"><div class="ttname"><a href="../../d0/d31/no__json__error__msg_8c.html#aaaed77adad2afa7f86c4d4c4703564aa">no_json_error_msg</a></div><div class="ttdeci">void no_json_error_msg(FILE *json_file)</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#l00018">no_json_error_msg.c:18</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#l00041">search.c:41</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/d35/yiffy__search_8h__dep__incl.map
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<map id="src/search/yiffy_search.h" name="src/search/yiffy_search.h">
<area shape="rect" id="node1" title="This header file is used to handle the fetching and searching system." alt="" coords="45,5,228,32"/>
<area shape="rect" id="node2" href="$dc/dc0/yiffy_8c.html" title="This is the main file and used to handle the arguments and execute the program by using external func..." alt="" coords="5,80,116,107"/>
<area shape="rect" id="node3" href="$dc/dec/search_8c.html" title="This file is used to interact with the terminal user interface version of yiffy, it provides download..." alt="" coords="141,80,287,107"/>
<area shape="rect" id="node3" href="$dc/dec/search_8c.html" title="This file is used to interact with the terminal user interface version of yiffy, providing download,..." alt="" coords="141,80,287,107"/>
</map>
2 changes: 1 addition & 1 deletion docs/html/d1/d35/yiffy__search_8h__dep__incl.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
50e78820f949bf0d86f7dea9d0e636cb
397f60947cbc286f658b3fab4753fc40
2 changes: 1 addition & 1 deletion docs/html/d4/dd5/yiffy__messages_8h__dep__incl.map
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<area shape="rect" id="node5" href="$d8/d32/conf__plog_8c.html" title="This file is used to configure the plog system. If on, it basically generates a collection website." alt="" coords="5,169,156,196"/>
<area shape="rect" id="node7" href="$d6/d60/aria2__download_8c.html" title="Downloads the JSON file by using aria2c, works with the system function." alt="" coords="815,169,1011,196"/>
<area shape="rect" id="node8" href="$d1/d14/fetch_8c.html" title="This file is used to send requests to e621&#45;e926 with the specified tags by user and outputs or output..." alt="" coords="664,169,791,196"/>
<area shape="rect" id="node9" href="$dc/dec/search_8c.html" title="This file is used to interact with the terminal user interface version of yiffy, it provides download..." alt="" coords="493,169,639,196"/>
<area shape="rect" id="node9" href="$dc/dec/search_8c.html" title="This file is used to interact with the terminal user interface version of yiffy, providing download,..." alt="" coords="493,169,639,196"/>
<area shape="rect" id="node11" href="$dc/d3b/show__config_8c.html" title="This file is used to show current configurations of the app to the user." alt="" coords="1473,169,1657,196"/>
<area shape="rect" id="node12" href="$d4/d65/show__github_8c.html" title="This file is used to show project github URL, current issues to the user." alt="" coords="1681,169,1867,196"/>
<area shape="rect" id="node13" href="$de/d0c/show__help_8c.html" title="This file is used to show general help to the user by showing how to use the cli options." alt="" coords="1891,169,2065,196"/>
Expand Down
2 changes: 1 addition & 1 deletion docs/html/d4/dd5/yiffy__messages_8h__dep__incl.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d38231f27ba035a981a9073d7328bb88
24141a59d06a64950d4d3f794e2fef13
4 changes: 2 additions & 2 deletions docs/html/d5/d05/yiffy__fetch_8h.html
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
<area shape="rect" href="../../dc/dc0/yiffy_8c.html" title="This is the main file and used to handle the arguments and execute the program by using external func..." alt="" coords="5,80,116,107"/>
<area shape="rect" href="../../d6/d60/aria2__download_8c.html" title="Downloads the JSON file by using aria2c, works with the system function." alt="" coords="140,80,336,107"/>
<area shape="rect" href="../../d1/d14/fetch_8c.html" title="This file is used to send requests to e621&#45;e926 with the specified tags by user and outputs or output..." alt="" coords="360,80,487,107"/>
<area shape="rect" href="../../dc/dec/search_8c.html" title="This file is used to interact with the terminal user interface version of yiffy, it provides download..." alt="" coords="511,80,658,107"/>
<area shape="rect" href="../../dc/dec/search_8c.html" title="This file is used to interact with the terminal user interface version of yiffy, providing download,..." alt="" coords="511,80,658,107"/>
</map>
</div>
</div>
Expand All @@ -166,7 +166,7 @@
<tr class="memitem:a41f382b6bd05c9776641fb4bc5024afa"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d05/yiffy__fetch_8h.html#a41f382b6bd05c9776641fb4bc5024afa">fetch</a> (char *tags, int page, char *command)</td></tr>
<tr class="memdesc:a41f382b6bd05c9776641fb4bc5024afa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the configuration file, sets the options and sends a request to e621-e926. After taking the response, it calls the output function to show the URLs. <a href="../../d5/d05/yiffy__fetch_8h.html#a41f382b6bd05c9776641fb4bc5024afa">More...</a><br /></td></tr>
<tr class="separator:a41f382b6bd05c9776641fb4bc5024afa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d6732ce337f794d14f9f2b835a0d2ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d05/yiffy__fetch_8h.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a> (char *tags, int page, bool is_nsfw, int lim)</td></tr>
<tr class="memitem:a5d6732ce337f794d14f9f2b835a0d2ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d5/d05/yiffy__fetch_8h.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a> (char *tags, int page, bool <a class="el" href="../../dc/dec/search_8c.html#a8e8f6f474ecc73b9d4c438b5cc2e690f">is_nsfw</a>, int lim)</td></tr>
<tr class="memdesc:a5d6732ce337f794d14f9f2b835a0d2ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">downloads the API response by using aria2c, works with a system call <a href="../../d5/d05/yiffy__fetch_8h.html#a5d6732ce337f794d14f9f2b835a0d2ef">More...</a><br /></td></tr>
<tr class="separator:a5d6732ce337f794d14f9f2b835a0d2ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
Expand Down
3 changes: 2 additions & 1 deletion docs/html/d5/d05/yiffy__fetch_8h_source.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,10 @@
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="../../d5/d05/yiffy__fetch_8h.html#acbd50aa1f19ce68034a26b45b0aaed69"> 25</a></span><span class="preprocessor">#define BAD_SYSTEM_FUNC_CALL -1</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d05/yiffy__fetch_8h.html#a41f382b6bd05c9776641fb4bc5024afa">fetch</a>(<span class="keywordtype">char</span> *tags, <span class="keywordtype">int</span> page, <span class="keywordtype">char</span> *command);</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d05/yiffy__fetch_8h.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a>(<span class="keywordtype">char</span> *tags, <span class="keywordtype">int</span> page, <span class="keywordtype">bool</span> is_nsfw, <span class="keywordtype">int</span> lim);</div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span><span class="keywordtype">void</span> <a class="code hl_function" href="../../d5/d05/yiffy__fetch_8h.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a>(<span class="keywordtype">char</span> *tags, <span class="keywordtype">int</span> page, <span class="keywordtype">bool</span> <a class="code hl_variable" href="../../dc/dec/search_8c.html#a8e8f6f474ecc73b9d4c438b5cc2e690f">is_nsfw</a>, <span class="keywordtype">int</span> lim);</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#endif </span><span class="comment">/* YIFFY_SEARCH_H */</span><span class="preprocessor"></span></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#l00041">search.c:41</a></div></div>
<div class="ttc" id="ayiffy__fetch_8h_html_a41f382b6bd05c9776641fb4bc5024afa"><div class="ttname"><a href="../../d5/d05/yiffy__fetch_8h.html#a41f382b6bd05c9776641fb4bc5024afa">fetch</a></div><div class="ttdeci">void fetch(char *tags, int page, char *command)</div><div class="ttdoc">Reads the configuration file, sets the options and sends a request to e621-e926. After taking the res...</div><div class="ttdef"><b>Definition:</b> <a href="../../d1/d14/fetch_8c_source.html#l00032">fetch.c:32</a></div></div>
<div class="ttc" id="ayiffy__fetch_8h_html_a5d6732ce337f794d14f9f2b835a0d2ef"><div class="ttname"><a href="../../d5/d05/yiffy__fetch_8h.html#a5d6732ce337f794d14f9f2b835a0d2ef">aria2_download</a></div><div class="ttdeci">void aria2_download(char *tags, int page, bool is_nsfw, int lim)</div><div class="ttdoc">downloads the API response by using aria2c, works with a system call</div><div class="ttdef"><b>Definition:</b> <a href="../../d6/d60/aria2__download_8c_source.html#l00019">aria2_download.c:19</a></div></div>
</div><!-- fragment --></div><!-- contents -->
Expand Down
Loading

0 comments on commit 5795458

Please sign in to comment.