aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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(