Code Monkey home page Code Monkey logo

dahu's Introduction

Dahu

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:

Demo

You will find here a demo (soon enough).

Features

  • 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

Installation

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.

Setting up Dahu

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:

  1. Install requirements
  2. Customize the config.py file
  3. Create the cache directory (don't forget, it needs to be readable/writable)
  4. Deploy the application (see Deployment section)

Configuration

Dahu configuration

Configuration of Dahu takes place in the config.py file. Options are self-explicit so you won't find any description of them here.

Dealing with permissions

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

Deployment

Security

Enhancements

A lot of enhancements can be done. Feel free to contribute by: - reporting issues - proposing new features - enhancing Dahu

Possible enhancement are: - admin frontend

Troubles

Licence

BSD Licence. See LICENCE file.

dahu's People

Contributors

driquet avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.