trocr is a file sharing web application based on Flask framework
HTML Python CSS
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config-samples
static
templates
.gitignore
CHANGELOG.rst
Dockerfile
README.rst
docker-compose.yml
requirements.txt
schema.sql
trocr.py
trocr.sublime-project
websiteconfig.py.sample

README.rst

TROCR - Share your file

trocr is a file sharing web application based on Flask framework

Features

  • 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

Example & demo

Installation

Flask framework

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/

trocr

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

MediaElements

If you want to enable `MediaElements.js<http://mediaelementjs.com/>`_ 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