summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/dependabot.yml6
-rw-r--r--.github/workflows/demo_page.yml26
-rw-r--r--.github/workflows/macos.yml26
-rw-r--r--.github/workflows/shellcheck.yml32
-rw-r--r--.github/workflows/ubuntu.yml27
-rw-r--r--CONTRIBUTING.md30
-rw-r--r--PULL_REQUEST_TEMPLATE.md11
-rw-r--r--README.md112
-rw-r--r--images/demo/Example_images.zipbin2179019 -> 0 bytes
-rw-r--r--images/demo/Example_images_LICENSE.txt19
-rw-r--r--images/demo/Example_video_LICENSE.txt6
-rw-r--r--images/demo/Landscape_1.jpgbin139435 -> 0 bytes
-rw-r--r--images/demo/Landscape_2.jpgbin137359 -> 0 bytes
-rw-r--r--images/demo/Landscape_3.jpgbin140965 -> 0 bytes
-rw-r--r--images/demo/Landscape_4.jpgbin140588 -> 0 bytes
-rw-r--r--images/demo/Landscape_5.jpgbin137611 -> 0 bytes
-rw-r--r--images/demo/Landscape_6.jpgbin137628 -> 0 bytes
-rw-r--r--images/demo/Landscape_7.jpgbin140645 -> 0 bytes
-rw-r--r--images/demo/Landscape_8.jpgbin141286 -> 0 bytes
-rw-r--r--images/demo/Portrait_1.jpgbin129059 -> 0 bytes
-rw-r--r--images/demo/Portrait_2.jpgbin136072 -> 0 bytes
-rw-r--r--images/demo/Portrait_3.jpgbin135813 -> 0 bytes
-rw-r--r--images/demo/Portrait_4.jpgbin131520 -> 0 bytes
-rw-r--r--images/demo/Portrait_5.jpgbin133715 -> 0 bytes
-rw-r--r--images/demo/Portrait_6.jpgbin136257 -> 0 bytes
-rw-r--r--images/demo/Portrait_7.jpgbin135366 -> 0 bytes
-rw-r--r--images/demo/Portrait_8.jpgbin132543 -> 0 bytes
-rw-r--r--images/demo/Video.mp4bin4788565 -> 0 bytes
-rw-r--r--images/gallery.jpgbin245473 -> 0 bytes
-rw-r--r--images/image.jpgbin155145 -> 0 bytes
-rw-r--r--test.sh38
31 files changed, 2 insertions, 331 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
deleted file mode 100644
index 5ace460..0000000
--- a/.github/dependabot.yml
+++ /dev/null
@@ -1,6 +0,0 @@
-version: 2
-updates:
- - package-ecosystem: "github-actions"
- directory: "/"
- schedule:
- interval: "weekly"
diff --git a/.github/workflows/demo_page.yml b/.github/workflows/demo_page.yml
deleted file mode 100644
index 5dba6da..0000000
--- a/.github/workflows/demo_page.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: "Update gallery.sh demo page"
-on:
- workflow_dispatch:
-
-jobs:
- build-and-deploy:
- runs-on: ubuntu-latest
- steps:
- - name: Dependencies 🔧
- run: sudo apt-get install imagemagick jhead
- - name: Checkout 🛎️
- uses: actions/checkout@v3
- - name: Build 🖼️
- run: |
- ls -lah
- mkdir -p build/
- cp images/demo/* build/
- cd build/
- ls -lah
- bash ../gallery.sh -t "Demo Gallery" -d "thumbs"
- # https://github.com/marketplace/actions/deploy-to-github-pages
- - name: Deploy 🚀
- uses: JamesIves/github-pages-deploy-action@v4
- with:
- branch: gh-pages # The branch the action should deploy to.
- folder: build # The folder the action should deploy. \ No newline at end of file
diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml
deleted file mode 100644
index 2ebd53d..0000000
--- a/.github/workflows/macos.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: "macOS"
-
-on:
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
-
- workflow_dispatch:
-
-jobs:
- macos-11:
- name: Test macOS
- runs-on: macos-latest
- steps:
- - name: Install dependencies 🔧
- run: brew install imagemagick jhead
-
- - name: Checkout 🛎️
- uses: actions/checkout@v3
-
- - name: Get assert.sh 🎁
- run: curl -f "https://raw.githubusercontent.com/lehmannro/assert.sh/v1.1/assert.sh" -o assert.sh
-
- - name: Test 🛠️
- run: bash test.sh \ No newline at end of file
diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml
deleted file mode 100644
index 3016d6a..0000000
--- a/.github/workflows/shellcheck.yml
+++ /dev/null
@@ -1,32 +0,0 @@
-name: "ShellCheck"
-
-# Controls when the workflow will run
-on:
- # Triggers the workflow on push or pull request events but only for the master branch
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
-
- # Allows you to run this workflow manually from the Actions tab
- workflow_dispatch:
-
-# A workflow run is made up of one or more jobs that can run sequentially or in parallel
-jobs:
- # This workflow contains a single job called "test"
- shellcheck:
- # The type of runner that the job will run on
- runs-on: ubuntu-latest
-
- # Steps represent a sequence of tasks that will be executed as part of the job
- steps:
- - name: Install dependencies 🔧
- run: sudo apt-get install shellcheck
-
- # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- - name: Checkout 🛎️
- uses: actions/checkout@v3
-
- # Run ShellCheck
- - name: ShellCheck 🔎
- run: shellcheck gallery.sh \ No newline at end of file
diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml
deleted file mode 100644
index fca5534..0000000
--- a/.github/workflows/ubuntu.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-name: "Ubuntu"
-
-on:
- push:
- branches: [ master ]
- pull_request:
- branches: [ master ]
-
- workflow_dispatch:
-
-jobs:
- ubuntu-2004:
- name: Test Ubuntu
- runs-on: ubuntu-latest
- steps:
-
- - name: Dependencies 🔧
- run: sudo apt-get install imagemagick jhead
-
- - name: Checkout 🛎️
- uses: actions/checkout@v3
-
- - name: Get assert.sh 🎁
- run: curl -f "https://raw.githubusercontent.com/lehmannro/assert.sh/v1.1/assert.sh" -o assert.sh
-
- - name: Test 🛠️
- run: bash test.sh \ No newline at end of file
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index dbf9308..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,30 +0,0 @@
-# How to contribute
-
-First off, thanks for taking the time to contribute!
-
-## Submitting changes
-
-Please send a [GitHub Pull Request](https://github.com/Cyclenerd/gallery_shell/pull/new/master) with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)).
-
-Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:
-
-```
-$ git commit -m "A brief summary of the commit
->
-> A paragraph describing what changed and its impact."
-```
-
-## Coding style
-
-Start reading the code and you'll get the hang of it. It is optimized for readability:
-
-* Variables must be uppercase and should begin with `MY_`.
-* Functions must be lower case.
-* Check your shell scripts with [ShellCheck](https://www.shellcheck.net/) before submitting.
-* Please use tabs to indent.
-
-One more thing:
-
-* Keep it simple! 👍
-
-Thanks! ❤️❤️❤️ \ No newline at end of file
diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index f2c9c5a..0000000
--- a/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,11 +0,0 @@
-First off, thanks for taking the time to contribute!
-
-## Please Complete the Following
-
-- [ ] I read [CONTRIBUTING.md](https://github.com/Cyclenerd/gallery_shell/blob/master/CONTRIBUTING.md)
-- [ ] I used tabs to indent
-- [ ] I checked my code with [ShellCheck](https://www.shellcheck.net/)
-
-## Notes
-
-Feel free to put whatever you want here. \ No newline at end of file
diff --git a/README.md b/README.md
index 7ae3064..dbf24b1 100644
--- a/README.md
+++ b/README.md
@@ -1,111 +1,3 @@
-# gallery.sh
+# galgen
-[![Bagde: GNU Bash](https://img.shields.io/badge/GNU%20Bash-4EAA25.svg?logo=gnubash&logoColor=white)](https://github.com/Cyclenerd/gallery_shell#readme)
-[![Bagde: Linux](https://img.shields.io/badge/Linux-FCC624.svg?logo=linux&logoColor=black)](https://github.com/Cyclenerd/gallery_shell#readme)
-[![Bagde: 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 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`:
-
-```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 extraction
-
-On 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 <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:
-
-```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): <https://cyclenerd.github.io/gallery_shell/>
-
-## 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 (<https://github.com/Cyclenerd/gallery_shell>). \ No newline at end of file
+Bash script to generate static web galleries using the `convert` and `jhead` command-line utilities. No server-side programs (i.e. PHP, MySQL) required.
diff --git a/images/demo/Example_images.zip b/images/demo/Example_images.zip
deleted file mode 100644
index d163cba..0000000
--- a/images/demo/Example_images.zip
+++ /dev/null
Binary files differ
diff --git a/images/demo/Example_images_LICENSE.txt b/images/demo/Example_images_LICENSE.txt
deleted file mode 100644
index 978ee2a..0000000
--- a/images/demo/Example_images_LICENSE.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2010 Dave Perrett, http://recursive-design.com/
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE. \ No newline at end of file
diff --git a/images/demo/Example_video_LICENSE.txt b/images/demo/Example_video_LICENSE.txt
deleted file mode 100644
index 0d50554..0000000
--- a/images/demo/Example_video_LICENSE.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-Pexels Videos offers completely free videos. All videos are licensed under the Creative Commons Zero (CC0) license.
-
-You can find more information about the license on the official license page:
-
-https://creativecommons.org/publicdomain/zero/1.0/
-https://videos.pexels.com/video-license \ No newline at end of file
diff --git a/images/demo/Landscape_1.jpg b/images/demo/Landscape_1.jpg
deleted file mode 100644
index 015c5f1..0000000
--- a/images/demo/Landscape_1.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Landscape_2.jpg b/images/demo/Landscape_2.jpg
deleted file mode 100644
index 2e7fb57..0000000
--- a/images/demo/Landscape_2.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Landscape_3.jpg b/images/demo/Landscape_3.jpg
deleted file mode 100644
index 74505cf..0000000
--- a/images/demo/Landscape_3.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Landscape_4.jpg b/images/demo/Landscape_4.jpg
deleted file mode 100644
index ea133fb..0000000
--- a/images/demo/Landscape_4.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Landscape_5.jpg b/images/demo/Landscape_5.jpg
deleted file mode 100644
index 81a8af6..0000000
--- a/images/demo/Landscape_5.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Landscape_6.jpg b/images/demo/Landscape_6.jpg
deleted file mode 100644
index 7426aba..0000000
--- a/images/demo/Landscape_6.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Landscape_7.jpg b/images/demo/Landscape_7.jpg
deleted file mode 100644
index a541d95..0000000
--- a/images/demo/Landscape_7.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Landscape_8.jpg b/images/demo/Landscape_8.jpg
deleted file mode 100644
index 3f51d28..0000000
--- a/images/demo/Landscape_8.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Portrait_1.jpg b/images/demo/Portrait_1.jpg
deleted file mode 100644
index f579779..0000000
--- a/images/demo/Portrait_1.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Portrait_2.jpg b/images/demo/Portrait_2.jpg
deleted file mode 100644
index 4d9212c..0000000
--- a/images/demo/Portrait_2.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Portrait_3.jpg b/images/demo/Portrait_3.jpg
deleted file mode 100644
index 2f88b6d..0000000
--- a/images/demo/Portrait_3.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Portrait_4.jpg b/images/demo/Portrait_4.jpg
deleted file mode 100644
index cc947da..0000000
--- a/images/demo/Portrait_4.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Portrait_5.jpg b/images/demo/Portrait_5.jpg
deleted file mode 100644
index b14114b..0000000
--- a/images/demo/Portrait_5.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Portrait_6.jpg b/images/demo/Portrait_6.jpg
deleted file mode 100644
index 79617a9..0000000
--- a/images/demo/Portrait_6.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Portrait_7.jpg b/images/demo/Portrait_7.jpg
deleted file mode 100644
index fbcde86..0000000
--- a/images/demo/Portrait_7.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Portrait_8.jpg b/images/demo/Portrait_8.jpg
deleted file mode 100644
index 07beac8..0000000
--- a/images/demo/Portrait_8.jpg
+++ /dev/null
Binary files differ
diff --git a/images/demo/Video.mp4 b/images/demo/Video.mp4
deleted file mode 100644
index e1aa70c..0000000
--- a/images/demo/Video.mp4
+++ /dev/null
Binary files differ
diff --git a/images/gallery.jpg b/images/gallery.jpg
deleted file mode 100644
index 3c79885..0000000
--- a/images/gallery.jpg
+++ /dev/null
Binary files differ
diff --git a/images/image.jpg b/images/image.jpg
deleted file mode 100644
index c4b897a..0000000
--- a/images/image.jpg
+++ /dev/null
Binary files differ
diff --git a/test.sh b/test.sh
deleted file mode 100644
index 8f17172..0000000
--- a/test.sh
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env bash
-
-# gallery.sh Test Script
-#
-# https://github.com/lehmannro/assert.sh
-
-if [ ! -e assert.sh ]; then
- echo "downloading unit test script"
- curl -f "https://raw.githubusercontent.com/lehmannro/assert.sh/v1.1/assert.sh" -o assert.sh
-fi
-
-# Copy demo files
-cp images/demo/* ./
-
-# shellcheck disable=SC1091
-source assert.sh
-
-# `echo test` is expected to write "test" on stdout
-assert "echo test" "test"
-# `seq 3` is expected to print "1", "2" and "3" on different lines
-assert "seq 3" "1\\n2\\n3"
-# exit code of `true` is expected to be 0
-assert_raises "true"
-# exit code of `false` is expected to be 1
-assert_raises "false" 1
-# end of test suite
-assert_end examples
-
-# $ bash gallery.sh -t Test
-assert_raises "bash gallery.sh -t Test"
-
-assert "cat index.html | grep '<title>Test</title>' | tr -d '\011\012\015'" '<title>Test</title>'
-assert "cat index.html | grep '__thumbs/Landscape_1.jpg.html' | tr -d '\011\012\015'" '<a href="__thumbs/Landscape_1.jpg.html"><img src="__thumbs/406/Landscape_1.jpg" alt="Thumbnail: Landscape_1.jpg" class="rounded mx-auto d-block" height="203"></a>'
-
-assert "cat __thumbs/Landscape_1.jpg.html | grep '<title>Landscape_1.jpg</title>' | tr -d '\011\012\015'" '<title>Landscape_1.jpg</title>'
-assert "cat __thumbs/Landscape_1.jpg.html | grep 'Resolution' | tr -d '\040\011\012\015'" 'Resolution:600x450'
-
-assert_end gallery_sh