What is a "cyclic" script?
What I would do (well, what I do), is generate new, or changed, picture albums if something changes. I can just call my build script and it'll figure out whether there are new pictures, or modified options (descriptions, cropping parameters, whatever) to pictures, and it (re)builds the corresponding html pages, thumbnails, preview, and display size images, adjusting the navigation pages if necessary. Without parameters, it just checks all, but I can also tell it to check certain albums, or even certain images.
Now, I do this by hand because I copy the images by hand from my camera to the machine. But having it trigger from the arrival of an email would be simple (takes, oh, one line to call an external program in about any language, doesn't it?).
I mean, if I have pictures, pic1, pic2, pic3 and pic4, and they have thumbnails th1, th2, th3 and th4, and preview images prev1, prev2, prev3, and prev4, and I'm using html pages pag1, pag2, pag3, and pag4, then that's fairly static, isn't? It's not something you couldn't determine until someone wants to see pic1 or pic2? And it's not going to change if pic5 arrives.
And as an additional benefit, I can distribute an album (which in my setup is contained in a directory tree), be it by sending someone a tar or a zip file, or to burn it on CD or putting it on a memory stick, by just (recursively) copying the directory. Nothing special required for the receiver. No webserver needed. No OS dependency. | [reply] |
Dear A. Monk,
Reading your reply I must admit, having a script that manages the creation and cleanup, etc. rather then one that creates pages on the fly seems a good idea. I especially like the portability (tar .. there you gow) thingy. I'm probably so used to a linux workstation that there's always an Apache server around (there no place like 127.0.0.1 .. :-))
Since were on the subject. What I recently added to my script was the option to show a description per picture, and if none state: 'no title - name DSC000XX.jpg'. You gave me a lot of new ideas, Thanx for that!
What I'm looking for is an easy manageble solution. Something like doing an scp or ftp upload of the pictures (since the're alway on my external server), and being able to create the (static) pages and the preview and thumbs via a dynamicly generated GUI (sorry couldn't help myself .. ;-)).
Do you manage the things you mentioned from a CGI based HTML gui or simply from the CLI.
Thanx again,
Regards,
Gerard.
| [reply] |
CLI, with an optional configuration file. In the configuration file, I can state in which order I want to pictures to be displayed (by default, it takes the order the pictures are in the directory), whether pictures need to be rotated (my camera doesn't track this), any descriptions I'd like to be shown, and whatever else I'd like to record. Everything being optional. I don't need to an HTTP server to create (or configure) my albums, and I don't even need one to view my albums. firefox index.html works fine. All I need to create an album is vi (for the config file), convert (to scale/rotate/crop images) and jhead (to get the exif information). Oh, and Perl.
And since I sometimes work on an album on my laptop, I've a 'sync' option that uses rsync to sync from my laptop to my server. A server that doesn't have CGI enabled.
| [reply] |