A simple folder-based photo viewer for the web, based on
On Ubuntu 17.04, you'll need to install:
sudo apt install npm grunt uwsgi uwsgi-plugin-python nginxgit clone https://github.com/thorbenk/photobundle.git
cd photobundle
git submodule init
git submodule update
npm install
virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
make gruntAll front-end code is copied to the dist/ directory.
A lightweight flask application for authenticating users can be found in the
app/ directory. Users and the available albums (with permissions per user)
are configured using JSON files.
To configure the app, adapt the files
app/app.cfgapp/app.iniapp/users.jsonapp/albums.json
Then, configure nginx according to app/nginx.sample.
Here is a simple development environment working on Ubuntu 17.04:
cd photobandle
source .venv/bin/activate
sed -e "s|PHOTOBUNDLE_PATH|$PWD|g" app/nginx.sample > /tmp/nginx.conf && sudo cp /tmp/nginx.conf /etc/nginx/sites-available/localhost.photobundle
sudo ln -s /etc/nginx/sites-available/localhost.photobundle /etc/nginx/sites-enabled
sudo service nginx restart
sed -e "s|PHOTOBUNDLE_PATH|$PWD|g" app/app.cfg.sample > app/app.cfg
sed -e "s|PHOTOBUNDLE_PATH|$PWD|g" app/app.ini.sample > app/app.ini
cp app/users.json.sample app/users.json
vim app/albums.json # see below
uwsgi app/app.iniFinally, go to http://localhost:8080
First put or symlink your photos as a directory structure beneath dist/albums.
Next, run make thumbs to generate thumbnails for all photos.
In app/albums.json, you must configure a list of galleries as follows:
- Each entry in that list will be visilbe to the users as a single html gallery
page (filename
out). - A gallery page can pull in photos from multiple
directories as specified in
dirs(photos are not added recursively to the gallery page by default). - The
titleis the page title and heading of the generated gallery page