arnica

arnica is based on the ParserMarket/Gallery2 parser. It is an extension for MoinMoin >= 1.7.2.

The arnica extension gives you the opportunity to organize images and present them in your wiki. It supports some basic image processing operations by enabling an optional tool set. The action arnica_slides is used to play a slideshow of the selected images.

Installation

Download the arnica-1.7.2beta5.zip package file and upload it to your wiki. You can install it using the install dialog going to Attachments. For further informations on packages see HelpOnPackageInstaller. After installation and configuration (see next topic) the wiki needs to be restarted except for cgi deployment.

/!\ CopyThemeFile of PackageInstaller is currently just supported on standalone-like servers.

Separate htdocs theme files htdocs_arnica-1.7.2beta5.zip

1.8 installation

Since 1.8 moin supports multiple plugin directories, you can also, instead of downloading the zip files, just check out the repository:

cd /some/where
hg clone http://hg.moinmo.in/moin/1.7-extensions

and add the appropriate configuration option in wikiconfig of 1.8:

plugin_dirs = ['/some/where/1.7-extensions/data/plugin']

You still need to use the htdocs as above, but you can just symlink from the repository checkout into your web server's directory.

Configuration

The action and the parser are based on css. You have to enter the config var html_head into your wikiconfig.py.

html_head = '''
<link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="%(url_prefix_static)s/arnica/css/text_x_arnica.css">
<link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="%(url_prefix_static)s/arnica/css/arnica_slides.css">
<!-- css only for MSIE browsers -->
<!--[if IE]>
<link rel="stylesheet" type="text/css" charset="utf-8" media="all" href="%(url_prefix_static)s/arnica/css/msie_arnica_slides.css">
<![endif]-->
''' % {"url_prefix_static": DefaultConfig.url_prefix_static}

Parameters

name

default

description

target_page

u''

page to read attachments from. empty pagename is current page

columns

4

number of columns for thumbnails. columns=0 means thumbnails flow onto new line is needed thumbnails are aligned on top now

file_regex

u'.'

regex for selecting images

image_for_webnail

False

if set then the image is shown instead of the webnail

show_text

True

default shows description

show_date

True

default shows date from exif header if available

show_tools

False

default does not show icon toolbar

show_album_title

True

default does show album_title of album

sort_by

name

sorts images by the name further options are alias, date

reverse_sort

False

if set, the file list is sorted in reverse order

only_items

False

if set, only images which are described in listitem are shown

template_itemlist

False

if set, an item list is shown which could be copied into the wiki page

album

False

if set, selects album mode, only thumbnail from first image is shown, related is album title and album_image

album_title

unicode

default is pagename of the images for the album.

album_image

u''

image to show on album. default is the first image.

album_link_page

False

default links to slideshow, setting to True links to the page.

renew

False

if set then all selected thumbnails_* and webnails_* are removed and will be recreated

thumbnail_width

128

default width of thumbnail

webnail_width

640

default width of webnail

itemlist

  * [[image1.jpg|alias]]
  * [[image2.jpg|alias]]

Usage

Examples

one item to define an alias for an image

{{{
#!arnica
* [[100_1185.JPG| Bremen, SpaceCenter]]
}}}
Result

result1.png

only thumbnails, only_items text and date surpressed, tools shown

{{{
#!arnica show_text=0, show_date=0, show_tools=1, columns=2, only_items=1
 * [[100_1185.JPG| BremenSpaceCenter]]
 * [[100_1194.JPG| Bremen]]
}}}
Result

result2.png

only_items by two columns, date supressed

{{{
#!arnica columns=2, only_items=1, show_date=0
 * [[100_1185.JPG| Bremen, SpaceCenter]]
 * [[100_1187.JPG| SpaceCenter, space suit]]
 * [[100_1194.JPG| Bremen behind SpaceCenter]]
}}}
Result

result3.png

file_regex used, date supressed, one column

{{{
#!arnica columns=1, file_regex=100_118[0-5], show_date=0
}}}
Result

result4.png

macro arnica

||<<arnica(album=1)>>||<<arnica(album=1, album_image=100_1194.JPG, album_title=Bremen)>>||
Result

result5.png

renew means always new thumbnails and webnails of selection

{{{
#!arnica only_items=1, show_date=0, show_tools=0, renew=1
 * [[100_1189.JPG | Bremen]]]
}}}
Result

result6.png

text and only_items and sort_by=alias

{{{
#!arnica show_text=1, show_date=0, columns=2, only_items=1, sort_by=alias
 * [[100_1185.JPG| Bremen, SpaceCenter]]
 * [[100_1194.JPG| Bremen]]
}}}
Result

result7.png

text and only_items and sort_by=date, reverse order

{{{
#!arnica show_text=1, show_date=1, columns=2, only_items=1, sort_by=date, reverse_sort=1
 * [[100_1185.JPG| Bremen, SpaceCenter]]
 * [[100_1194.JPG| Bremen]]
}}}
Result

result8.png

template itemlist

{{{
#!arnica template_itemlist=True
}}}
Result

Copy the following listitems into the script. Replace alias with the label you want. Afterwards disable template_itemlist by setting it to False:

result9.png

slide show

When you click on the slide show icon or an thumbnail the arnica_slides action is called.

result10.png

HelpOnArnica (last edited 2009-07-30 21:40:02 by anonymous)