diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2022-09-14 17:04:48 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2022-09-14 17:04:48 +0100 |
commit | 58f7c12176c52813004b0b3da3bcd4965d6bee67 (patch) | |
tree | 621060d6a02d3636a82298511bf212ceef4ac0c1 | |
parent | 1cd266e34ecb354a6c39c50946f667359233181f (diff) |
dont reference school on weekends
-rw-r--r-- | dayplan.pl | 26 |
1 files changed, 19 insertions, 7 deletions
@@ -29,21 +29,33 @@ else { $weekday = $weekdays[$dt->day_of_week - 1]; } +sub schoollines { + my $day = shift; + print "In schoolines\n"; + if ($day =~ /Saturday|Sunday/) { + return ""; + } else + { + return " +08:15 - 08:20 - Harvey to school +08:45 - 09:00 - Sophie to school +09:15 - 09:30 - Email"; + } +} + my $reminders = qx(ssh bobbins remind ~/.reminders $y-$m-$d); $reminders =~ s/\s{2,}/\n/gs; $reminders =~ s/^Reminders.+\:\n//; -my $template = " -Goal for $weekday: [replace this with your goal] +my $s = schoollines($weekday); + +my $template = "Goal for $weekday: [replace this with your goal] --- Reminders: - +--------- $reminders - -08:15 - 08:20 - Harvey to school -08:45 - 09:00 - Sophie to school -09:15 - 09:30 - Email +$s 09:30 - 10:00 - 10:00 - 11:00 - 11:00 - 12:00 - |