JSON-based gallery

46 views
Skip to first unread message

Aurélien Naldi

unread,
May 7, 2013, 12:46:14 PM5/7/13
to nikola-...@googlegroups.com
Hi,

I have been playing a bit with nikola (after using hyde for a while and considering pelican), it really seems to do all I want and some more, but I would love a fancy gallery plugin.
It's not really a feature request as I'm ready to work on it myself, but I'd love to know if something like this is already in the work and if others would be interrested as well!

What I would like is quite similar to what photofloat (http://zx2c4.com/projects/photofloat/ and most probably a few other) do: generate JSON files describing the galleries and provide a javascript-based page to browse it.
A basic version would be fairly simple, but it can be much improved by showing some EXIF tags, geotagging information and more. In a perfect world, it would also include multiple alternative index pages, to show different sets of albums to different people by giving them a long link.
For now, I have a standalone proof of concept which loads JSON files for each album and for the album list on demand but does very little for now.

I'm currently using picasa (google+) for this, but I'd like to have a separate gallery. From picasa, I would mostly miss the "download album as zip" link, a "wget-friendly" index page would be easy to add, easy on resources and easy to use for command-line people. Do you know any better way?


Best.

Roberto Alsina

unread,
May 10, 2013, 10:01:02 AM5/10/13
to nikola-...@googlegroups.com
It would be rather easy to create a JSON file with all the data you want
for a gallery, and perhaps even JSON files with image metadata.

That per-gallery JSON file could be done right next to the index.html
generation in the gallery plugin, and the per-image JSON files done
along with the thumbnails.

Want to take a crack at it, I will be happy to assist.

One caveat: the gallery code is convoluted and in dire need of
refactoring and testing.

Aurélien Naldi

unread,
May 14, 2013, 3:18:35 PM5/14/13
to nikola-...@googlegroups.com
Hi Roberto,

As much as I like nikola, I'd like to have a small tool that can be used separately and just add some integration hooks for nikola.
I just went back to my prototype, did some improvements and pushed it to github. It's really simple, it only works as a standalone tool for now and better with firefox than chrome.
One caveat is that it loads JSON files on demand, chrome refuses to do that for local files. key event are also not working in chrome for now.

For now, it will just walk through a list of albums, generating thumbnails and writing JSON files. I'm want to collect some metadata from the filesystem (mostly modification date) as well as EXIF, but also let the user override them using YAML files (enforce the date, set album title, tags...). As a result it is quite different from the current gallery support.

Beside integration hooks for nikola (I'll probably ping you back if I'm stuck with it), I would like to add tags (at the album level), and geolocalisation.
You can play with the current code here: https://github.com/aurelien-naldi/JSON-gal

Let me know what you think and if you have specific whishes for nikola integration.
Note: as of now it only generates a JSON-based view but I would be ready to generate many pure HTML files as well (with a configuration switch)

Best.

--
Aurélien Naldi
Reply all
Reply to author
Forward
0 new messages