dirshare
Project description
Description
dirshare is a small WSGI Python application, that comfortably shares images within a specific root path, with the added benefit of thumbnail caching (with MongoDb), real-time image resizing and instantaneous zip file creation.
The motivation to build this application, is that, I have the need to quickly and remotely browse a large collection of photos, just to pick a few photos, however I don’t want to have a dedicated web gallery nor I want to modify the original file structure.
Installation
> python setup.py install
Requirements
Besides python requirements that setuptools install, a mongo database server is needed.
Configuration
The configuration file is a Pyramid-style ini file (see example.ini). Apart from server configuration, the following parameters should be configured: > mongo_host = localhost
> mongo_port = 27017
> mongo_db = dir_db
> images_per_page = 25
> image_sizes = 128x128 600x600 1000x1000 full
> images_root = /path/to/image/root
> resize_format = JPEG
> resize_quality = 85
_images_per_page_ is the maximum number images to display per page. This parameter can be overwritten in HTTP request, with ‘pp’ GET parameter.
_image_sizes_ is a space separated list of (re)sizes available in a form of MAX_WIDTHxMAX_HEIGHT. The image is resized to these values, with its aspect ratio preserved. The first element in _image_sizes_ is the thumbnail size. Keyword _full_ is the original image.
_resize_format_ is the encoder to use in image resizes.
_resize_quality_ is the quality parameter used by image encoder.
Usage
Usage: dirshare [options]
- Options:
- -h, --help
show this help message and exit
- -c CONFIG, --config=CONFIG
Server configuration file path
- -r IMAGES_ROOT, --images-root=IMAGES_ROOT
Root directory to share (will override config file)
Examples.
Share production.ini’s images_root: > dirshare -c example.ini
Override production.ini’s images_root parameter: > dirshare -c example.ini -r ~/Pictures
0.3
First public release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.