Skip to content

simple web app for generating ransom notes using Python and web.py

Notifications You must be signed in to change notification settings

heyhuyen/ransomnote

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ransom Note

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.

Can I play with it?

Sorry, I don't have it hosted anywhere, so to play with it you will have to run it on your local machine.

You will need:

  • 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);

Usage

From top directory, run python bin/app.pyand open up your browser to http://localhost:8080/

Upload letters

  1. Type a letter into the textfield.
  2. Select a file to upload.

Make a ransom note

Type your message in the textfield! Letters not found will display a rather ugly default image.

Todo/Extensions

  • 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

Troubleshooting

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;."

About

simple web app for generating ransom notes using Python and web.py

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published