Why?
Some reasons to try this:
- You like Fossil and want to use it in novel ways
- You're already serving fossil repositories and want to add a separate photo gallery using the same infrastructure
- You want a photo gallery that can easily be transported in a single file
- You want to allow others to clone and synchronize with your photo gallery
- You want to be able to add photos offline and sync later
- You want to take this idea and run with it in a totally different direction
Installation
First, clone this repository:
fossil clone https://code.pobblelabs.org/gallery
You'll need Python >= 3.8 and Pillow. You can install it system-wide, or in a virtualenv.
Run:
cd gallery
./g.py install
It will attempt to install Pillow, then configure the fossil repository to automatically serve the gallery.
Adding a gallery
Copy some photos to a directory. cd to the parent directory, then:
/path/to/gallery/g.py add some_directory
The images will be thumbnailed and saved as unversioned files in the repository.
If you add a text file called README.txt to the directory, it'll be picked up and included as a short description on the bottom of the gallery page.
To prevent the gallery from being listed on the /view
page, add the --hidden
flag. (Note: files won't be hidden, since anyone can access /uvlist)
Serving the galleries
Upload the repository to a server and serve it like any other fossil repo
Viewing the galleries
Visit /view to see the list of galleries.