A tool to generate static HTML photo galleries from various data sources.
Project description
ggallery
ggallery is a Python tool that generates a static HTML photo gallery website from a YAML specification and from given renderer plugin. It allows you to create beautiful and customizable photo galleries with ease, using various data sources and storage providers.
Features
- Static HTML Generation using plugins: Create a static HTML photo gallery that can be hosted on any web server, using a custom renderer plugin.
- Multiple Data Sources: Supports local file system and Azure Blob Storage as data sources.
- Thumbnail Generation: Automatically generate thumbnails for your images.
Available Renderer Plugins
- https://github.com/creeston/ggallery-nanogallery2 - template built on top of nanogallery2 and bulma css framework.
Usage
To use ggallery, you need to have Python installed.
pip install ggallery
You can run the tool using the following commands:
python -m ggallery -f /path/to/your/gallery.yaml
or
ggallery -f /path/to/your/gallery.yaml
Examples
Local Gallery Example
Create a gallery.yaml file with the following content:
title: Local Gallery
subtitle: Gallery with photos stored in the same directory as static website.
thumbnail:
height: 400
template:
url: https://github.com/creeston/ggallery-nanogallery2
data_source:
type: local
path: "${LOCAL_PHOTOS_PATH}"
data_storage:
type: local
albums:
- title: "Japan"
subtitle: "Photos from my trip to Japan"
source: "japan"
cover: "view on the Fuji.jpg"
- title: "Italy"
source: "italy"
cover: "colliseum.jpg"
photos:
- title: "View at the Colosseum at night"
source: "colliseum.jpg"
output:
path: docs
Set the LOCAL_PHOTOS_PATH environment variable to the path where your photos are stored.
Run the tool:
python -m ggallery gallery.yaml
Azure Blob Storage Example
Create a gallery.yaml file with the following content:
title: Azure Gallery
subtitle: Gallery of photos stored in Azure Blob Storage
favicon:
type: fontawesome
name: camera-retro
thumbnail:
height: 400
template:
name: "nano-gallery"
data_source:
type: local
path: "${LOCAL_PHOTOS_PATH}"
data_storage:
type: azure-blob
container: "${AZURE_CONTAINER}"
connection_string: "${AZURE_CONNECTION_STRING}"
albums:
- title: "Japan"
subtitle: "Photos from my trip to Japan"
source: "japan"
cover: "view on the Fuji.jpg"
- title: "Italy"
source: "italy"
cover: "colliseum.jpg"
photos:
- title: "View at the Colosseum at night"
source: "colliseum.jpg"
output:
path: docs
Set the LOCAL_PHOTOS_PATH, AZURE_CONTAINER, and AZURE_CONNECTION_STRING environment variables.
Run the tool:
python -m ggallery gallery.yaml
Contribution
Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request on the GitHub repository.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ggallery-1.0.5.tar.gz.
File metadata
- Download URL: ggallery-1.0.5.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb9356d08974f17b8d0ab3786f7fe893397eac6f5c0a1a0a90bb46825c8d931f
|
|
| MD5 |
dc7d1bf35f5ccb85b3e2d067d99c2fbc
|
|
| BLAKE2b-256 |
f24c78fdaba2ffda3d17b919436ae78125528cec65ce9a77da035554e0224675
|
File details
Details for the file ggallery-1.0.5-py3-none-any.whl.
File metadata
- Download URL: ggallery-1.0.5-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9dc6791814ac3945130c01fbb1d790a483f111a7317d111f71d92eeaba2b0ae
|
|
| MD5 |
dcbe468ef98f442f13cbeae51f7ed04d
|
|
| BLAKE2b-256 |
10409561c258e771698a3e720661d96eaee0d48d2b4946c3af9a4467d5080e5e
|