Web Static Gallery Generator

I have time now to develop some projects I left unattended this last three weeks, one of them was
the web gallery generator I talked about before.

Today I have implemented some goodies and now the generator output is easier to configure. We have new options
from the command line and the source of the gallery shouldn't be the same directory as the destiny.
I've also added a simple server to check everything is fine during development and to debug custom templates
if someone does it. There's also the possibility to reload the gallery, this wasn't possible before.

If you want to use it and change the template of the gallery, you could build your own using jinja syntax,
adding it to the templates directory, and finally selecting it from the command line with the --template-gallery option.

This is the help from the command line:


    usage: generator.py [-h] [--template-gallery TEMPLATE_GALLERY]
                    [--template-menu TEMPLATE_MENU] [--src SRC] [--dst DST]
                    [--server] [--port PORT] [--reload]

    Static Gallery Generator Options.

    optional arguments:
      -h, --help            show this help message and exit
      --template-gallery TEMPLATE_GALLERY
                            Choose the name of the template for the gallery
      --template-menu TEMPLATE_MENU
                            Choose the template for the menu
      --src SRC             Source directory for the gallery
      --dst DST             Destiny where the web gallery will be generated
      --server              Executes a server
      --port PORT           Choose the port for the server, by default 8000
      --reload              Reload all galleries, even if they exist in the
                            destiny

The next step could be to create a pip package, I think I don't need more features, but we will see.
If you are interested you can check/fork the code in github
or see an example.

Javier Aguirre

Read more posts by this author.

comments powered by Disqus