Skip to content
New codebase for the SGFC file uploader.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
project
.gitignore
README.md
database.sql
db.py
runserver.py

README.md

sgfcup

New codebase for the SGFC file uploader.

Dependencies

Python >= 3.4 is needed.

  • bottle (dev version): https://github.com/bottlepy/bottle
  • cymysql
  • jinja2
  • python-magic (need libmagic on your system)
  • pillow
  • pygments
  • jsonmerge
  • bottle-beaker
  • beaker
  • ghdiff
  • tornado (for serving the app)
  • raven (debug dependency)
  • future
  • pycrypto

Dependencies can be installed via:

pip install git+https://github.com/bottlepy/bottle.git cymysql jinja2 python-magic pillow pygments jsonmerge tornado bottle-beaker beaker ghdiff future raven pycrypto

Please edit project/config.example.py, and rename it to config.py, then run database.sql on the database you've put in config.py.

The directories img/p/ and img/t/ have to be created in the root of the project.

Running the app

The program is run like so:

python runserver.py <port>

Notes

The app also has the ability to serve a file through nginx's X-Accel. To use this, nginx must have a location block for /get_image/, like so:

location /get_image/ {
    internal;
    alias /path/to/project/img/; # note the trailing slash
}

Then in project/config.py:

{
    "use_nginx_sendfile": False,
    ...
}

LICENSE

    DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
                Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
    TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.
You can’t perform that action at this time.