Showing posts with label PySiteCreator. Show all posts
Showing posts with label PySiteCreator. Show all posts

Wednesday, January 30, 2013

PDFDocument, a ReportLab wrapper

matthiask/pdfdocument · GitHub

Saw it via StackOverflow.

PDFDocument is a wrapper for Reportlab that makes it easier to create PDF documents. Interesting approach.

It  provides methods, such as pdf.h1("A heading"), to generate the HTML-like markup that ReportLab supports. Many HTML-generation tools, including my PySiteCreator tool (which is meant for writing web sites in Python), use a similar approach.

I used a different approach in my xtopdf toolkit, which is also a ReportLab-based library (and also a set of end-user tools), for PDF generation from text, DBF, CSV, TDV/TSV and XLS content. The PDFWriter module/class in xtopdf provides methods like pw.setFont(fontname) and pw.writeLine(text) to create PDF content.

PDFDocument has two templates, for letters and reports, which differ only in the first page. It also has a special template, confidential reports, which uses watermarks.

Related links:

www.reportlab.com

bitbucket.org/vasudevram/PySiteCreator

bitbucket.org/vasudevram/xtopdf

- Vasudev Ram
dancingbison.com

Sunday, December 2, 2012

Interesting HN thread about static site generators

Poll: What's your favorite static site generator? | Hacker News

My PySiteCreator project can also be used as a static site generator - with a twist: you have to write entirely in Python :)

http://www.google.com/search?q=pysitecreator

I originally created it as a tool to programmatically create wikis, actually, and then  later renamed it as PySiteCreator; it was earlier called DSLWiki (you can guess why, haha), but I  later realized it was a more general tool.

- Vasudev Ram