Giter Site home page Giter Site logo

goalbum's Introduction

goalbum

Build stand-alone, responsive image galleries for the web, from images on your hard drive.

This is basically a re-write of rpa in golang. Uses photoswipe and freewall for dynamic image display. All assets are compiled into the binary, so there is always only one file required for installation.

Example

https://www.andrewtongen.net/goalbum/

Installation

Download the latest release from the github releases page. Unzip and put the goalbum binary somewhere on your PATH.

Usage

Basic usage looks like this:

$ goalbum -in path/to/photo/directory -out path/to/html/output -title "My Cool Image Gallery"

Tagging, Author, Caption

To add tags to photos or update the author or caption, first generate the gallery, for example:

$ goalbum -in path/to/photo/directory -out path/to/html/output -title "My Cool Image Gallery"

Then, edit the photos.json file in the output directory. Update each photo entry accordingly by adding tags or other information. For example, this:

...
{
		"Id": "photo-6",
		"InPath": "/home/atongen/tmp/example/022.jpg",
		"Md5sum": "61aa461810008e0bb50a62ae39c7c1ee",
		"OriginalPath": "originals/022.jpg",
		"OriginalWidth": 1600,
		"OriginalHeight": 1063,
		"SlidePath": "slides/022.jpg",
		"SlideWidth": 1200,
		"SlideHeight": 797,
		"ThumbPath": "thumbs/022.jpg",
		"ThumbWidth": 300,
		"ThumbHeight": 199,
		"Caption": "022.jpg: Monday, October 10, 2016 at 10:33am",
		"Author": "",
		"Tags": null,
		"TagNames": null,
		"CreatedAt": "2016-10-10T10:33:51-05:00"
},
...

could be updated to this:

...
{
		"Id": "photo-6",
		"InPath": "/home/atongen/tmp/example/022.jpg",
		"Md5sum": "61aa461810008e0bb50a62ae39c7c1ee",
		"OriginalPath": "originals/022.jpg",
		"OriginalWidth": 1600,
		"OriginalHeight": 1063,
		"SlidePath": "slides/022.jpg",
		"SlideWidth": 1200,
		"SlideHeight": 797,
		"ThumbPath": "thumbs/022.jpg",
		"ThumbWidth": 300,
		"ThumbHeight": 199,
		"Caption": "Photo taken on Monday, October 10, 2016 at 10:33am",
		"Author": "Andrew Tongen",
		"Tags": ["Alice", "Bob"],
		"TagNames": null,
		"CreatedAt": "2016-10-10T10:33:51-05:00"
},
...

Then update the gallery:

$ goalbum -in path/to/photo/directory -out path/to/html/output -title "My Cool Image Gallery" -update

You can also quickly add and remove images from your gallery using this technique. Keep your input directory around until your certain you like the way your gallery looks.

Command Line Options

$ goalbum -h
Usage of goalbum:
  -body-content="": Path to file whose content should be included prior to the closing of the body element
  -color="blue": CSS colors to use (http://materializecss.com/color.html#palette)
  -exiftool="": Provide path to exiftool. If empty, PATH will be searched
  -head-content="": Path to file whose content should be included prior to the closing of the head element
  -in="": The input directory where images can be found
  -include=[]: File to include in document root of gallery
  -max-slide=1200: Maximum pixel dimension of slide images
  -max-thumb=300: Maximum pixel dimension of thumbnail images
  -out="": The output directory where the static gallery will be generated
  -subtitle="": Subtitle of album
  -title="": Title of album
  -update=false: If output directory is existing gallery, update instead of replace
  -version=false: Show the version and exit.

Building

Requirements

$ git clone [email protected]/atongen/goalbum.git
$ cd goalbum
$ make

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

goalbum's People

Contributors

atongen avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.