You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
thumbsup/README.md

108 lines
4.6 KiB
Markdown

8 years ago
# thumbsup
10 years ago
[![NPM](http://img.shields.io/npm/v/thumbsup.svg?style=flat)](https://npmjs.org/package/thumbsup)
8 years ago
[![License](http://img.shields.io/npm/l/thumbsup.svg?style=flat)](https://github.com/thumbsup/node-thumbsup)
[![Travis CI](https://travis-ci.org/thumbsup/node-thumbsup.svg?branch=master)](https://travis-ci.org/thumbsup/node-thumbsup)
8 years ago
[![Dependencies](http://img.shields.io/david/thumbsup/node-thumbsup.svg?style=flat)](https://david-dm.org/thumbsup/node-thumbsup)
[![Dev dependencies](https://david-dm.org/thumbsup/node-thumbsup/dev-status.svg?style=flat)](https://david-dm.org/thumbsup/node-thumbsup?type=dev)
8 years ago
![banner](banner.jpg)
8 years ago
Turn any folder with photos & videos into a web gallery.
10 years ago
- thumbnails & multiple resolutions for fast previews
8 years ago
- mobile friendly website with customisable themes
- only rebuilds changed files: it's fast!
10 years ago
- uses relative paths so you can deploy the pages anywhere
- works great with Amazon S3 for static hosting
8 years ago
## Quick start
10 years ago
8 years ago
Simply point `thumbsup` to a folder with photos & videos. All nested folders become separate albums.
8 years ago
*Requirements*
- [Node.js](http://nodejs.org/): `brew install Node`
- [exiftool](http://www.sno.phy.queensu.ca/~phil/exiftool/): `brew install exiftool`
- [GraphicsMagick](http://www.graphicsmagick.org/): `brew install graphicsmagick`
- [FFmpeg](http://www.ffmpeg.org/): `brew install ffmpeg`
```bash
8 years ago
npm install thumbsup
thumbsup --input ./media --output ./website
10 years ago
```
8 years ago
There are many more command line arguments to customise the output.
You can also run `thumbsup` as a Docker container which pre-packages all dependencies like `ffmpeg`.
See the website for the full documentation: https://thumbsup.github.io.
8 years ago
8 years ago
## Sample gallery
8 years ago
See a sample gallery online at https://thumbsup.github.io/demos/themes/mosaic/
8 years ago
![sample gallery](screenshot.png)
10 years ago
8 years ago
## Command line arguments
10 years ago
This reflects the CLI for the latest code on `master`.
8 years ago
For the latest published version please refer to the [docs on the website](https://thumbsup.github.io).
8 years ago
<!-- START cli -->
```
8 years ago
Usages:
thumbsup [required] [options]
thumbsup --config config.json
Required:
--input Path to the folder with all photos/videos [string] [required]
--output Output path for the static website [string] [required]
Options:
--help Show help [boolean]
--index Filename of the home page [default: "index.html"]
8 years ago
--title Website title [default: "Photo album"]
--footer Text or HTML footer [default: null]
8 years ago
--thumb-size Pixel size of the square thumbnails [number] [default: 120]
--large-size Pixel height of the fullscreen photos [number] [default: 1000]
--original-photos Allow download of full-size photos [boolean] [default: false]
--original-videos Allow download of full-size videos [boolean] [default: false]
--albums-output-folder Output subfolder for HTML albums (default: root of gallery) [default: "."]
8 years ago
--albums-from How to group media into albums [choices: "folders", "date"] [default: "folders"]
--albums-date-format How albums are named in <date> mode [moment.js pattern] [default: "YYYY-MM"]
--sort-folders How to sort albums [deprecated] [choices: "name", "date"]
7 years ago
--sort-albums-by How to sort albums [choices: "title", "start-date", "end-date"] [default: "start-date"]
8 years ago
--sort-albums-direction Album sorting direction [choices: "asc", "desc"] [default: "asc"]
--sort-media-by How to sort photos and videos [choices: "filename", "date"] [default: "date"]
--sort-media-direction Media sorting direction [choices: "asc", "desc"] [default: "asc"]
--theme Name of the gallery theme to apply [choices: "classic", "cards", "mosaic"] [default: "classic"]
--css Path to a CSS/LESS file for styling [string]
--google-analytics Code for Google Analytics tracking [string]
--config Path to JSON config file [string]
8 years ago
The optional JSON config should contain a single object with one key per argument, not including the leading "--". For example:
8 years ago
{ "sort-albums-by": "start-date" }
```
8 years ago
<!-- END cli -->
10 years ago
8 years ago
## Contributing
10 years ago
We welcome all [issues](https://github.com/thumbsup/node-thumbsup/issues)
and [pull requests](https://github.com/thumbsup/node-thumbsup/pulls)!
If you are facing any issues or getting crashes, you can run `thumbsup` in debug mode
to get a verbose troubleshooting log of all operations:
```bash
DEBUG="*" thumbsup [options]
```
Please make sure the tests are passing when submitting a code change:
```bash
./scripts/cibuild
```