Welcome to the Image Gallery project! This repository houses a robust solution for displaying and managing image and video collections on a Raspberry Pi.
📁 Project Root
📝 CreateJson.py 🖼️ banner.png 📝 check_thumb.py 📝 create_gallery_pages.py 📷 default_thumb.png 📝 generate_thumbnails.py 🖥️ index.html 📝 media.json 📜 script.js 🎨 wel-come.svg 📁 .static 📁 css 🎨 global.css
-
CreateJson.py: This script scans the media directory, organizes media files by chapters and pages, and generates a
media.json
file containing the metadata. -
check_thumb.py: This script checks for the existence of thumbnails for all media items listed in
media.json
. -
create_gallery_pages.py: This script generates HTML pages for the gallery, with pagination.
-
generate_thumbnails.py: This script creates thumbnail images for all media files using FFmpeg.
-
index.html: The main entry point for the image gallery.
-
script.js: The JavaScript file that handles gallery interactions, such as displaying images or videos in a modal.
-
banner.png & wel-come.svg: Banner images for the gallery.
-
default_thumb.png: Default thumbnail image for media items without a specific thumbnail.
-
.static/css/global.css: The global CSS file for styling the gallery.
- 🖼️ Image and Video Support: The gallery supports both images and videos.
- 📋 Media Metadata: Organizes media files based on filename patterns for chapters and pages.
- 🖼️ Thumbnails: Generates and uses thumbnails for media files.
- 📃 HTML Gallery Pages: Automatically creates paginated HTML gallery pages.
- 🎯 User-Friendly Interface: Interactive gallery with modal and navigation.
-
Create a Media Folder: Start by creating a directory for your media files. Name the directory using the format
{number}photo
, where{number}
represents a chapter or identifier. -
Run Scripts:
- Execute
CreateJson.py
to generate amedia.json
file with metadata. - Execute
generate_thumbnails.py
to create thumbnails for the media files.
- Execute
-
Check Thumbnails: If you suspect that some thumbnails might be missing, run
check_thumb.py
to identify and fix issues automatically. -
Prepare Assets: Ensure you have the following assets ready:
banner.png
default_thumb.png
wel-come.svg
Alternatively, you can manually adjust the source code if you want to customize these assets.
This project is licensed under the MIT License. See the LICENSE file for details.