[gimp-perl] Doc Gimp::Fu command-line support.



commit 29232d8e7b84737cc2c1805130d76cb6e67f2266
Author: Ed J <edj src gnome org>
Date:   Thu May 1 02:58:47 2014 +0100

    Doc Gimp::Fu command-line support.

 Gimp/Fu.pm |   50 +++++++++++++++++++++++++++++++++++++++++++++-----
 TODO       |    4 +---
 2 files changed, 46 insertions(+), 8 deletions(-)
---
diff --git a/Gimp/Fu.pm b/Gimp/Fu.pm
index 1e8fecf..c7f331f 100644
--- a/Gimp/Fu.pm
+++ b/Gimp/Fu.pm
@@ -999,11 +999,11 @@ Save, and Edit (in external editor) buttons.
 
 =head1 EMBEDDED POD DOCUMENTATION
 
-Gimp::Fu uses the Gimp::Pod module to display the full text
-of the POD sections that are embedded in your scripts (see L<perlpod> for
-an explanation of the POD documentation format) when the user hits the
-"Help" button in the dialog box. More importantly, various sections of the
-POD can be used instead of hardcoding strings in the call to C<register>.
+Gimp::Fu uses the Gimp::Pod module to access POD sections that are
+embedded in your scripts (see L<perlpod> for an explanation of the POD
+documentation format) when the user hits the "Help" button in the dialog
+box. More importantly, various sections of the POD can be used instead
+of hardcoding strings in the call to C<register>.
 
 Most of the mentioned arguments have default values (see
 L</"THE REGISTER FUNCTION">) that are used when the arguments are
@@ -1061,6 +1061,46 @@ some examples:
 
 =back
 
+=head1 COMMAND LINE USAGE
+
+Your scripts can immediately be used from the command line. E.g.
+
+  /usr/local/lib/gimp/2.0/plug-ins/example-fu -i
+
+Use the C<--help> flag to see the available options:
+
+  Usage: .../example-fu [gimp-args..] [interface-args..] [script-args..]
+        gimp-arguments are
+            -h | -help | --help | -?   print some help
+            -v | --verbose             be more verbose in what you do
+            --host|--tcp HOST[:PORT]   connect to HOST (optionally using PORT)
+                                       (for more info, see Gimp::Net(3))
+        interface-arguments are
+            -o | --output <filespec>   write image to disk
+            -i | --interact            let the user edit the values first
+        script-arguments are
+            --width number             Image width [360]
+            --height integer           Image height [100]
+            --text string              Message [example text]
+            --longtext string          Longer text [more example text]
+            --bordersize integer (32-bit) Border size [10]
+            --borderwidth number       Border width [0.2]
+            --font font                Font
+            --text_colour colour       Text colour [[10 10 10]]
+            --bg_colour colour         Background colour [[255 128 0]]
+            --ignore_cols boolean      Ignore colours [0]
+            --extra_image image        Additional picture to ignore
+            --extra_draw drawable (%number or %a = active) Something to ignore as well
+            --type data                Effect type [0]
+            --a_brush brush            An unused brush
+            --a_pattern pattern        An unused pattern
+            --a_gradients gradient     An unused gradients
+
+You may notice that the C<drawable> above offers the option of "%number"
+(or "%a") - this means you can specify which drawable by numeric ID. From
+the command line, C<image> may be specified either as "%number" or as
+a filename.
+
 =head1 AUTHOR
 
 Marc Lehmann <pcg goof com>
diff --git a/TODO b/TODO
index 3fec124..3a4635e 100644
--- a/TODO
+++ b/TODO
@@ -1,13 +1,11 @@
 Items as of 2014-04-29 (by Ed J)
 * possible killer app: https://mail.gnome.org/archives/gimp-developer-list/2014-April/msg00017.html
 * <Load> and <Save> need any registration as such done in Gimp::Fu - see pod and e/dataurl
-* Gimp::Fu must doc command-line usage; no -o needs give warning
+* Gimp::Fu no -o needs give warning
 * Gimp::UI PF_IMAGE needs "open" button
 * e/fade-alpha should generate buttons, not hardcode
-* ensure Server startup, security note in docs
 * image in Gimp.pm POD http://perlmaven.com/how-to-add-images-to-cpan -
   input image -> output image of a plugin
-* examples POD finish, get rid README
 * Gimp/Lib.xs is huge, and not very XS-y - lots of it is manually
   pushing GIMP data structures onto perl stack and vice versa. Figure
   way to pass GIMP data back and forth directly via typemap system. May


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]