From af5c2e34c60e8c44fd77f755729e772ce102340a Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 11 Oct 2023 10:55:48 +0100 Subject: Adds a block from Google calendar And removes the unused school and old calendar block. Relies on vdirsyncer and khal being in use. There are no guards in place to prevent errors arising from this at present. --- calendar/dayplan_revised.pl | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/calendar/dayplan_revised.pl b/calendar/dayplan_revised.pl index bf03b97..a2f6354 100755 --- a/calendar/dayplan_revised.pl +++ b/calendar/dayplan_revised.pl @@ -116,6 +116,18 @@ sub headerblock { "; } +sub gcal_block { + my @output; + push @output, "\n## Google Calendar:\n"; + my $caldata= `/home/lemon/src/virtualenvs/khal-venv/bin/khal list`; + my @lines = split(/\n/, $caldata); + foreach my $l (@lines) { + my $s = sprintf("%s\n", $l); + push @output, $s; + } + return @output; +} + sub qnoteblock { $" = ""; my $quicknotes_ref =shift; @@ -221,8 +233,9 @@ sub generate_text { twblock($year, $month, $day, "h", "due"), qnoteblock($quicknotes_ref, $qfiles_ref), remindersblock($year, $month, $day), - schoolblock($day), - timeblock, + gcal_block, + # schoolblock($day), + # timeblock, historic_lines_block($month, $day); } -- cgit v1.2.3