Skip to main content

a cli tool to create gallery out of txt and png/jpeg files

Project description

mgallery: A CLI Tool for Creating Static HTML Galleries

Overview

mgallery is a command-line interface (CLI) tool that helps you create static HTML galleries from your images and text files. With mgallery, you can easily combine your files into a single HTML file, to view your gallery. It has similar style to twitter tweets.

Installation

pip install mgallery

Features

  • Combine images (PNG, JPEG) and text files into a single HTML file
  • Add or replace note metadata of images with a given note
  • Read note metadata of images
  • Supports multiple input files and directories

Usage:

Compile Command

Compile images and text files into a single HTML file:

mgallery compile <input_files> [-o output_file]

Example:

Let's say my diary directory is structured like this:

.
├── june
│   ├── 01-06-24.txt
│   ├── 04-06-24.txt
│   ├── buildspace_s5_w0.png
│   ├── IMG_20240616_191552.jpg
│   └── maybe_future_pp.jpg
└── may
    ├── 25-05-24.txt
    ├── 26-05-24.txt

To compile all text and image files without any exclusions, use:

mgallery compile -o /tmp/output.html

If input_files is not specified, the current working directory files will be used as input.

To compile only selected files, use:

mgallery compile june/maybe_future_pp.jpg june/01-06-24.txt -o /tmp/output.html

To compile files from a directory and a selected file from another directory, use:

mgallery compile june may/25-05-24.txt -o /tmp/output.html

The -o or --output flag specifies the location of the output file. If not provided, the CLI will create output.html in the current working directory.

Note Command

Add or replace note metadata of an image with a given note:

mgallery note <image_filename> <note>

Read Command

Read note metadata of an image:

mgallery read <image_filename>

License

mgallery is licensed under the MIT License.

Acknowledgments

I would like to thank the following projects and libraries that helped me create mgallery:

  • vercel v0
  • Groq LLaMA 70b
  • Tailwind
  • Pillow (PIL)
  • Python standard libraries

Issues

If you encounter any issues or have feedback, please open an issue in this repository.

I hope this helps! Let me know if you need any further modifications.

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

mgallery-0.1.1.tar.gz (116.0 kB view details)

Uploaded Source

Built Distribution

mgallery-0.1.1-py3-none-any.whl (115.7 kB view details)

Uploaded Python 3

File details

Details for the file mgallery-0.1.1.tar.gz.

File metadata

  • Download URL: mgallery-0.1.1.tar.gz
  • Upload date:
  • Size: 116.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for mgallery-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0e51cea1114167e28ef7a2e20d9193923deba3c5146158ecca14dec14b288823
MD5 14f3ae6af39da658c9f296b8841c3b13
BLAKE2b-256 50372da611ee6dbaa9c384bf25fe37ae83006999c110f6f76eb7560741bf170e

See more details on using hashes here.

File details

Details for the file mgallery-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mgallery-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 115.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for mgallery-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4ecf86a6d2bb7278838534ddcc7bfec7c7c86be34cc25b34c8d6e233c294b6b7
MD5 df5fbac074bb106d0d9301c041881996
BLAKE2b-256 a089a6745341229243b21bd58cee56feba663515ee92a22d8efcd774d3920654

See more details on using hashes here.

Supported by

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