PDF Creation Software Overview ------------------------------------------- Software will run on Unix/Linux server using python >= 2.3 using PIL and Report Lab. Other libraries may be considered. Card: one index card 4.125 x 4.75 inches Page: two index cards stacked on top of each other. Size is that of a #10 envelope, 4.125 x 9.5 inches. Our company sells a series of custom index cards (two on a page). On our website is going to provide tools, so that our customers can create pdfs which they dowload and print on blank or preforamatted (e.g. lined) cards they have purchased from us. We need a series programs that can be invoked by our server, which will pass input gathered from web forms. The programms may be used either on the command line, or may be imported as modules. Every card has a template with header, content area and footer. We *may* want to include a water mark image in the background of the template. When creating cards the software should intelligent and adjust the size of the font for the header and footer (with certain min/max contrainst) to best fit the ammount of text given. Some of the software will create pngs that are imported into a pdf or displayed on line. Other software create pdfs and combine pdfs, which we will cache and make available for download.
Python source for the following programs Software Description ------------------------------------------- Sudoku Generator - Command line program/module Inputs - difficulty (scale of 1-10) - size (in pixels, output is square so only one param is needed) - output file name Output is a png file. You are repsonsible to find a suitable open source sudoku library. Here is a suggestion [url removed, login to view] Word Search Generator - Command line program/module Inputs - word list (e.g. dog,cat,bird) - grid size (how many letters wide) - word list id (used to look up word list in database) - height (in pixels. Though the word search will be square, the words printed in columns unders the search grid will cause the image to be taller than it is wide.) - output file name Output is a png file with the hidden words printed in columns below the search grid. You will be responsible to find a suitable open source word search library. Here is a suggestion [url removed, login to view] Recipe formatter - Command line program/module Inputs - recipe id - grocery list (bool) Retrieves recipe from database and formats it using a template. This would include, header, description, ingreditents, paragraphs of intructions, and footer. Output is a pdf 4.125 x 4.75 inches. If create grocery list is true, it also retrieves the recipes grocery list and formats it using a template and outputs a seperate pdf with the same dimensions. Page Maker/Card combiner - Command line program/module Inputs - top header (their are two cards to a page) - bottom header - top footer - bottom footer - top content path (path to png image to included in pdf) - bottom content path - top card path (path to pdf (a recipe for example to be used instead of the above options) - bottom card path - output file name Takes input and formats it using template. Output is a pdf 4.125x9.5 inches (#10 envelope size). Scenario: A user wants a page with a recipe as the top card and a sudoku game on the bottom. The program would take the path of the top card, a place it on the top of the page, and take bottom header, bottom footer, and bottom content path, and apply them to the bottom card of the page. Todo List formatter - Command line program/module Inputs - todo list items - output file name Lays out todolist items to fit persicely on a preprinted card. Output is a pdf. Sample card is provided. Usage Description --------------------------------------------- Here is some non-funtional sample code to give you and idea how we would like the software to work. This is just my idea, and we are open to suggestions and improvements. class SudokuMaker: def __init__(self, difficulty=5, size=250): """ makes initial card in memory on init""" def generate(self): """ generates a new card in memory """ def save(self, filename, size=None): """ saves card in memory, can reformat to smaller size""" if __name__ == '__main__': """ code to use on command line """ Example usage as module: # Make ten cards with thumbnails smaker = SudokuMaker() for i in xrange(10): [url removed, login to view]('/tmp/sudoku%[url removed, login to view]' % i) [url removed, login to view]('/tmp/sudoku%[url removed, login to view]' % i) if i < 9: [url removed, login to view]() Example usage as command line program: [url removed, login to view] --difficulty=5 --size=250 /tmp/[url removed, login to view]
Linux/Unix Python 2.3 or greater