remote-image-browser


Nameremote-image-browser JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/dsoprea/RemoteImageBrowser
SummaryAllows you to efficiently browse a large image-file hierarchy from a website with thumbnails (cached) and lightboxes.
upload_time2017-12-27 21:35:54
maintainer
docs_urlNone
authorDustin Oprea
requires_python
licenseGPL 2
keywords image
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            |Build\_Status|
|Coverage\_Status|

Overview
========

This application will produce a website that will allow you to browse a directory structure of images.


Features
========

- Python 2/3 compatible.
- The Gnome thumbnailer uses Gnome's thumbnailing system. Any thumbnails already produced by images locally will be reused by the website. Any thumbnails produced by using the website will be reused locally.
- Directories will have thumbnails, either by specifying one in a per-directory config file, placing an image into a directory using a particular naming convention, or by using the first image found in that path. If no thumbnail could be determined (e.g. no images are in that path), a placeholder image will be used.
- There is an include/exclude path and include/exclude file filter.
- When an image-file's thumbnail is clicked, it's opened in a lightbox that can also slide to the previous/next image.
- No separate webserver is required for development mode. A integrated webserver will run on port :9090 and serve the images directly. This should be fine for most cases.


Installation
============

To install from Github::

    $ python setup.py install


Configuration
=============

Configuration is done via environment variables. You may set this via the command-line (see commands before, under 'Running', for an example) as well as at the user or system level (depending on how your uWSGI instance is configured).


Configuring a Thumbnailer
=========================

The default thumbnailer uses PIL. To configure the thumbnailer, set the class-name into `THUMBNAILER_CLASS`:

- rib.thumbnail.pil.PilThumbnailer
- rib.thumbnail.gnome.GnomeThumbnailer


Virtualenv
==========

Since Virtualenv obscures system-level packages and Gnomes "gi" package is not installable via PIP, extra steps are required to get this project working in a Virtualenv if you want to use the Gnome thumbnailer.

Once you get this project and create your Python 2.7 Virtualenv environment, place symlinks for the "gi" and "gobject" Gnome packages. On Ubuntu 14.04, this looks like::

    $ cd <virtualenv path>/lib/python2.7/site-packages
    $ ln -s /usr/lib/python2.7/dist-packages/gobject
    $ ln -s /usr/lib/python2.7/dist-packages/gi


Running
=======

Development
-----------

Development mode (runs on :9090)::

    rib/resources/scripts/development --env IMAGE_ROOT_PATH=<IMAGE PATH>

NOTE: The default PIL thumbnailer also requires the `THUMBNAIL_ROOT_PATH` variable to be defined. Create a path to store thumbnails in and then pass it in this variable.

Production
----------

If you would like to configure the server into uWSGI (a system service), create an INI file from the template production config file (rib/resources/uwsgi/uwsgi.ini.production.template) and symlink it into the uWSGI system config (/etc/uwsgi/apps-enabled in Ubuntu).

Don't forget to configure the environment variables already mentioned (`IMAGE_ROOT_PATH`, `THUMBNAIL_ROOT_PATH`) either in uWSGI or at the system elvel (e.g. /etc/environment, in Ubuntu).


uWSGI
=====

uWSGI will automatically be installed by this project, but it will not yet be configured as a service in the system. If you'd like to, use the following instructions. Note that if you want to run this as a system service, it would be best to install it at the system level (not within a virtualenv).

To quickly configure uWSGI to work as a system service under Ubuntu with *systemd*, write the following two files:

/etc/uwsgi/emperor.ini::

    [uwsgi]
    emperor = /etc/uwsgi/apps-enabled
    vassal-set = processes=8
    vassal-set = enable-metrics=1
    logto = /var/log/emperor.log

/lib/systemd/system/emperor.service::

    [Unit]
    Description=uWSGI Emperor
    After=syslog.target

    [Service]
    ExecStart=/usr/local/bin/uwsgi --ini /etc/uwsgi/emperor.ini
    # Requires systemd version 211 or newer
    RuntimeDirectory=uwsgi
    Restart=always
    KillSignal=SIGQUIT
    Type=notify
    NotifyAccess=all

    [Install]
    WantedBy=multi-user.target

