You are not logged in.
Hello all,
I found out about the http://pocketmod.com/ site a while ago, and was interested in using their daytimer idea, however, the online generator was too limited for what I want to use it for. There is a shell script that can put together a pocketmod daytimer from individual pages, but the content itself is proving to be the problem. What I would like to set up is a system in which, every week (say, Sunday night), a cron job will run, which will "print" the appointments from my calendar, one page for each day, to individual PDFs, with my todo list in an eighth file, then run them through the pocketmod script, and finally print off a hardcopy.
The main problem I'm having is that I'm not aware of an easy way to pull the day's appointments from an *.ics calendar file, to create a timesheet for that day. I'd ideally like something that can be done with scripting, although the least complex solution is preferred. My todo list is currently handled by KAddressbook, and I haven't looked into how that is stored yet, but if anyone knows off the top of their head, I wouldn't mind a pointer. I have searched for information on this, but short of reading through the ICS format spec and writing my own parser (which I'd rather not do), I'm at a loss. I will admit that I have only been looking for ways to do this from a script (my initial intention), so I may have missed something obvious.
Any suggestions would be appreciated.
-Jeffery
Offline
Offline
Since you said KCalendar uses ICS files I'm hoping it uses the same format as iCalendar. Since iCalendar is pretty popular there are a number of parsers already created in a few languages. Perl is my favorite language and I've already seen a bunch of parses on CPAN like Data::ICal and iCal::Parser. I found at least one Python parser. Google around for your preferred language.
I know perl has a few PDF editing modules, I have used PDF::Reuse myself which is pretty simple and fast. I'll bet python has some, as well. With PDF::Reuse I read in a PDF file as a simple template and printed text on top of it. This was tedious, finding the coordinates and such, but was straightforward. Or maybe there is another way you can find to get it to PDF.
Hopefully ICS is what I think it is and KCalendar follows the standard close enough. If so, parsing could be alot easier than printing to PDF.
Offline
As juster suggested, perl has modules available for working with ICS files. I'd go with that
[git] | [AURpkgs] | [arch-games]
Offline