Update command line options documentation
authorColin Clark <cclark@mcb.net>
Thu, 31 Mar 2016 15:58:51 +0000 (16:58 +0100)
committerColin Clark <cclark@mcb.net>
Thu, 31 Mar 2016 15:58:51 +0000 (16:58 +0100)
Update both the Help file documentation for command line options, and
the output of the -h and -rh command line parameters.

doc/docbook/GuideReferenceCommandLine.xml
src/main.c
src/remote.c

index 1294df7..e23f583 100644 (file)
           Start up in slideshow mode.
         </entry></row>
 <row><entry>
-          -l
+          -l [filelist] [collectionlist]
         </entry><entry>
-          --list
+          --list [filelist] [collectionlist]
         </entry><entry>
           Open collection window containing images specified on the command line. Any collections on the command line will also be appended to this collection.
         </entry></row>
+<row><entry/><entry>
+          --blank
+        </entry><entry>
+          Start with file list blank.
+        </entry></row>
+<row><entry/><entry>
+          --geometry=&lt;w&gt;x&lt;h&gt;+&lt;x&gt;+&lt;y&gt;
+          </entry><entry>
+          Set the &lt;width&gt; &lt;height&gt; &lt;xoffset&gt; &lt;yoffset&gt; of the window. The parameters are in pixels.
+          </entry></row>
 <row><entry>
           -r
         </entry><entry>
           Display version of Geeqie.
         </entry></row>
 <row><entry/><entry>
-          --debug
+          --debug[=&lt;level&gt;]
+        </entry><entry>
+          Turn on debugging output (when compiled with Debug enabled). &lt;level&gt; is 0 to 4.
+        </entry></row>
+<row><entry/><entry>
+          --alternate
         </entry><entry>
-          Enable Debug output to console.
+          Use alternate similarity algorithm - experimental - requires re-compile.
         </entry></row>
 </tbody></tgroup></informaltable>
     <para/><section id="Remotecommands"><title>
         </entry><entry>
           Stop slide show for main window.
         </entry></row>
-<row><entry>
-          -sr&amp;lt;folder&amp;gt;
-        </entry><entry>
-          --slideshow-recurse&amp;lt;folder&amp;gt;
+<row><entry/><entry>
+          --slideshow-recurse:&lt;folder&gt;
         </entry><entry>
-          Start recursive slide show for &amp;lt;folder&amp;gt; in main window.
+          Start recursive slide show for &lt;folder&gt; in main window.
         </entry></row>
 <row><entry>
-          -d&amp;lt;n&amp;gt;
+          -d&lt;[n][.m]&gt;
         </entry><entry>
-          --delay=&amp;lt;n&amp;gt;
+          --delay=&lt;[n][.m]&gt;
         </entry><entry>
-          Set slide show delay to &amp;lt;n&amp;gt; seconds, range is 0.1 to 3600
+          Set slide show delay to &lt;[n][.m]&gt; seconds, range is 0.1 to 3600
         </entry></row>
 <row><entry>
           +t
           Quit Geeqie.
         </entry></row>
 <row><entry/><entry>
-          file:&amp;lt;filename&amp;gt;
+          --config-load:&lt;file&gt;
+        </entry><entry>
+          Load configuration from &lt;file&gt;.
+        </entry></row>
+<row><entry/><entry>
+          --get-sidecars:&lt;file&gt;
+        </entry><entry>
+          Get list of sidecars of &lt;file&gt;.
+        </entry></row>
+<row><entry/><entry>
+          --get-destination:&lt;file&gt;
+        </entry><entry>
+          Get destination path of &lt;file&gt;. This is used by the symlink desktop file to implement the symbolic link operation. There is no useful function for the user.
+        </entry></row>
+<row><entry/><entry>
+          file:&lt;file&gt;
+        </entry><entry>
+          Change main window to display &lt;file&gt;
+        </entry></row>
+<row><entry/><entry>
+          view:&lt;file&gt;
+        </entry><entry>
+          Open new window containing &lt;file&gt;
+        </entry></row>
+<row><entry/><entry>
+          --list-clear
+        </entry><entry>
+          Clear command line collection list
+        </entry></row>
+<row><entry/><entry>
+          --list-add:&lt;file&gt;
         </entry><entry>
-          Change main window to display &amp;lt;filename&amp;gt;
+          Add &lt;file&gt; to command line collection list
         </entry></row>
 <row><entry/><entry>
-          view:&amp;lt;filename&amp;gt;
+          raise
         </entry><entry>
-          Open new window containing &amp;lt;filename&amp;gt;
+          Bring the geeqie window to the top
         </entry></row>
 </tbody></tgroup></informaltable>
   <para/></section></section>
index 2ce0d67..9912bbe 100644 (file)
@@ -320,19 +320,20 @@ static void parse_command_line(gint argc, gchar *argv[])
                                printf_term("%s %s\n", GQ_APPNAME, VERSION);
                                printf_term(_("Usage: %s [options] [path]\n\n"), GQ_APPNAME_LC);
                                print_term(_("valid options are:\n"));
