diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2022-09-14 20:04:08 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2022-09-14 20:04:08 +0100 |
commit | 3f6404767ce6974ed79a6820ae09f3daa0602c8a (patch) | |
tree | ac8608147ef26ec3142bf7dff062e8dc7ee411d5 /dayplan.pl | |
parent | 9e7cb6be078ceccdda6ea888be8e3747322f84eb (diff) |
finally got the fucking lists aligned
Diffstat (limited to 'dayplan.pl')
-rw-r--r-- | dayplan.pl | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -19,15 +19,18 @@ my $fp = "/tmp"; foreach my $f (glob("$dayplans/*.txt")) { open my $fh, "<", $f or die "Cannot open that file"; while (<$fh>) { - if ($_ =~ /^- /) { - push @quicknotes => $_; + if ($_ =~ /^(- \w.*)$/) { + push @quicknotes => "$1\n"; push @qfiles => "$f\n"; }; } } -my %riddups = map { $_, 1 } @quicknotes; +# deduplicate stuff +my %riddups = map { $_, "" } @quicknotes; @quicknotes = keys %riddups; +my %riddfiles = map { $_, "" } @qfiles; +@qfiles = keys %riddfiles; if ($numargs == 1) { ($y, $m, $d) = $ARGV[0] =~ /(\d\d\d\d)-(\d\d)-(\d\d)/; @@ -65,6 +68,7 @@ $reminders =~ s/^Reminders.+\:\n//; my $s = schoollines($weekday); +$" = ""; my $template = "Goal for $weekday: [replace this with your goal] --- |