From 9a361f268a71833945582f0fd8ecf56aa34d5bcc Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Wed, 14 Sep 2022 20:41:39 +0100 Subject: pretty much working dayplan now --- dayplan.pl | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/dayplan.pl b/dayplan.pl index d43bc0d..7a6a77d 100644 --- a/dayplan.pl +++ b/dayplan.pl @@ -12,7 +12,6 @@ my ($dt, $d, $y, $m, $weekday); my @weekdays = qw(Monday Tuesday Wednesday Thursday Friday Saturday Sunday); my $dayplans = '/home/lemon/Notes/journal/day_plans'; my $numargs = $#ARGV + 1; -my $fp = "/tmp"; # Go back and get short notes from past files @@ -69,13 +68,20 @@ $reminders =~ s/^Reminders.+\:\n//; my $s = schoollines($weekday); $" = ""; + +my $qnote_block; +if (scalar @quicknotes == 0) { + $qnote_block = "No quicknotes today.\n"; +} else +{ + $qnote_block = "@quicknotes"."from:"."\n"."@qfiles"; +} + + my $template = "Goal for $weekday: [replace this with your goal] --- -@quicknotes -from: -@qfiles - +$qnote_block Reminders: --------- $reminders @@ -90,7 +96,7 @@ $s 16:00 - 17:00 - "; -my $today_planner = sprintf("%s/%d-%02d-%02d.txt", $fp,$y,$m,$d); +my $today_planner = sprintf("%s/%d-%02d-%02d.txt", $dayplans,$y,$m,$d); if (-e $today_planner) { exec("vim", "$today_planner"); -- cgit v1.2.3