Skip to content
/ sig Public

simple image gallery -- static site generator for image galleries

Notifications You must be signed in to change notification settings

eikek/sig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

simple image gallery

This script is a static html image gallery generator in scheme. It takes a folder with images (and/or videos) and generates a html file with an image gallery utilising this gallery program. Images are resized and thumbnails are created. Videos are all converted to webm files. The images are sorted by their timestamp, where the exif date-time value is used if available and otherwise the file last modification timestamp.

Setup

Some external programs are needed:

ffmpeg is only used to convert video files.

Then guile scheme is needed to run the script.

Usage

You need a folder with images. Then

$ mkdir mygallery && cd mygallery
$ sig make-all -i /path/to/images
$ firefox index.html

The make-all commands creates the gallery given a folder with images. More commands are shown below.

create

Creates a new gallery outline.

Creates a new gallery outline in the directory specified by the first argument. If omitted, the current directory is used. The folders ‘images’, ‘thumbnails’ and ‘resources’ are created. The ‘resources’ folder is populated with javascript and css files.

The gallery can then be created using ‘sig make-all’.

create-template

Create a minimal html template file.

Sig allows to take a custom html file and replace certain placeholders with image gallery components:

  • ${sig-js} javascript files
  • ${sig-head} things that should go in html-head section (css stylesheets)
  • ${sig-box} html snippets for the modal dialog (this should be a direct child of the html-body element)
  • ${sig-links} the list of links to the images (this should be inside bootstrap’s content div)

By default a very basic html template is used. This command writes the default template in a file ‘*sig/default-template-file for modifying it. Note that sig replaces the whole line containing such a variable.

help

Displays some help text.

make-all

Creates the gallery by processing given images.

  • --html template (-h) a html template file to use
  • --thumbsize size (-t) the thumbnail size (default is 150)
  • --size size (-s) the image size (default is 1200)
  • --in dir (-i) the directory with image files (default is ‘original’)
  • --recursive (-r) traverse DIR recursiveley
  • --parallel (-p) resize images in parallel (using all cores)
  • --overwrite (-o) all existing files are overwritten, default is to only write new files
  • --download-links (-d) Create download links to each original file

After image/video files have been processed, the html file is generated.

make-html

Generates the html file only.

It assumes that image/video files have been processed already and exist in ‘images’ and ‘thumbnails’, respectively.

  • --html template (-h) a html template file to use
  • --in dir (-i) the directory with image files (default is ‘original’)
  • --recursive (-r) traverse DIR recursiveley
  • --download-links (-d) Create download links to each original file

version

Display the version and a list of commands.

Not implemented

  • make external commands configurable (to add other switches etc)
  • package command (create zip file)

Credits

This script only composes great work of others:

License

Copyrighted by me, distributed under GPLv3 or later.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with GNU Emacs; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

About

simple image gallery -- static site generator for image galleries

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages