Articles in the Uncategorized category

  1. 'Improved' Image Gallery for Blogofile

    Fri 21 January 2011

    This blog is just static HTML pages that are generated using Blogofile. The Blogofile website sports a small image gallery that has been written to illustrate how to create your own 'controllers' or Blogofile plugins.

    My Python skills are horrible buy I managed to improve a bit on this example photo gallery. If you click on the 'Photos' menu at the top of this blog, you can see an example of the result.

    What is the improvement?

    • Basically one thing: it create a gallery by traversing recursively over a directory structure containing pictures.

    How to install?

    1. Just create a folder where you will store pictures.

    2. Add this to your _config.py

    photo_gallery = controllers.photo_gallery

    photo_gallery.enabled = True

    photo_gallery.path = "pictures"

    1. put this file into _controllers/photo_gallery
    2. enter into this gallery and create a symlink like:

    ln -s photo_gallery.py __init__.py

    1. download the example templates here.

    Additional info

    This photo gallery generator ignores symlinks. However, it looks for a special file name in every directory:

    showcase.jpg
    

    This file can be a symnlink to one of the photo's. It is used as the identifying picture for a folder with pictures. Every directory should contain at least a single showcase.jpg.

    If you have a folder called Europe containing two sub folders England and France, you can create a showcase.jpg symlink to one of the underlying showcase files of one of the folders. This picture will then be used to 'identify' the "Europe" folder.

    Example directory tree:

    ./Europe
    ./Europe/England
    ./Europe/England/London
    ./Europe/England/London/showcase.jpg
    ./Europe/England/showcase.jpg
    ./Europe/France
    ./Europe/France/Nice
    ./Europe/France/Nice/showcase.jpg
    ./Europe/France/showcase.jpg
    ./Europe/Netherlands
    ./Europe/Netherlands/Enkhuizen
    ./Europe/Netherlands/Enkhuizen/showcase.jpg
    ./Europe/Netherlands/showcase.jpg
    ./Europe/showcase.jpg
    ./USA
    ./USA/New York
    ./USA/New York/showcase.jpg
    ./USA/showcase.jpg
    
    If you have any comments email me, see the About page for contact details.
  2. Migration From Blogger to Blogofile and Disqus Is Complete

    Tue 04 January 2011

    As stated in my previous post, I migrated all posts from blogger.com to my own host running blogofile. At the time of my previous post, I was not able to restore all comments made on my old blog. Thanks to some help from disqcus I fixed an error on my behalf and all old comments from my older blog appeared on the appropriate pages.

    This completes the transition from blogger to blogofile and discus (for comments).

    I'm now working on a controller for blogofile that recursively generates a static HTML photo blog. Relearning Python along the way. When working properly, the code will be made available so other people can at least have a good laugh.

    This blog is now running on an old Intel based Mac Mini, also acting as a firewall.

    mini

    If you have any comments email me, see the About page for contact details.

Page 12 / 40