Where is all the calendar printing software ?.

I was thinking it might be nice to print my own calendar for next year. The home grown sort with pictures of my pets all over it.

Searching on google, even with -“”TRIAL” as a parameter returns a lot of junk (especially a lot of hist for ‘calendar creator (the best!)’ that seems to be all over the web advertised as free, bit its evaluation only although there is no indication of that until you try to install it). And while the search turned up lots of web printing services I have a colour printer thank you.

So my next project is to script my own solution; which should probably take about a day to get working; and then because I can’t stop improving will undoubtably take months before I am happy with it.

Why script you ask ?. Because the simplest solution is to display the result as a web page, so I can check layout before printing.

I have lots of experience in dynamically creating web pages from unix scripted output so the initial solution can easily be done in a day, simply use the unix cal program to get the format of each month and script around that to get nice big boxes for each day, and as its a script I can pass the pictures to be used at the top of each calendar month as a script parameter (I won’t of course, see below).

Why will it take months you ask ?. Well simply in typing this I have already worked out

  • pass the photos for each month from a parm file, not command line parms (thinking of batch production runs now)
  • will need a control file for public holidays, want those dates to be in a different colour with text naming the holiday in them
  • probably want to shade saturday and sunday a different colour as well
  • lets add a control file for birthdays etc, better use a more glaring colour for those dates
  • lets make the previous even more complicated, lets have an optional field in the control file for a small thumbnail picture of who’s aniversary it is. Optional of course needs more logic code but I don’t have pictures of everyone, so optional it must be
  • then of course I’ll need css for a proper layout to print on A4 paper with page breaks between each month, not just print styles but the screen display shown before the print is done needs to show what will be printed
  • …a place holder for lots more I’ll think of…
  • after those months, back to point one, batching. Batch… hmm… output… trickiest left until last, why should the output be printed. I think in the long term I need to allow the batch runs to dump the output into a PDF file rather than a web page for easier distribution.
    Thats being left until last. I have used perl to create PDF output files with charts and tables imbedded before, but I want to do this in shell script,
    and sorting out the layout in a PDF format, thumbnails, colours, pictures etc; plus getting the A4 paper sizing right; well it’s completely unrelated to the html output plan all together
    And I might have to go back to my books for that one, slapping in text and pictures is easy, but exact layouts, sigh
    May never happen, but this project will be another of my never ending ones I think.

Anyway, when I get the script working for everything except the last point (ok, last two points, even if I think of lots more things I can always produce a xx.01 release) I’ll stuff it in the download section of my site.

Update 2008/11/25
Well that was easy enough for a prototype. In less that one day I’ve got a cgi-script for the website that produces calendars with a personal picture on the top of each month (still need to get some logic in there to resize pictures), and implemented aniversary and public holiday files to stuff text into the calendar date boxes (coloured even, green for hols and red for aniversaries of course). The only trouble is I used a table layout and inserting text resizes the table, so more to do on this, will have to work on a CSS solution I guess. Progress so far is available here. Not pretty but still not bad for about three hours effort.
yes I knew that from the start, but all the script logic is working now :-).

Update 2008/11/26
Much better, pictures are all sized perfectly just with a height tag and letting it autoscale. Added a print css style to do page breaks at the right place when printing. May not look that great on the screen but if you look at it in print-preview its almost good to go. Just need to tweak the print style to remove the title line that identifies it as being printed from a web page and it’s good to go (for my own use anyway, and for anyone with their own *nix web server).

About mark

At work, been working on Tandems for around 30yrs (programming + sysadmin), plus AIX and Solaris sysadmin also thrown in during the last 20yrs; also about 5yrs on MVS (mainly operations and automation but also smp/e work). At home I have been using linux for decades. Programming background is commercially in TAL/COBOL/SCOBOL/C(Tandem); 370 assembler(MVS); C, perl and shell scripting in *nix; and Microsoft Macro Assembler(windows).
This entry was posted in Uncategorized. Bookmark the permalink.