changeset 50:6122e5bb9332

text_x_arnica: moved description of keywords to macro_arnica
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Wed, 04 Jun 2008 11:11:32 +0200
parents 83078930ae66
children 37425f191cc5
files data/plugin/parser/text_x_arnica.py
diffstat 1 files changed, 42 insertions(+), 80 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/parser/text_x_arnica.py	Wed Jun 04 10:13:10 2008 +0200
+++ b/data/plugin/parser/text_x_arnica.py	Wed Jun 04 11:11:32 2008 +0200
@@ -8,79 +8,6 @@
     If you click on a thumbnail you get the webnails shown.
     By a menue you are able to toggle between the slides.
 
-    Syntax:
-      {{{
-      #!arnica [target_page=target_page],
-               [columns=columns],[filter=filter],[mode=mode],
-               [show_text=show_text],[show_date=show_date],
-               [show_tools=show_tools], [sort_by_name=sort_by_name],
-               [sort_by_date=sort_by_date], [sort_by_alias=sort_by_alias],
-               [reverse_sort=reverse_sort],
-               [only_items=only_items],[template_itemlist=template_itemlist],
-               [album=album],[album_name=album_name],[front_image=front_image],
-               [thumbnail_width=thumbnail_width],[webnail_width=webnail_width],
-               [text_width=text_width], [image_for_webnail=image_for_webnail],
-               [sequence_name=sequence_name], [sequence_fps=sequence_fps],
-               [border_thick=border_thick],[renew=renew],[help=help]
-      * [[image1.jpg|alias]]
-      * [[image2.jpg|alias]]
-      }}}
-
-    KEYWORD PARAMETERS:
-        target_page:       page to read attachments
-        columns:           number of columns for thumbnails
-        filter:            regex to select images
-        show_text:         default is 1 description is shown
-                           any other means no description
-        show_date:         default is 1 date info from exif header if
-                           available is shown
-        show_tools:        default is 1 icon toolbar is show any other
-                           disables this
-        sort_by_name:      default is 1, the images are sorted by name,
-                           but not if only_items is 1
-        sort_by_date:      default is 0, if set to 1 the images are sorted
-                           to the modification time if they do have
-                           all the same time then the result is random
-        sort_by_alias      default is 0, if set to 1 and only_items set to 1
-                           it is used to order the images by the alias name
-        reverse_sort:      default is 0, if set to 1 the file list is reversed
-                           any other means no description
-        mode:              default is 1 this means description below the image
-                           any other number means description right of image
-        only_items:        default is 0 if it is set to 1 only images which
-                           are described in listitem are shown
-                           dependend on the order of the items
-        template_itemlist: default is 0, if set to 1 an item list is shown which
-                           could be copied into the script.
-        album:             default is 0 if set to 1 only the first image of
-                           a series is shown but slideshow over all images
-        album_name:        useful for album. default is 'album' use it as
-                           short name for the album.
-        front_image:       Useful for album.  default is ''. The first image
-                           is shown in front of the album and slideshow.
-                           If set to an existing image name this is shown in
-                           front of album and slideshow.
-                           The slide show could start by this somewhere.
-        border_thick:      default is 1 this is the thickness in pixeln of
-                           the outer frame
-        renew:             default is 0 if set to 1 then all selected
-                           thumbnails_* and webnails_* removed.
-                           Afterwards they are new created.
-        thumbnail_width:   default is 128
-        webnail_width:     default is 640
-        text_width:        default is 140
-        image_for_webnail  default is 0 if set to 1 then the image is shown as
-                           preview and not the webnail
-        help:              default is 0 if set a copy of the CALLING SEQUENCE
-                           is shown, (there are some new ideas around to show
-                           help to an user so this will be later replaced)
-
-
-    OPTIONAL INPUTS:
-        itemlist : if it is used and only_items is 1 then only the images in this list are ahown.
-                   The alias text is used as description of the image instead of the file name
-
-
 
     MODIFICATION HISTORY:
     based on Gallery2 by ReimarBauer 2005-2008, ThomasWaldmann 2005, FlorianFesti 2006
@@ -107,14 +34,49 @@
 
 parser_name = __name__.split('.')[-1]
 
-def macro_arnica(macro, target_page=u'', sort_by_date=False, sort_by_name=True, sort_by_alias=False,
-                 album=False, album_name=u'album', front_image=u'', template_itemlist=False,
-                 reverse_sort=False, border_thick=int(1), columns=int(4), filter=u'.', mode=int(1), help=False,
-                 show_text=True, show_date=True, show_tools=True, only_items=False,
-                 image_for_webnail=False, renew=False,
-                 thumbnail_width=int(128), webnail_width=int(640), text_width=int(128)):
-    """ macro to initialize all default parameters for arnica """
+def macro_arnica(macro, target_page=u'', columns=int(4), filter=u'.',
+                 image_for_webnail=False,
+                 show_text=True, show_date=True, show_tools=True,
+                 sort_by_date=False, sort_by_name=True, sort_by_alias=False,
+                 reverse_sort=False,
+                 mode=int(1), only_items=False, template_itemlist=False,
+                 album=False, album_name=u'album', front_image=u'',
+                 border_thick=int(1),  renew=False,
+                 thumbnail_width=int(128), webnail_width=int(640),
+                 text_width=int(128), help=False):
+    """ macro to initialize all default parameters for arnica
 
+    @param target_page: page to read attachments from
+    @param columns: number of columns for thumbnails
+    @param filter: regex to select images
+    @param image_for_webnail if set then the image is shown instead of the webnail
+    @param show_text: default shows description
+    @param show_date: default shows date from exif header if available
+    @param show_tools: default shows icon toolbar
+    @param sort_by_name: default sorts images by name,
+    @param sort_by_date: if set to images are sorted to the modification time
+    @param sort_by_alias: if set and also only_items is True it is used to order the images
+                          by the alias name
+    @param reverse_sort: if set the file list is reverse sorted
+    @param mode: default is 1 which writes the description below the image,
+                 any other number means description right of image
+    @param only_items: if set only images which are described in listitem are shown, e.g.
+                       * [[image1.jpg|alias]]
+                       * [[image2.jpg|alias]]
+    @param template_itemlist: if set an item list is shown which could be copied into the wiki page
+    @param album: if set only the first thumbnail image or if used thumbnail
+                  from front_image of series is shown but slideshow over all images
+    @param album_name: default is 'album' short name for the album.
+    @param front_image:  Useful for album.  default is ''. The first image is shown in front
+                         of the album and slideshow.
+    @param border_thick: default is 1 for thickness of the border
+    @param renew: if set then all selected thumbnails_* and webnails_* are removed
+                  and will be recreated
+    @param thumbnail_width: default width of thumbnails is 128
+    @param webnail_width: default width of webnail is 640
+    @param text_width: default width of text is 140
+    @param help: if set you get a brief description of the parameters
+    """
     from inspect import getargspec
     args, varargs, varkw, defaults = getargspec(macro_arnica)
     # XXX find the proper method do get the real values