-                               print_term(_("  +t, --with-tools           force show of tools\n"));
-                               print_term(_("  -t, --without-tools        force hide of tools\n"));
-                               print_term(_("  -f, --fullscreen           start in full screen mode\n"));
-                               print_term(_("  -s, --slideshow            start in slideshow mode\n"));
-                               print_term(_("  -l, --list                 open collection window for command line\n"));
-                               print_term(_("      --geometry=GEOMETRY    set main window location\n"));
-                               print_term(_("  -r, --remote               send following commands to open window\n"));
-                               print_term(_("  -rh,--remote-help          print remote command list\n"));
+                               print_term(_("  +t, --with-tools                 force show of tools\n"));
+                               print_term(_("  -t, --without-tools              force hide of tools\n"));
+                               print_term(_("  -f, --fullscreen                 start in full screen mode\n"));
+                               print_term(_("  -s, --slideshow                  start in slideshow mode\n"));
+                               print_term(_("  -l, --list [files] [collections] open collection window for command line\n"));
+                               print_term(_("      --blank                      start with blank file list\n"));
+                               print_term(_("      --geometry=XxY+XOFF+YOFF     set main window location\n"));
+                               print_term(_("  -r, --remote                     send following commands to open window\n"));
+                               print_term(_("  -rh,--remote-help                print remote command list\n"));
 #ifdef DEBUG
-                               print_term(_("  --debug[=level]            turn on debug output\n"));
+                               print_term(_("      --debug[=level]              turn on debug output\n"));
 #endif
