aboutsummaryrefslogtreecommitdiffstats
path: root/dayplan.pl
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2022-09-14 17:14:45 +0100
committerMatthew Lemon <matt@matthewlemon.com>2022-09-14 17:14:45 +0100
commit75a614e8a614510fc7d0c4852c4c4d2efe4156b0 (patch)
tree6f93bbbeeedd9aa08a468a1825b3c1b1d5b419ca /dayplan.pl
parent58f7c12176c52813004b0b3da3bcd4965d6bee67 (diff)
started work on collecting quicknotes
Diffstat (limited to '')
-rw-r--r--dayplan.pl15
1 files changed, 15 insertions, 0 deletions
diff --git a/dayplan.pl b/dayplan.pl
index c43f5f7..ff9c1d0 100644
--- a/dayplan.pl
+++ b/dayplan.pl
@@ -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(