<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<link rel="self" href="/Atom/" />
	<id>http://billmill.org/</id>
	<title>My Name Rhymes</title>
	<subtitle>Bill Mill blogs irregularly</subtitle>
	<updated>2005-11-16T22:20:00Z</updated>
	<author>
		<name>Bill Mill</name>
		<email>bill.mill@gmail.com</email>
		<uri>http://billmill.org/</uri>
	</author>
	<link href="http://billmill.org/" />
	<entry>
		<title>Create a PDF Calendar with Python + ReportLab</title>
		<link href="http://billmill.org/calendar.html" />	
		<id>http://billmill.org/calendar.html</id>
		<updated>2005-11-16T22:20:00Z</updated>
		<summary type="html">Today, I needed a quick and dirty PDF calendar generator. Fortunately, with
python handy, it was blazingly easy to knock one up. Using the &lt;a
href="http://docs.python.org/lib/module-calendar.html"&gt;calendar moduule&lt;/a&gt;
and the &lt;a href="http://www.reportlab.org/rl_toolkit.html"&gt;ReportLab PDF
library&lt;/a&gt;, it took me about 10 minutes to learn enough of the API to get
started, and another couple of hours to finish the script - you can find it
&lt;a href="http://billmill.org/static/files/pdf_calendar.py"&gt;here&lt;/a&gt;.&lt;p&gt;
Usage is pretty simple:&lt;p&gt;
&lt;textarea rows="6" cols="60"&gt;from pdf_calendar import createCalendar
#create a December, 2005 PDF
c = createCalendar(12, 2005, filename="blog_calendar.pdf")
#now add January, 2006 to the end
createCalendar(1, 2006, canvas=c)
c.save()&lt;/textarea&gt;&lt;p&gt;
This script will create a PDF file called "blog_calendar.pdf" with two pages,
one for December 2005 followed by one for January 2006. More details can be
found inside the script.&lt;p&gt;
&lt;b&gt;update&lt;/b&gt;: Now with &lt;a 
href="http://billmill.org/static/files/blog_calendar.pdf"&gt;sample output&lt;/a&gt;.
</summary>
		<content type="html">Today, I needed a quick and dirty PDF calendar generator. Fortunately, with
python handy, it was blazingly easy to knock one up. Using the &lt;a
href="http://docs.python.org/lib/module-calendar.html"&gt;calendar moduule&lt;/a&gt;
and the &lt;a href="http://www.reportlab.org/rl_toolkit.html"&gt;ReportLab PDF
library&lt;/a&gt;, it took me about 10 minutes to learn enough of the API to get
started, and another couple of hours to finish the script - you can find it
&lt;a href="http://billmill.org/static/files/pdf_calendar.py"&gt;here&lt;/a&gt;.&lt;p&gt;
Usage is pretty simple:&lt;p&gt;
&lt;textarea rows="6" cols="60"&gt;from pdf_calendar import createCalendar
#create a December, 2005 PDF
c = createCalendar(12, 2005, filename="blog_calendar.pdf")
#now add January, 2006 to the end
createCalendar(1, 2006, canvas=c)
c.save()&lt;/textarea&gt;&lt;p&gt;
This script will create a PDF file called "blog_calendar.pdf" with two pages,
one for December 2005 followed by one for January 2006. More details can be
found inside the script.&lt;p&gt;
&lt;b&gt;update&lt;/b&gt;: Now with &lt;a 
href="http://billmill.org/static/files/blog_calendar.pdf"&gt;sample output&lt;/a&gt;.
</content>
	</entry>
</feed>
