trocr is a file sharing web application based on Flask framework
- multiple files upload
- gallery page creation
- HTML & BBCode link generation with thumbnail for image
- HTML & BBCode link generation for all file
- HTML video player and audio player for supported file
- gallery sample: http://trocr.bidouille.info/?g=d4641421-13fa-424b-87ae-4fb7c2a44ca7
- demo (automatically resets every 10mn): http://trocr-demo.bidouille.info/ (login/pass = demo/demo)
Flask framework is needed for running trocr. Could be installed on Debian/Ubuntu by this commands
$ aptitude install python-pip
$ easy_install flask
Python Imaging Library (PIL) is also required
$ easy_install pil
But it's better to use virtualenv, quick example (including trocr install)
$ aptitude install python-pip python-virtualenv
$ cd ./path_to_trocr_directory
$ curl -L https://github.com/cypx/trocr/archive/master.tar.gz | tar zx --strip-components=1
$ cp websiteconfig.py.sample websiteconfig.py
$ virtualenv --no-site-packages ./venv
$ source ./venv/bin/activate
$ pip install -Ur requirements.txt
$ python trocr.py
For more information look at http://flask.pocoo.org/docs/installation/
You could also use Docker
$ cd ./path_to_trocr_directory
$ curl -L https://github.com/cypx/trocr/archive/master.tar.gz | tar zx --strip-components=1
$ cp websiteconfig.py.sample websiteconfig.py
$ docker-compose up -d
Just download and extract trocr file to a folder
$ curl -L https://github.com/cypx/trocr/archive/master.tar.gz | tar zx --strip-components=1
Create configuration file (webconfig.py) from sample (webconfig.py.sample) an modify it as you want
$ cp webconfig.py.sample webconfig.py
$ vi webconfig.py
For quick test you could use:
$ python trocr.py
Refer to http://flask.pocoo.org/docs/deploying/ and your web server documentation about WSGI for production use
If you want to enable MediaElements.js first you need to download and extract it's build folder content into static/mediaelement directory:
$ mkdir static/mediaelement
$ cd static/mediaelement
$ curl -L https://github.com/johndyer/mediaelement/archive/master.tar.gz | tar zx --strip-components=2 --wildcards "*/build/*"
After that do not forget to activate it into webconfig.py
ENABLE_MEDIAELEMENT = True