aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2022-09-14 20:41:39 +0100
committerMatthew Lemon <matt@matthewlemon.com>2022-09-14 20:41:39 +0100
commit9a361f268a71833945582f0fd8ecf56aa34d5bcc (patch)
tree0b523d1284092d51fe73ed744271b10feffde28a
parent3f6404767ce6974ed79a6820ae09f3daa0602c8a (diff)
pretty much working dayplan now
-rw-r--r--dayplan.pl18
1 files 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");