-                               print_term(_("  -v, --version              print version info\n"));
-                               print_term(_("  -h, --help                 show this message\n\n"));
+                               print_term(_("  -v, --version                    print version info\n"));
+                               print_term(_("  -h, --help                       show this message\n\n"));
 
 #if 0
                                /* these options are not officially supported!
@@ -340,6 +341,7 @@ static void parse_command_line(gint argc, gchar *argv[])
                                print_term(  "  --alternate                use alternate similarity algorithm\n");
 #endif
 
+
                                exit(0);
                                }
                        else if (!remote_do)
index 579811a..df2b691 100644 (file)
@@ -631,34 +631,35 @@ struct _RemoteCommandEntry {
        void (*func)(const gchar *text, GIOChannel *channel, gpointer data);
        gboolean needs_extra;
        gboolean prefer_command_line;
+       gchar *parameter;
        gchar *description;
 };
 
 static RemoteCommandEntry remote_commands[] = {
-       /* short, long                  callback,               extra, prefer,description */
-       { "-n", "--next",               gr_image_next,          FALSE, FALSE, N_("next image") },
-       { "-b", "--back",               gr_image_prev,          FALSE, FALSE, N_("previous image") },
-       { NULL, "--first",              gr_image_first,         FALSE, FALSE, N_("first image") },
-       { NULL, "--last",               gr_image_last,          FALSE, FALSE, N_("last image") },
-       { "-f", "--fullscreen",         gr_fullscreen_toggle,   FALSE, TRUE,  N_("toggle full screen") },
-       { "-fs","--fullscreen-start",   gr_fullscreen_start,    FALSE, FALSE, N_("start full screen") },
-       { "-fS","--fullscreen-stop",    gr_fullscreen_stop,     FALSE, FALSE, N_("stop full screen") },
-       { "-s", "--slideshow",          gr_slideshow_toggle,    FALSE, TRUE,  N_("toggle slide show") },
-       { "-ss","--slideshow-start",    gr_slideshow_start,     FALSE, FALSE, N_("start slide show") },
-       { "-sS","--slideshow-stop",     gr_slideshow_stop,      FALSE, FALSE, N_("stop slide show") },
-       { NULL, "--slideshow-recurse:", gr_slideshow_start_rec, TRUE,  FALSE, N_("start recursive slide show") },
-       { "-d", "--delay=",             gr_slideshow_delay,     TRUE,  FALSE, N_("set slide show delay in seconds") },
-       { "+t", "--tools-show",         gr_tools_show,          FALSE, TRUE,  N_("show tools") },
-       { "-t", "--tools-hide",         gr_tools_hide,          FALSE, TRUE,  N_("hide tools") },
-       { "-q", "--quit",               gr_quit,                FALSE, FALSE, N_("quit") },
-       { NULL, "--config-load:",       gr_config_load,         TRUE,  FALSE, N_("load config file") },
-       { NULL, "--get-sidecars:",      gr_get_sidecars,        TRUE,  FALSE, N_("get list of sidecars of the given file") },
-       { NULL, "--get-destination:",   gr_get_destination,     TRUE,  FALSE, N_("get destination path for the given file") },
-       { NULL, "file:",                gr_file_load,           TRUE,  FALSE, N_("open file") },
-       { NULL, "view:",                gr_file_view,           TRUE,  FALSE, N_("open file in new window") },
-       { NULL, "--list-clear",         gr_list_clear,          FALSE, FALSE, NULL },
-       { NULL, "--list-add:",          gr_list_add,            TRUE,  FALSE, NULL },
-       { NULL, "raise",                gr_raise,               FALSE, FALSE, NULL },
+       /* short, long                  callback,               extra, prefer, parameter, description */
+       { "-n", "--next",               gr_image_next,          FALSE, FALSE, NULL, N_("next image") },
+       { "-b", "--back",               gr_image_prev,          FALSE, FALSE, NULL, N_("previous image") },
+       { NULL, "--first",              gr_image_first,         FALSE, FALSE, NULL, N_("first image") },
+       { NULL, "--last",               gr_image_last,          FALSE, FALSE, NULL, N_("last image") },
+       { "-f", "--fullscreen",         gr_fullscreen_toggle,   FALSE, TRUE,  NULL, N_("toggle full screen") },
+       { "-fs","--fullscreen-start",   gr_fullscreen_start,    FALSE, FALSE, NULL, N_("start full screen") },
+       { "-fS","--fullscreen-stop",    gr_fullscreen_stop,     FALSE, FALSE, NULL, N_("stop full screen") },
+       { "-s", "--slideshow",          gr_slideshow_toggle,    FALSE, TRUE,  NULL, N_("toggle slide show") },
+       { "-ss","--slideshow-start",    gr_slideshow_start,     FALSE, FALSE, NULL, N_("start slide show") },
+       { "-sS","--slideshow-stop",     gr_slideshow_stop,      FALSE, FALSE, NULL, N_("stop slide show") },
+       { NULL, "--slideshow-recurse:", gr_slideshow_start_rec, TRUE,  FALSE, N_("<FOLDER>"), N_("start recursive slide show in FOLDER") },
+       { "-d", "--delay=",             gr_slideshow_delay,     TRUE,  FALSE, N_("<[N][.M]>"), N_("set slide show delay to N.M seconds") },
+       { "+t", "--tools-show",         gr_tools_show,          FALSE, TRUE,  NULL, N_("show tools") },
+       { "-t", "--tools-hide",         gr_tools_hide,          FALSE, TRUE,  NULL, N_("hide tools") },
+       { "-q", "--quit",               gr_quit,                FALSE, FALSE, NULL, N_("quit") },
+       { NULL, "--config-load:",       gr_config_load,         TRUE,  FALSE, N_("<FILE>"), N_("load configuration from FILE") },
+       { NULL, "--get-sidecars:",      gr_get_sidecars,        TRUE,  FALSE, N_("<FILE>"), N_("get list of sidecars of FILE") },
+       { NULL, "--get-destination:",   gr_get_destination,     TRUE,  FALSE, N_("<FILE>"), N_("get destination path of FILE") },
+       { NULL, "file:",                gr_file_load,           TRUE,  FALSE, N_("<FILE>"), N_("open FILE") },
+       { NULL, "view:",                gr_file_view,           TRUE,  FALSE, N_("<FILE>"), N_("open FILE in new window") },
+       { NULL, "--list-clear",         gr_list_clear,          FALSE, FALSE, NULL, N_("clear command line collection list") },
+       { NULL, "--list-add:",          gr_list_add,            TRUE,  FALSE, N_("<FILE>"), N_("add FILE to command line collection list") },
+       { NULL, "raise",                gr_raise,               FALSE, FALSE, NULL, N_("bring the Geeqie window to the top") },
        { NULL, NULL, NULL, FALSE, FALSE, NULL }
 };
 
@@ -720,6 +721,8 @@ static void remote_cb(RemoteConnection *rc, const gchar *text, GIOChannel *chann
 void remote_help(void)
 {
        gint i;
+       gchar *s_opt_param;
+       gchar *l_opt_param;
 
        print_term(_("Remote command list:\n"));
 
@@ -728,11 +731,15 @@ void remote_help(void)
                {
                if (remote_commands[i].description)
                        {
-                       printf_term("  %-3s%s %-20s %s\n",
-                                   (remote_commands[i].opt_s) ? remote_commands[i].opt_s : "",
+                       s_opt_param = g_strconcat(remote_commands[i].opt_s, remote_commands[i].parameter, NULL);
+                       l_opt_param = g_strconcat(remote_commands[i].opt_l, remote_commands[i].parameter, NULL);
+                       printf_term("  %-11s%-1s %-30s%-s\n",
+                                   (remote_commands[i].opt_s) ? s_opt_param : "",
                                    (remote_commands[i].opt_s && remote_commands[i].opt_l) ? "," : " ",
-                                   (remote_commands[i].opt_l) ? remote_commands[i].opt_l : "",
+                                   (remote_commands[i].opt_l) ? l_opt_param : "",
                                    _(remote_commands[i].description));
+                       g_free(s_opt_param);
+                       g_free(l_opt_param);
                        }
                i++;
                }