<title>Command Line Options</title>\r
<para>\r
Geeqie is called by the command:\r
- <programlisting>geeqie [options] [path_to_file]</programlisting>\r
+ <programlisting>\r
+ geeqie [options] [path_to_file_or_collection] <footnote id='ref1'>The name of a collection, with or without either path or extension (.gqv) may be used. If a path is not used and there is a name conflict with a file or folder, that will take precedence.</footnote>\r
+ </programlisting>\r
</para>\r
<para>These are the command line options available to Geeqie:</para>\r
<table frame="all">\r
parse_command_line_add_file(file_path, path, file, list, collection_list);
}
+static gboolean is_collection(gchar *cmd_param)
+{
+ gchar *path = NULL;
+ gchar *full_name = NULL;
+ gboolean result = FALSE;
+
+ if (file_extension_match(cmd_param, GQ_COLLECTION_EXT))
+ {
+ path = g_build_filename(get_collections_dir(), cmd_param, NULL);
+ }
+ else if (file_extension_match(cmd_param, NULL))
+ {
+ full_name = g_strconcat(cmd_param, GQ_COLLECTION_EXT, NULL);
+ path = g_build_filename(get_collections_dir(), full_name, NULL);
+ }
+
+ if (isfile(path))
+ {
+ result = TRUE;
+ }
+
+ g_free(path);
+ g_free(full_name);
+ return result;
+}
+
static void parse_command_line(gint argc, gchar *argv[])
{
GList *list = NULL;
parse_command_line_process_file(cmd_all, &command_line->path, &command_line->file,
&list, &command_line->collection_list, &first_dir);
}
+ else if (is_collection(cmd_line))
+ {
+ gchar *path = NULL;
+ gchar *full_name = NULL;
+
+ if (file_extension_match(cmd_line, GQ_COLLECTION_EXT))
+ {
+ path = g_build_filename(get_collections_dir(), cmd_line, NULL);
+ }
+ else
+ {
+ full_name = g_strconcat(cmd_line, GQ_COLLECTION_EXT, NULL);
+ path = g_build_filename(get_collections_dir(), full_name, NULL);
+ }
+ parse_command_line_process_file(path, &command_line->path, &command_line->file,
+ &list, &command_line->collection_list, &first_dir);
+ g_free(path);
+ g_free(full_name);
+ }
else if (strncmp(cmd_line, "--debug", 7) == 0 && (cmd_line[7] == '\0' || cmd_line[7] == '='))
{
/* do nothing but do not produce warnings */