diff options
author | Matthew Lemon <matt@matthewlemon.com> | 2022-09-14 17:14:45 +0100 |
---|---|---|
committer | Matthew Lemon <matt@matthewlemon.com> | 2022-09-14 17:14:45 +0100 |
commit | 75a614e8a614510fc7d0c4852c4c4d2efe4156b0 (patch) | |
tree | 6f93bbbeeedd9aa08a468a1825b3c1b1d5b419ca /dayplan.pl | |
parent | 58f7c12176c52813004b0b3da3bcd4965d6bee67 (diff) |
started work on collecting quicknotes
Diffstat (limited to '')
-rw-r--r-- | dayplan.pl | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -7,11 +7,26 @@ use DateTime; my $numargs = $#ARGV + 1; my $fp = "/tmp"; +my @quicknotes; my ($dt, $d, $y, $m, $weekday); my @weekdays = qw(Monday Tuesday Wednesday Thursday Friday Saturday Sunday); +my $dayplans = '/home/lemon/Notes/journal/day_plans'; + +# Go back and get short notes from past files +foreach my $f (glob("$dayplans/*.txt")) { + open my $fh, "<", $f or die "Cannot open that file"; + while (<$fh>) { + if ($_ =~ /^- /) { push @quicknotes => $_ }; + } +} +my %riddups = map { $_, 1 } @quicknotes; +@quicknotes = keys %riddups; +print @quicknotes; +exit; + if ($numargs == 1) { ($y, $m, $d) = $ARGV[0] =~ /(\d\d\d\d)-(\d\d)-(\d\d)/; $dt = DateTime->new( |