A script to print out a full page monthly calendar

Feb 15, '05 08:42:00AM

Contributed by: rael9

Building upon this hint, I wanted to make a full page (8.5" x 11") monthly calendar that could be printed out. So I wrote the attached Perl script to do just that. It prompts you for the month and year, and outputs a plain text calendar suitable for printing. I found that Courier 10pt filled the page up pretty well when printing it. It can't be piped as it stands because of the prompts, but it could be easily modified to take the month and year as arguments like cal instead of prompts so that it could be piped to open -f or enscript.

Please excuse the semi-sloppy coding, I did this late at night :)

To use it, just copy the code, paste it into your favorite text editor (command line or otherwise), save it as whatever you want (I called it cal.pl), make it executable (chmod +x cal.pl) and then run it (./cal.pl). Then copy the output, paste into your favorite text editor, and print it out. Feel free to make improvements, this was a quick and dirty kind of thing.

[robg adds: This script worked as described...]

Comments (3)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050210145828891