-Definition at line 78 of file yiffy.c.
+Definition at line 74 of file yiffy.c.
diff --git a/docs/html/dc/dc0/yiffy_8c_source.html b/docs/html/dc/dc0/yiffy_8c_source.html
index d284ed3..20a07d4 100644
--- a/docs/html/dc/dc0/yiffy_8c_source.html
+++ b/docs/html/dc/dc0/yiffy_8c_source.html
@@ -131,193 +131,179 @@
32static bool argument_verify(
int argument_count,
char *arguments[]);
33static bool is_api_accessible();
- 34static void export_local_data();
- 35static void import_local_data();
- 36static void search_urls(
char *tags);
- 37static void fetch_urls(
char *tags,
char *command);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 63 {
"--export", export_local_data},
- 64 {
"--import", import_local_data},
-
-
-
-
- 69 {
"--search", search_urls}
-
-
-
-
- 74 {
"--fetch", fetch_urls},
- 75 {
"--dfetch", fetch_urls}
-
-
- 78int main(
int argc,
char *argv[])
-
- 80 if (argument_verify(argc, argv))
-
- 82 for (
size_t i = 0; i <
sizeof(fetch_options) /
sizeof(fetch_options[0]); i++)
-
- 84 if (strcmp(argv[1], fetch_options[i].
option) == 0)
-
- 86 void (*fetch_function)(
char *argv,
char *command) = fetch_options[i].
function;
- 87 fetch_function(argv[2], fetch_options[i].
option);
+ 34static void search_urls(
char *tags);
+ 35static void fetch_urls(
char *tags,
char *command);
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 65 {
"--search", search_urls}
+
+
+
+
+ 70 {
"--fetch", fetch_urls},
+ 71 {
"--dfetch", fetch_urls}
+
+
+ 74int main(
int argc,
char *argv[])
+
+ 76 if (argument_verify(argc, argv))
+
+ 78 for (
size_t i = 0; i <
sizeof(fetch_options) /
sizeof(fetch_options[0]); i++)
+
+ 80 if (strcmp(argv[1], fetch_options[i].
option) == 0)
+
+ 82 void (*fetch_function)(
char *argv,
char *command) = fetch_options[i].
function;
+ 83 fetch_function(argv[2], fetch_options[i].
option);
+
+
+
+
-
-
-
-
- 93 for (
size_t i = 0; i <
sizeof(general_options) /
sizeof(general_options[0]); i++)
-
- 95 if (strcmp(argv[1], general_options[i].
option) == 0)
-
- 97 void (*menu_func)(
char *argv) = general_options[i].
function;
-
- 99 if (strcmp(general_options[i].
option,
"--search") == 0 || strcmp(general_options[i].
option,
"--nsfw") == 0 || strcmp(general_options[i].
option,
"--ivcommand") == 0 || strcmp(general_options[i].
option,
"--uname") == 0 || strcmp(general_options[i].
option,
"--apikey") == 0)
+ 89 for (
size_t i = 0; i <
sizeof(general_options) /
sizeof(general_options[0]); i++)
+
+ 91 if (strcmp(argv[1], general_options[i].
option) == 0)
+
+ 93 void (*menu_func)(
char *argv) = general_options[i].
function;
+
+ 95 if (strcmp(general_options[i].
option,
"--search") == 0 || strcmp(general_options[i].
option,
"--nsfw") == 0 || strcmp(general_options[i].
option,
"--ivcommand") == 0 || strcmp(general_options[i].
option,
"--uname") == 0 || strcmp(general_options[i].
option,
"--apikey") == 0)
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
- 128static bool argument_verify(
int argument_count,
char *arguments[])
-
- 130 char *one_arguments[] = {
"--help",
"--version",
"--github",
"--config",
"--export",
"--import"};
- 131 char *two_arguments[] = {
"--apikey",
"--uname",
"--ivcommand",
"--nsfw",
"--dfetch",
"--fetch",
"--search"};
-
-
- 134 if (argument_count == 3)
-
- 147 for (
size_t i = 0; i <
sizeof(two_arguments) /
sizeof(two_arguments[0]); i++)
-
- 149 if (strcmp(arguments[1], two_arguments[i]) == 0)
-
- 151 if (strcmp(arguments[2],
"on") == 0 || strcmp(arguments[2],
"off") == 0 || strcmp(arguments[1],
"--dfetch") == 0 || strcmp(arguments[1],
"--fetch") == 0 || strcmp(arguments[1],
"--search") == 0 || strcmp(arguments[1],
"--ivcommand") == 0 || strcmp(arguments[1],
"--uname") == 0 || strcmp(arguments[1],
"--apikey") == 0)
+
+
+
+
+
+
+
+
+
+ 124static bool argument_verify(
int argument_count,
char *arguments[])
+
+ 126 char *one_arguments[] = {
"--help",
"--version",
"--github",
"--config"};
+ 127 char *two_arguments[] = {
"--apikey",
"--uname",
"--ivcommand",
"--nsfw",
"--dfetch",
"--fetch",
"--search"};
+
+
+ 130 if (argument_count == 3)
+
+ 143 for (
size_t i = 0; i <
sizeof(two_arguments) /
sizeof(two_arguments[0]); i++)
+
+ 145 if (strcmp(arguments[1], two_arguments[i]) == 0)
+
+ 147 if (strcmp(arguments[2],
"on") == 0 || strcmp(arguments[2],
"off") == 0 || strcmp(arguments[1],
"--dfetch") == 0 || strcmp(arguments[1],
"--fetch") == 0 || strcmp(arguments[1],
"--search") == 0 || strcmp(arguments[1],
"--ivcommand") == 0 || strcmp(arguments[1],
"--uname") == 0 || strcmp(arguments[1],
"--apikey") == 0)
+
+
+
+
-
-
-
-
-
-
-
-
-
-
- 168 for (
size_t i = 0; i <
sizeof(one_arguments) /
sizeof(one_arguments[0]); i++)
-
- 170 if (strcmp(arguments[1], one_arguments[i]) == 0)
-
-
-
-
-
-
-
-
-
- 180 else if (argument_count == 2)
-
- 187 for (
size_t i = 0; i <
sizeof(one_arguments) /
sizeof(one_arguments[0]); i++)
-
- 189 if (strcmp(arguments[1], one_arguments[i]) == 0)
-
-
-
-
-
- 200 for (
size_t i = 0; i <
sizeof(two_arguments) /
sizeof(two_arguments[0]); i++)
-
- 202 if (strcmp(arguments[1], two_arguments[i]) == 0)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 228static bool is_api_accessible()
-
-
- 231 int ping_result = system(
"ping -c 1 e621.net >/dev/null 2>&1");
-
- 233 if (ping_result == 0)
+
+
+
+
+
+
+ 164 for (
size_t i = 0; i <
sizeof(one_arguments) /
sizeof(one_arguments[0]); i++)
+
+ 166 if (strcmp(arguments[1], one_arguments[i]) == 0)
+
+
+
+
+
+
+
+
+
+ 176 else if (argument_count == 2)
+
+ 183 for (
size_t i = 0; i <
sizeof(one_arguments) /
sizeof(one_arguments[0]); i++)
+
+ 185 if (strcmp(arguments[1], one_arguments[i]) == 0)
+
+
+
+
+
+ 196 for (
size_t i = 0; i <
sizeof(two_arguments) /
sizeof(two_arguments[0]); i++)
+
+ 198 if (strcmp(arguments[1], two_arguments[i]) == 0)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 224static bool is_api_accessible()
+
+
+ 227 int ping_result = system(
"ping -c 1 e621.net >/dev/null 2>&1");
+
+ 229 if (ping_result == 0)
+
+
+
+
-
-
-
-
-
-
-
-
-
- 245static void export_local_data()
-
- 247 fprintf(stdout,
"EXPORT MENU\n");
-
-
- 251static void import_local_data()
-
- 253 fprintf(stdout,
"IMPORT MENU\n");
-
-
- 261static void search_urls(
char *tags)
- 262{
if (is_api_accessible())
-
-
-
-
-
- 273static void fetch_urls(
char *tags,
char *command)
-
- 275 if (is_api_accessible())
-
-
-
-
- 280 fetch(tags, i, command);
-
-
-
-
+
+
+
+
+
+ 245static void search_urls(
char *tags)
+ 246{
if (is_api_accessible())
+
+
+
+
+
+ 257static void fetch_urls(
char *tags,
char *command)
+
+ 259 if (is_api_accessible())
+
+
+
+
+ 264 fetch(tags, i, command);
+
+
+
+
void access_error_msg()
Gives message about the accessibility to the e621/e926 api.
void argc_error_msg(int argc)
Evaluates the argument count and gives information if not in the requested format.
void conf_apikey(char *argv)
Configures the api key option.
@@ -333,14 +319,14 @@
void show_github()
Shows the project github URL, current issues to user.
void show_help()
Shows the general help menu to user.
void show_version()
Shows the version of yiffy to user.
-The general struct for handling the fetch arguments.
-void(* function)(char *argv, char *command)
-
-The general struct for handling the general arguments.
-
-void(* function)(char *argv)
+The general struct for handling the fetch arguments.
+void(* function)(char *argv, char *command)
+
+The general struct for handling the general arguments.
+
+void(* function)(char *argv)
void unrecognized_arg_msg(char *argument)
Gives information and outputs the command prompted by the user when it is not defined as a valid argu...
-int main(int argc, char *argv[])
+int main(int argc, char *argv[])
#define UNRECOGNIZED_ARGUMENT
diff --git a/docs/html/de/d0c/show__help_8c_source.html b/docs/html/de/d0c/show__help_8c_source.html
index 26914cd..a0b710b 100644
--- a/docs/html/de/d0c/show__help_8c_source.html
+++ b/docs/html/de/d0c/show__help_8c_source.html
@@ -133,20 +133,15 @@
33 fprintf(stdout,
"--version outputs the version\n");
34 fprintf(stdout,
"--github outputs the github url\n");
35 fprintf(stdout,
"--config outputs the configs-credentials\n\n");
-
- 37 fprintf(stdout,
"yiffy data import-export arguments\n");
- 38 fprintf(stdout,
"----------------------------------\n");
- 39 fprintf(stdout,
"--import imports the data to program\n");
- 40 fprintf(stdout,
"--export exports the data from program\n\n");
-
- 42 fprintf(stdout,
"yiffy config and credential arguments\n");
- 43 fprintf(stdout,
"-------------------------------------\n");
- 44 fprintf(stdout,
"--nsfw [on/off] switches to nsfw/sfw options\n");
- 45 fprintf(stdout,
"--ivcommand [cmd] sets the image viewer command\n");
- 46 fprintf(stdout,
"--uname [uname] sets the username\n");
- 47 fprintf(stdout,
"--apikey [apikey] sets the api key\n");
-
-
+
+ 37 fprintf(stdout,
"yiffy config and credential arguments\n");
+ 38 fprintf(stdout,
"-------------------------------------\n");
+ 39 fprintf(stdout,
"--nsfw [on/off] switches to nsfw/sfw options\n");
+ 40 fprintf(stdout,
"--ivcommand [cmd] sets the image viewer command\n");
+ 41 fprintf(stdout,
"--uname [uname] sets the username\n");
+ 42 fprintf(stdout,
"--apikey [apikey] sets the api key\n");
+
+
void show_help()
Shows the general help menu to user.
diff --git a/docs/html/df/d6b/structfetch__option.html b/docs/html/df/d6b/structfetch__option.html
index 9dbde9a..f751d28 100644
--- a/docs/html/df/d6b/structfetch__option.html
+++ b/docs/html/df/d6b/structfetch__option.html
@@ -127,7 +127,7 @@
The general struct for handling the fetch arguments.
-
Definition at line 51 of file yiffy.c.
+
Definition at line 49 of file yiffy.c.