[Kde-pim] Holiday Files

John Layt johnlayt at googlemail.com
Fri Jan 15 19:02:25 GMT 2010


On Friday 15 January 2010 15:51:42 Dr. Robert Marmorstein wrote:
> The recent discussion about gb holiday files piqued my curiosity about how
> these work, so I will be playing around with them some.  In addition to the
> usual regional holidays, my school has its own "holidays" after exams and
> such.  It would be neat if I could create a custom "holiday file" for
> these. However, I don't want to lose the regional holidays.  Is there a
> way to "include" another holiday file inside my custom file or will I just
> need to copy and paste them?
> 
> Thanks,
> 
> Robert
> 

I'm not sure the holiday files are the best solution for what you want, unless 
your institution has precise repeatable rules for the holidays/exams that 
don't vary from year to year.  If you only want to see these holidays in 
KOrganizer, then a separate iCalendar file would be the easiest way to go, but 
that doesn't show up in the Plasma Calendar (not yet anyway, maybe in 4.6).

At the moment KOrganizer and the Plasma Calendar only support selecting a 
single holiday file to be displayed at a time (I plan to change this in 4.5 
for Plasma Calendar at least).  They also only allow you to choose a region 
from the standard resource files and not one of your own.  The easiest way 
would thus be to edit your region's existing holiday file to add your holidays 
at the end of the file.  Alternatively you would have to add a new file to 
your resource directory. You can find the files installed in 
$KDEDIR/share/apps/libkholidays/

Note also that while the Plasma Calendar in 4.3 and earlier showed all 
holidays in a holiday region file, in 4.4 only the days marked as Public 
Holidays will be shown, there was no separate colouring for 'other' days which 
was causing confusion (again, something I plan to be fix in 4.5)

You can find (vague and incomplete) documentation on the file format at:
http://websvn.kde.org/trunk/KDE/kdepimlibs/kholidays/holidays/file-
format.txt?view=markup

You can look at the existing standard region files at: 
http://websvn.kde.org/trunk/KDE/kdepimlibs/kholidays/holidays/

You can try decipher the actual yacc/bison/lex parser code at: 
http://websvn.kde.org/trunk/KDE/kdepimlibs/kholidays/parseholiday.y?view=markup
http://websvn.kde.org/trunk/KDE/kdepimlibs/kholidays/scanholiday.lex?view=markup

Hope that helps.

John.
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list