45 lines
1.9 KiB
Text
45 lines
1.9 KiB
Text
|
Xibit (tibix) - the image gallery generator for werc
|
||
|
Xibit can:
|
||
|
- generate thumbnails from almost any picture format
|
||
|
- generate preview images with captions
|
||
|
- display them (rather brokenly for now)
|
||
|
|
||
|
|
||
|
Dependencies:
|
||
|
- Plan9port
|
||
|
- Imagemagick
|
||
|
- werc
|
||
|
|
||
|
|
||
|
To make it work:
|
||
|
1, clone the git repo at git://home.9souldier.org/xibit into $werc_root/apps
|
||
|
2, pick a directory to serve the gallery from
|
||
|
3, create an _werc and _werc/xibit directory in there, the xibit directory needs to be writable by the webserver to generate the thumbnails (at one point i'll probably make a cronjob, and then this will be optional)
|
||
|
4, create an _werc/config file (readable by the webserver), that contains the options for xibit
|
||
|
5, add xibit to the enabled_apps in initrc.local (or the local per-directory config file)
|
||
|
That should get you going.
|
||
|
|
||
|
to use captions just create a directory in GALLERY/_werc/xibit called captions, make it readable by the weberver and add the captions as files, using the following naming convention:
|
||
|
image.imageextension.md
|
||
|
the caption handler accepts markdown formatting
|
||
|
|
||
|
to enable comments add the comments handler (bridge) to the enabled apps, it'll (should) automatically work with xibit
|
||
|
|
||
|
Config options:
|
||
|
- fmts:
|
||
|
file extensions recognised
|
||
|
ex. fmts=(jpg gif png svg)
|
||
|
- thumbsize:
|
||
|
size of thumbnails to generate, accepts
|
||
|
ex. thumbsize='140x'
|
||
|
- previewsize:
|
||
|
size of the previews to generate
|
||
|
ex. previewsize='x460'
|
||
|
|
||
|
check_user:
|
||
|
Enforce authentication
|
||
|
This has been ripped out of the xibit code, if you want to enable perms enforcing, you should add the following to your config:
|
||
|
if ( ! check_user) { #if fyou want to enforce per-group permissions, do "if( ! check_user $group) {"
|
||
|
enabled_apps=() #maybe you want to leave some apps on, i just do this on a per-directory besis
|
||
|
handler_body_main=(echo '<a href="/_users/login">please log in</a>')
|
||
|
}
|