For a demo, visit rnpix.github.io.
The photo library is organized into "day" directories of the form
YYYY/MM-DD/*.{jpg,mov,...}
. In each day directory, index.txt
contains:
foo.jpg Some description for foo on one line
bar.mov A movie of something
The file may have comments with a #
starting on the first character. (Historical version allows a :
after the image name.)
The tools search YY/MM-DD
directories to create index.txt
and uses it to create a searchable, static HTML tree:
- identify appends to
index.txt
from the images in a day directory, prompting the user for each unidentified image. - generate reads
index.txt
to createindex.html
and thumbnail directories50
(pixel) and200
, which are referenced inindex.html
- indexer reads
index.txt
to creaternpix-index.js
, which is read by rnindex to find images by their description. - fix reads
index.txt
and images in directory, and verifies and fixes the format.
Thanks to the excellent js-search by Carsten Brandt. It was first transliterated from the PHP
to Python, and then rewritten to match the picture indexing problem,
which was significantly different from the general HTML problem js-search
solves. I wouldn't have gotten the idea of how to implement a search
engine in Javascript without Carsten's project.
The rest of the code is all mine and evolved over a couple of decades from a collection of simple Perl programs to be transformed this year to Python.
License: http://www.apache.org/licenses/LICENSE-2.0.html
Copyright (c) 2016 Robert Nagler. All Rights Reserved.