• Stars
    star
    241
  • Rank 167,643 (Top 4 %)
  • Language
    Shell
  • License
    GNU General Publi...
  • Created about 8 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ“· Bash Script to generate static responsive image web galleries.

gallery.sh

Bagde: GNU Bash Bagde: Linux Bagde: Apple Badge: License Badge: ShellCheck Badge: Ubuntu Badge: macOS

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 images

This 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:

curl -O "https://raw.githubusercontent.com/Cyclenerd/gallery_shell/master/gallery.sh"

Requirements

On a debian-based system (Ubuntu), just run:

sudo apt install imagemagick jhead

Under macOS you can install it with...

MacPort:

sudo port install imagemagick jhead

Homebrew:

brew install imagemagick jhead

Usage

gallery.sh [-t <title>] [-d <thumbdir>] [-h]:
	[-t <title>]     sets the title (default: Gallery)
	[-d <thumbdir>]  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:

nano ~/.bash_aliases

Add your alias:

alias gallery='/home/nils/gallery_shell/gallery.sh'

Demo

This demo page is generated with GitHub Action: https://cyclenerd.github.io/gallery_shell/

Screenshots

Screenshot: Gallery

Screenshot: Image

License

GNU Public License version 3. Please feel free to fork and modify this on GitHub (https://github.com/Cyclenerd/gallery_shell).

More Repositories

1

ethereum_nvidia_miner

πŸ’° USB flash drive ISO image for Ethereum, Zcash and Monero mining with NVIDIA graphics cards and Ubuntu GNU/Linux (headless)
Shell
854
star
2

static_status

🚦Bash script to generate a static status page.
Shell
533
star
3

google-cloud-compute-machine-types

☁️ Choose the optimal Google Compute Engine machine type or instance in the many Google Cloud Platform regions
Perl
230
star
4

postinstall

πŸ’» Bash Script to automate post-installation steps
Shell
155
star
5

google-cloud-pricing-cost-calculator

πŸ’Έ Calculate estimated monthly costs of Google Cloud Platform products and resources via YAML files and CLI program (Linux, macOS, Windows)
Perl
141
star
6

google-cloud-gcp-openai-api

🌴 Drop-in replacement REST API for Vertex AI (PaLM 2, Codey, Gemini) that is compatible with the OpenAI API specifications
Jupyter Notebook
86
star
7

benchmark

πŸ‹οΈ Bash Script which runs several Linux benchmarks (Sysbench, UnixBench and Geekbench)
Shell
55
star
8

poweroff-google-cloud-cap-billing

πŸ“΄ Automating cost control by capping Google Cloud billing
HCL
41
star
9

aws-pricing

πŸ’Έ Choose the optimal Amazon EC2 instance type in the many AWS locations
Perl
28
star
10

google-cloud-litellm-proxy

πŸš… LiteLLM Proxy for Google Cloud Generative AI
Dockerfile
27
star
11

Latrine

πŸ“‘ Locus Map GPS Live Tracking Server Script
HTML
14
star
12

google-cloud-server-on-demand

▢️ Server on Demand Appliance (Google Compute Engine) - Cloud Build with Terraform and Ansible Showcase
HCL
12
star
13

google-cloud-shell-vscode

β›… Run OpenVSCode Server in Google Cloud Shell
Shell
11
star
14

google-workload-identity-federation

πŸ” Google Cloud Workload Identity Federation Examples and How-To
11
star
15

scp-tools-gitlab

🦊 Docker Image with SAP Cloud Platform Tools (SAP Business Technology Platform) optimized for GitLab Runner and Google Cloud Build
Dockerfile
11
star
16

cloud-tools-container

πŸ“¦ Ready-to-use Docker container image with cloud tools (AWS CLI, Google Cloud CLI, Terraform, Packer, Ansible)
Dockerfile
9
star
17

sap-on-gcp-scripts

β˜• SAP on Google Cloud Platform Boilerplate
Shell
8
star
18

iot-maneki-neko

🐱 IoT Maneki-Neko (Beckoning Cat, Luck Cat, Winkekatze)
C++
8
star
19

toolbox

πŸ”§ Toolbox - Script Collection
Jupyter Notebook
7
star
20

macos-missing-shutdown-app

🍎 macOS Shutdown, Restart, Sleep and Log Out App
6
star
21

iot-weather-mqtt

☁️ WiFi Weather Sensor that talks MQTT (SAP IoT Cloud Ready)
C++
6
star
22

quarqd

πŸ’‘ quarqd is a daemon for communicating with an ANT+ device
C
5
star
23

obs-emoji

πŸ˜ƒ Emoji Live Reactions Animation for OBS (Open Broadcaster Software)
HTML
5
star
24

google-cloud-iam

☁️ Google Cloud Identity and Access Management (IAM)
Perl
4
star
25

dotfiles

⌨ My dotfiles and script to perform user-defined configurations
Shell
4
star
26

notify-me

πŸ“Ÿ CLI scripts to get notified via MS Teams, Discord, Pushover, sipgate SMS and many more...
Perl
4
star
27

terraform-google-wif-github

πŸ” Terraform module to create a Google Cloud Workload Identity Pool and Provider for GitHub Actions
HCL
3
star
28

terraform-google-quota-limits

πŸŒͺ️ Terraform module to update Google Cloud consumer quota limits
HCL
3
star
29

blocklocker

πŸ”— IoT Blockchain Locker
Perl
3
star
30

veloherodown

🚴 Create a local copy of your Velo Hero data
Shell
3
star
31

terraform-google-wif-gitlab

πŸ” Terraform module to create a Google Cloud Workload Identity Pool and Provider for GitLab CI
HCL
3
star
32

qmk-massdrop-ctrl

⌨️ My custom QMK Massdrop CTRL firmware
C
2
star
33

terraform-google-wif-service-account

πŸ” Terraform module to allow login via Google Cloud Workload Identity Pool and Provider for service accounts
HCL
2
star
34

google-cloud-appengine-mail-api

πŸ“§ Create your own Mail API based on Google App Engine (GAE)
Python
2
star
35

iot-consumption

☁️ SAPUI5 app for the built-in MMS OData API from the SAP Cloud IoT
JavaScript
2
star
36

google-cloud-gcp-pfsense

☁️ Connect your pfSense firewall to the Google Cloud Platform (GCP) via IPsec VPN (even with non-static IP address)
Shell
2
star
37

Cyclenerd

😎 My GitHub Profile README
1
star
38

google-cloud-unused-service-accounts

πŸ€– Detect unused Service Accounts in Google Cloud Platform
Shell
1
star
39

google-cloud-identity-platform

πŸ”‘ Google Cloud Identity Platform Examples and How-To (Sign in with GitHub, GitLab, Microsoft, Google)
HTML
1
star
40

SapMachineInstaller

SapMachine (SAP supported version of OpenJDK) Windows Installer
NSIS
1
star
41

veloheroup

🚴 Command line interface for uploading to Velo Hero
Shell
1
star