Tool to generate static pages with Photos

Luis M lemsx1 at gmail.com
Sun Apr 23 20:47:29 UTC 2006


On 4/23/06, Jean-Eric Cuendet (RPT) <jec at rptec.ch> wrote:
> Hi,
> Is there a tool to generate static pages with photos?
> In KDE, there was one, once, that takes a set of JPG files and generate
> a set of pages (no PHP, jscript, ...) with thumbnails, small and real
> photos. That's nice is you can't setup coppermine or the like.
>
> Thanks for ideas.
> -jec

Since this is linux after all, here is another choice:

I use pixdir2html (http://sf.net/projects/pixdir2html)
Download it from:
http://cvs.sourceforge.net/viewcvs.py/*checkout*/pixdir2html/pixdir2html/pixdir2html.pl

With this script you an place it inside the Nautilus scripts folder (
~/.gnome2/nautilus-scripts) and create full blown web albums of the
current directory by simply right clicking on the folder and choosing
the script. You might also want to put it in /usr/local/bin/ and make
a symlink to your nautilus folder, as you can run this script from the
command line.

I wrote this script and is always in "production" mode. I use it to
generate all my web albums.

To customize your HTML pages you simply create a .pixdir2htmlrc file
in the current directory. Please note that this script will
recursively find all pictures in the subsequent folders and apply the
same .pixdir2htmlrc file to them.

For a sample album, these are some pictures i took yesterday in the
New York Autoshow: http://lems.kiskeyix.org/images/vidaloca

E/a one of those pages are static (nothing magical there). The
.pixdir2htmlrc file looks like:

$> cat .pixdir2htmlrc
uri=http://lems.kiskeyix.org/images/vidaloca
# when header is set, there is no need
# to set title, meta, stylesheet, html_msg
# or body
header= <!DOCTYPE doctype PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" \
"http://www.w3.org/TR/REC-html40/loose.dtd"><html><head><!--lemsx1 at gmail.com \

[snip... this is long]

percentage=20%
title=
meta=
stylesheet=
html_msg=
body=<body bgcolor='white'>
p=<p>
table=<table border='0' cellspacing='0' cellpadding='4'>
td=<td valign='top' align='left'>
tr=<tr %%bgcolor%%>
footer=<!-- end pages --></td></tr></tbody></table><!-- start \
of the guest book --><center><table border="0" width="300" \

[snip ... this is long as well]

true">Mail</a></td></tr></tbody></table></center></body></html>
# image for .new
new=http://lems.kiskeyix.org/images/new.png
menuheader_footer=1
ext=html
menutype=modern
menuname=index

That means that for every new folder full of images i add to the
"vidaloca" folder, all i need to do is:
cd /path/to/vidaloca
pixdir2html

And all thumbnails and other nice things are generated for me.

The script works just as well from Nautilus as from the command line
(progressbar and everything).

The only dependency is perlmagick.

Enjoy.

--
----)(-----
Luis Mondesi
*NIX Guru

Kiskeyix.org

"We think basically you watch television to turn your brain off, and
you work on your computer when you want to turn your brain on" --
Steve Jobs in an interview for MacWorld Magazine 2004-Feb

No .doc: http://www.gnu.org/philosophy/no-word-attachments.es.html


More information about the ubuntu-users mailing list