Skip to main content

A tool to generate static HTML photo galleries from various data sources.

Project description

ggallery

npm

ggallery is a Python tool that generates a static HTML photo gallery website from a YAML specification. It allows you to create beautiful and customizable photo galleries with ease, using various data sources and storage providers.

Features

  • Static HTML Generation: Create a static HTML photo gallery that can be hosted on any web server.
  • Multiple Data Sources: Supports local file system and Azure Blob Storage as data sources.
  • Thumbnail Generation: Automatically generate thumbnails for your images.

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:
    name: "nano-gallery"

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
    index: index.html

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
    index: index.html

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ggallery-1.0.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ggallery-1.0.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file ggallery-1.0.0.tar.gz.

File metadata

  • Download URL: ggallery-1.0.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for ggallery-1.0.0.tar.gz
Algorithm Hash digest
SHA256 27db862b71c04bf52728347d02f84086a8ff77bcec5d9a0e2ca664b64d6cc133
MD5 353390ed65d1eda101c000ef3ba204cf
BLAKE2b-256 9fd3e8e806f724cb19d66515d8991b01f6276a4d59a2ab0198c5dc14b4fc7241

See more details on using hashes here.

File details

Details for the file ggallery-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: ggallery-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for ggallery-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8610fc7d025aa27f88507de4e8ca05ba5e59a1b6705b8fda60801bc196618b55
MD5 7f58da86467b3f1b6ae6fc1dc3d52976
BLAKE2b-256 bb6436f695cd37bbf739be0c5730b3ff034413811261a79b44ea63b28c4a0822

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page