Dahu is a picture gallery based on the directory tree of your digital albums.
- No database needed
- Automatic generation of thumbnails without editing original files
- Include a CLI to manage albums and a web frontend
- Permission management: an album can be public or private or shared by a link
Dahu uses:
You will find here a demo (soon enough).
- No database needed
- Non-destructive picture transformation
- Album permissions (public or private)
- Share albums with a direct link
- Upload your albums using your favorite synchronization tool (ssh, rsync, etc.)
- Gallery based on directory tree
- Web frontend to expose your gallery
- CLI to manage your albums
- Download a whole album from the web frontend (soon)
- Theming support
First, grab sources:
$ git clone https://github.com/driquet/dahu.git $ cd dahu
I strongly recommend using a virtual environnement to keep a clean system. If you want to install Dahu system-wide, skip the following steps.
$ virtualenv --prompt=(dahu) venv $ source venv/bin/activate
To install Dahu and its requirements, run the following command:
$ python setup.py install
Two binaries are now available: dahu-web
and dahu-cli
.
Dahu uses two main files:
config.py
: contains data related to your application (where are stored picture, where to cache pictures, and so on)permissions.json
: automatically generated, that contains album permissions
To set up Dahu, you need to:
- Install requirements
- Customize the
config.py
file - Create the cache directory (don't forget, it needs to be readable/writable)
- Deploy the application (see Deployment section)
Configuration of Dahu takes place in the config.py
file.
Options are self-explicit so you won't find any description of them here.
Permissions are stored in the file permissions.json
, located in the cache directory. It contains:
- Users (password encryped using PBKDF2 with salt)
- Public/Private albums
- Album keys for direct links
To manage these data, you can use Dahu CLI. First, you need to make sure that your virtualenv is activated if you are using one. Launch the CLI with:
$ dahu-cli
Command | Description |
---|---|
userlist | List registered users |
useradd | Add/Edit an user |
userdel [user] | Remove an user |
permission [album] [private/public] | Manage (get or set) permission for an album |
keygen [album] | Generate an album key |
directlink [album] | Return the direct link for an album |
ls [album] | List the content of an album |
cache [update/clear] | Update or clear thumbnails |
A lot of enhancements can be done. Feel free to contribute by: - reporting issues - proposing new features - enhancing Dahu
Possible enhancement are: - admin frontend
BSD Licence. See LICENCE file.