Don't forget to start it with "systemctl start".


Screenshots
===========

|browser1|

|browser2|

.. |browser1| image:: rib/resources/images/screenshot1.png
.. |browser2| image:: rib/resources/images/screenshot2.png


Testing
=======

To run the unit-tests::

    $ ./test.sh

.. |Build_Status| image:: https://travis-ci.org/dsoprea/RemoteImageBrowser.svg?branch=master
   :target: https://travis-ci.org/dsoprea/RemoteImageBrowser
.. |Coverage_Status| image:: https://coveralls.io/repos/github/dsoprea/RemoteImageBrowser/badge.svg?branch=master
   :target: https://coveralls.io/github/dsoprea/RemoteImageBrowser?branch=master
            

Raw data

            {
    "_id": null,
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "cheesecake_code_kwalitee_id": null,
    "keywords": "image",
    "upload_time": "2017-12-27 21:35:54",
    "requirements": [],
    "author": "Dustin Oprea",
    "home_page": "https://github.com/dsoprea/RemoteImageBrowser",
    "github_user": "dsoprea",
    "download_url": "https://pypi.python.org/packages/12/5e/4d7ec0b973d48333e8eb2bd668ca4fd8ff1c381a15c22019a0f07e591f97/remote_image_browser-0.2.2.tar.gz",
    "platform": "",
    "version": "0.2.2",
    "cheesecake_documentation_id": null,
    "description": "|Build\\_Status|\n|Coverage\\_Status|\n\nOverview\n========\n\nThis application will produce a website that will allow you to browse a directory structure of images.\n\n\nFeatures\n========\n\n- Python 2/3 compatible.\n- The Gnome thumbnailer uses Gnome's thumbnailing system. Any thumbnails already produced by images locally will be reused by the website. Any thumbnails produced by using the website will be reused locally.\n- Directories will have thumbnails, either by specifying one in a per-directory config file, placing an image into a directory using a particular naming convention, or by using the first image found in that path. If no thumbnail could be determined (e.g. no images are in that path), a placeholder image will be used.\n- There is an include/exclude path and include/exclude file filter.\n- When an image-file's thumbnail is clicked, it's opened in a lightbox that can also slide to the previous/next image.\n- No separate webserver is required for development mode. A integrated webserver will run on port :9090 and serve the images directly. This should be fine for most cases.\n\n\nInstallation\n============\n\nTo install from Github::\n\n    $ python setup.py install\n\n\nConfiguration\n=============\n\nConfiguration is done via environment variables. You may set this via the command-line (see commands before, under 'Running', for an example) as well as at the user or system level (depending on how your uWSGI instance is configured).\n\n\nConfiguring a Thumbnailer\n=========================\n\nThe default thumbnailer uses PIL. To configure the thumbnailer, set the class-name into `THUMBNAILER_CLASS`:\n\n- rib.thumbnail.pil.PilThumbnailer\n- rib.thumbnail.gnome.GnomeThumbnailer\n\n\nVirtualenv\n==========\n\nSince Virtualenv obscures system-level packages and Gnomes \"gi\" package is not installable via PIP, extra steps are required to get this project working in a Virtualenv if you want to use the Gnome thumbnailer.\n\nOnce you get this project and create your Python 2.7 Virtualenv environment, place symlinks for the \"gi\" and \"gobject\" Gnome packages. On Ubuntu 14.04, this looks like::\n\n    $ cd <virtualenv path>/lib/python2.7/site-packages\n    $ ln -s /usr/lib/python2.7/dist-packages/gobject\n    $ ln -s /usr/lib/python2.7/dist-packages/gi\n\n\nRunning\n=======\n\nDevelopment\n-----------\n\nDevelopment mode (runs on :9090)::\n\n    rib/resources/scripts/development --env IMAGE_ROOT_PATH=<IMAGE PATH>\n\nNOTE: The default PIL thumbnailer also requires the `THUMBNAIL_ROOT_PATH` variable to be defined. Create a path to store thumbnails in and then pass it in this variable.\n\nProduction\n----------\n\nIf you would like to configure the server into uWSGI (a system service), create an INI file from the template production config file (rib/resources/uwsgi/uwsgi.ini.production.template) and symlink it into the uWSGI system config (/etc/uwsgi/apps-enabled in Ubuntu).\n\nDon't forget to configure the environment variables already mentioned (`IMAGE_ROOT_PATH`, `THUMBNAIL_ROOT_PATH`) either in uWSGI or at the system elvel (e.g. /etc/environment, in Ubuntu).\n\n\nuWSGI\n=====\n\nuWSGI will automatically be installed by this project, but it will not yet be configured as a service in the system. If you'd like to, use the following instructions. Note that if you want to run this as a system service, it would be best to install it at the system level (not within a virtualenv).\n\nTo quickly configure uWSGI to work as a system service under Ubuntu with *systemd*, write the following two files:\n\n/etc/uwsgi/emperor.ini::\n\n    [uwsgi]\n    emperor = /etc/uwsgi/apps-enabled\n    vassal-set = processes=8\n    vassal-set = enable-metrics=1\n    logto = /var/log/emperor.log\n\n/lib/systemd/system/emperor.service::\n\n    [Unit]\n    Description=uWSGI Emperor\n    After=syslog.target\n\n    [Service]\n    ExecStart=/usr/local/bin/uwsgi --ini /etc/uwsgi/emperor.ini\n    # Requires systemd version 211 or newer\n    RuntimeDirectory=uwsgi\n    Restart=always\n    KillSignal=SIGQUIT\n    Type=notify\n    NotifyAccess=all\n\n    [Install]\n    WantedBy=multi-user.target\n\nDon't forget to start it with \"systemctl start\".\n\n\nScreenshots\n===========\n\n|browser1|\n\n|browser2|\n\n.. |browser1| image:: rib/resources/images/screenshot1.png\n.. |browser2| image:: rib/resources/images/screenshot2.png\n\n\nTesting\n=======\n\nTo run the unit-tests::\n\n    $ ./test.sh\n\n.. |Build_Status| image:: https://travis-ci.org/dsoprea/RemoteImageBrowser.svg?branch=master\n   :target: https://travis-ci.org/dsoprea/RemoteImageBrowser\n.. |Coverage_Status| image:: https://coveralls.io/repos/github/dsoprea/RemoteImageBrowser/badge.svg?branch=master\n   :target: https://coveralls.io/github/dsoprea/RemoteImageBrowser?branch=master",
    "tox": true,
    "lcname": "remote-image-browser",
    "name": "remote-image-browser",
    "github": true,
    "coveralls": false,
    "bugtrack_url": null,
    "license": "GPL 2",
    "travis_ci": true,
    "github_project": "RemoteImageBrowser",
    "summary": "Allows you to efficiently browse a large image-file hierarchy from a website with thumbnails (cached) and lightboxes.",
    "split_keywords": [
        "image"
    ],
    "author_email": "myselfasunder@gmail.com",
    "urls": [
        {
            "has_sig": false,
            "upload_time": "2017-12-27T21:35:54",
            "comment_text": "",
            "python_version": "source",
            "url": "https://pypi.python.org/packages/12/5e/4d7ec0b973d48333e8eb2bd668ca4fd8ff1c381a15c22019a0f07e591f97/remote_image_browser-0.2.2.tar.gz",
            "md5_digest": "020fa295d4d6512de610840272e75c45",
            "downloads": 0,
            "filename": "remote_image_browser-0.2.2.tar.gz",
            "packagetype": "sdist",
            "path": "12/5e/4d7ec0b973d48333e8eb2bd668ca4fd8ff1c381a15c22019a0f07e591f97/remote_image_browser-0.2.2.tar.gz",
            "size": 16037
        }
    ],
    "cheesecake_installability_id": null
}
        
Elapsed time: 0.12157s