A simple web app for generating ransom messages using Python and web.py. An exercise in my quest to learn web programming.
Written during Hacker School, Batch[4], Fall 2012.
Sorry, I don't have it hosted anywhere, so to play with it you will have to run it on your local machine.
- Python and web.py
- a clone of this repo:
git clone https://github.com/heyhuyen/ransomnote.git
- a sqlite3 database named
scrapfont.db
with the following table: CREATE TABLE letters(id integer primary key autoincrement, letter text not null, ext text not null);
From top directory, run python bin/app.py
and open up your browser to http://localhost:8080/
- Type a letter into the textfield.
- Select a file to upload.
Type your message in the textfield! Letters not found will display a rather ugly default image.
- uploading letters: auto-resize images
- uploading letters: in-browser image editing to select multiple characters
- uploading letters: auto-character detection would be really cool
- uploading letters: allow only single characters or provide a dropdown list
- making ransom note: allow punctuation and symbols:
!
,?
,.
, etc. - making ransom note: handle
\n
and allow text alignment - save message to image format
- make it pretty
from Learn Python The Hard Way, Ex 52: "Before you run bin/app.py
you need to change your PYTHONPATH
environment variable."
export PYTHONPATH=$PYTHONPATH:.
For Windows PowerShell: $env:PYTHONPATH = "$env:PYTHONPATH;."