diff --git a/generate-html.py b/generate_html.py old mode 100644 new mode 100755 similarity index 54% rename from generate-html.py rename to generate_html.py index 0ad20bf..31255f6 --- a/generate-html.py +++ b/generate_html.py @@ -1,17 +1,19 @@ #!/usr/bin/env python3 -import sys import os +import argparse import urllib.parse from multiprocessing import Pool +from string import Template import numpy as np """ root and webroot must point to the same folder, one on filesystem and one on the webserver. Use absolut paths, e.g. /data/pictures/ and https://pictures.example.com/ """ -ROOT = "/mnt/nfs/pictures/" -WEBROOT = "https://pictures.sorogon.eu/" -FOLDERICON = "https://www.svgrepo.com/show/400249/folder.svg" +_ROOT = "/mnt/nfs/pictures/" +_WEBROOT = "https://pictures.sorogon.eu/" +_FOLDERICON = "https://www.svgrepo.com/show/400249/folder.svg" +_ROOTTITLE = "Pictures" imgext = [".jpg", ".jpeg"] rawext = [".3fr", ".ari", ".arw", ".bay", ".braw", ".crw", ".cr2", ".cr3", ".cap", ".data", ".dcs", ".dcr", ".dng", ".drf", ".eip", ".erf", ".fff", ".gpr", ".iiq", ".k25", ".kdc", ".mdc", ".mef", ".mos", ".mrw", ".nef", ".nrw", ".obm", ".orf", ".pef", ".ptx", ".pxn", ".r3d", ".raf", ".raw", ".rwl", ".rw2", ".rwz", ".sr2", ".srf", ".srw", ".tif", ".tiff", ".x3f"] @@ -23,7 +25,7 @@ HTMLHEADER = """
-