Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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/

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

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

About

trocr is a file sharing web application based on Flask framework

Resources

Packages

No packages published