Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyclenerd/gallery_shell
📷 Bash Script to generate static responsive image web galleries.
https://github.com/cyclenerd/gallery_shell
bash bash-hacks bash-script exif-data-extraction galleries gallery gh-pages html image-galleries image-gallery jpeg mov mp4 photo photos shell simple thumbnails
Last synced: 13 days ago
JSON representation
📷 Bash Script to generate static responsive image web galleries.
- Host: GitHub
- URL: https://github.com/cyclenerd/gallery_shell
- Owner: Cyclenerd
- License: gpl-3.0
- Created: 2016-11-06T11:35:27.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-22T12:12:12.000Z (11 months ago)
- Last Synced: 2024-10-16T17:39:50.066Z (27 days ago)
- Topics: bash, bash-hacks, bash-script, exif-data-extraction, galleries, gallery, gh-pages, html, image-galleries, image-gallery, jpeg, mov, mp4, photo, photos, shell, simple, thumbnails
- Language: Shell
- Homepage: https://cyclenerd.github.io/gallery_shell/
- Size: 10.6 MB
- Stars: 240
- Watchers: 13
- Forks: 37
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# gallery.sh
[![Badge: GNU Bash](https://img.shields.io/badge/GNU%20Bash-4EAA25.svg?logo=gnubash&logoColor=white)](https://github.com/Cyclenerd/gallery_shell#readme)
[![Badge: Linux](https://img.shields.io/badge/Linux-FCC624.svg?logo=linux&logoColor=black)](https://github.com/Cyclenerd/gallery_shell#readme)
[![Badge: Apple](https://img.shields.io/badge/Apple-000000.svg?logo=apple&logoColor=white)](https://github.com/Cyclenerd/gallery_shell#readme)
[![Badge: License](https://img.shields.io/github/license/cyclenerd/gallery_shell)](https://github.com/Cyclenerd/gallery_shell/blob/master/LICENSE)
[![Badge: ShellCheck](https://github.com/Cyclenerd/gallery_shell/actions/workflows/shellcheck.yml/badge.svg?branch=master)](https://github.com/Cyclenerd/gallery_shell/actions/workflows/shellcheck.yml)
[![Badge: Ubuntu](https://github.com/Cyclenerd/gallery_shell/actions/workflows/ubuntu.yml/badge.svg?branch=master)](https://github.com/Cyclenerd/gallery_shell/actions/workflows/ubuntu.yml)
[![Badge: macOS](https://github.com/Cyclenerd/gallery_shell/actions/workflows/macos.yml/badge.svg?branch=master)](https://github.com/Cyclenerd/gallery_shell/actions/workflows/macos.yml)Bash Script to generate static web galleries. No server-side programs (i.e. PHP, MySQL) required.
## Overview
`gallery.sh` is simple bash shell script which generates static html thumbnail (image, photo) galleries using the `convert` and `jhead` command-line utilities.
It requires no special server-side script to run to view image galleries because everything is pre-rendered.It offers several features:
* Responsive layout
* Thumbnails which fill the browser efficiently
* Download the original image file
* Nice and simple Bootstrap CSS layout
* Locally previewable galleries by accessing images locally (e.g. `file:///home/nils/pics/gallery/index.html`)
* JPEG header EXIF data extraction
* Auto-rotation of vertical imagesThis combination of features makes a better user experience than pretty much all the big online photo hosts.
All you need is a place to host your plain html and jpeg files. This can also be Amazon S3.## Installation
Download Bash script `gallery.sh`:
```shell
curl -O "https://raw.githubusercontent.com/Cyclenerd/gallery_shell/master/gallery.sh"
```## Requirements
* [ImageMagick](http://www.imagemagick.org/) for the `convert` utility.
* [JHead](http://www.sentex.net/~mwandel/jhead/) for EXIF data extractionOn a debian-based system (Ubuntu), just run:
```shell
sudo apt install imagemagick jhead
```Under macOS you can install it with...
[MacPort](https://www.macports.org/):
```shell
sudo port install imagemagick jhead
```[Homebrew](https://brew.sh/):
```shell
brew install imagemagick jhead
```## Usage
```text
gallery.sh [-t ] [-d ] [-h]:
[-t ] sets the title (default: Gallery)
[-d ] sets the thumbdir (default: __thumbs)
[-h] displays help (this message)
```Example: `gallery.sh` or `gallery.sh -t "My Photos" -d "thumbs"`
`gallery.sh` works in the **current** directory.
Just load the `index.html` in a browser see the output.The directory should contain a bunch of JPEG (.jpg or .JPG) files.
It does not work recursively.
ZIP files (.zip or .ZIP) and movies (.mov, .MOV, .mp4 or .MP4) are also considered.
They appear as a download button in the gallery.## Hint
Create a Bash alias for `gallery.sh`.
Open the `~/.bash_profile`, `~/.bashrc` or `~/.bash_aliases` in your text editor:
```shell
nano ~/.bash_aliases
```Add your alias:
```shell
alias gallery='/home/nils/gallery_shell/gallery.sh'
```## Demo
This [demo page](https://cyclenerd.github.io/gallery_shell/) is generated with [GitHub Action](https://github.com/Cyclenerd/gallery_shell/blob/master/.github/workflows/main.yml):
## Screenshots
[![Screenshot: Gallery](images/gallery.jpg)](https://cyclenerd.github.io/gallery_shell/)
[![Screenshot: Image](images/image.jpg)](https://cyclenerd.github.io/gallery_shell/thumbs/Landscape_8.jpg.html)
## License
GNU Public License version 3.
Please feel free to fork and modify this on GitHub ().