GithubHelp home page GithubHelp logo

cyclenerd / gallery_shell Goto Github PK

View Code? Open in Web Editor NEW
239.0 13.0 39.0 10.89 MB

๐Ÿ“ท Bash Script to generate static responsive image web galleries.

Home Page: https://cyclenerd.github.io/gallery_shell/

License: GNU General Public License v3.0

Shell 100.00%
bash image-galleries jpeg exif-data-extraction mov mp4 gallery galleries bash-hacks bash-script

gallery_shell's Introduction

gallery.sh

Badge: GNU Bash Badge: Linux Badge: 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).

gallery_shell's People

Contributors

cyclenerd avatar dependabot[bot] avatar mbankston avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gallery_shell's Issues

PNG and GIF images.

Hello, will PNG and GIF images be supported by online viewing? At present, it can only view JPG images.

Requestions gif-autoplay, adapting grid view style; show videos as thumbnails

Hi Nils,

great application! I was searching for something like this for days now :)

I want to change some of the code to view the images like this style: https://masonry.desandro.com/

Also I want to change that the Video Files will be previewed with Thumbnails (like images) and that the gifs autoplay in the overview section.

So why i am telling you this and not changing it by myself. I am a relativly newbie to this topic.
Can you give me some hints where to start right with these changes? :)

kind regards!

index.html layout is affected by different image sizes

Screenshot_2023-02-15_15-36-15

Hi!
I have images in 3:2 and 16:9 proportions in one directory. After running the gallery_shell script, I have an irregular looking layout in index.html, with images (almost?) overlapping.
I do not have the skill to fix this. Can you?
Thanks.

How to make it always display 3 columns?

I'm not very good with css. What I want is to always have 3 column layout regardless of screen size (including on mobile) instead of cutting columns on smaller screens, and adjust the displayed image size so it fits well. Have no idea how to do this with this bootstrapped css.

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.