I'm planning to set up xml editing while browsing the output to make it easier to annotate the gallery.

If running Windows, simplify the path:

subst p: c:\full path to the parent directory of sourcedir

I run Python code in IPython.
My readline module fails on XP so my ipython.ini sets colors to NoColor.

Start IPython

In [1]: run -e ./programs/gallery2.py -s p:/sourcedir -d p:/destdir
In [2]: run -e ./programs/gallery2.py -x -s p:/sourcedir 
| © 2005 Ken Staton