aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2022-09-22 16:13:14 +0100
committerMatthew Lemon <matt@matthewlemon.com>2022-09-22 16:13:14 +0100
commit88cab08629c7f4fa62101eb74a0c5eff8d56e824 (patch)
tree70495997cad24f8122d867f8382797d6a71b9085
parent5062af007700e775d128ca2e7e925c0b74ceed60 (diff)
better listing of reminders
-rwxr-xr-xcalendar/dayplan_revised.pl18
1 files changed, 11 insertions, 7 deletions
diff --git a/calendar/dayplan_revised.pl b/calendar/dayplan_revised.pl
index ba3352e..98b359c 100755
--- a/calendar/dayplan_revised.pl
+++ b/calendar/dayplan_revised.pl
@@ -71,10 +71,10 @@ sub qnoteblock {
my $qnote_block;
if (scalar @{$quicknotes_ref} == 0) {
- $qnote_block = "# Quicknotes:\nNo quicknotes today.\n";
+ $qnote_block = "## Quicknotes:\nNo quicknotes today.\n";
} else
{
- unshift @$quicknotes_ref, "# Quicknotes:\n";
+ unshift @$quicknotes_ref, "## Quicknotes:\n";
$qnote_block = "@{$quicknotes_ref}"."from:"."\n"."@{$qfiles_ref}";
}
return $qnote_block;
@@ -100,7 +100,7 @@ sub twblock {
my $tw= qx(task project:$project status:pending $type:$y-$m-$d export);
my $text = $json->decode( $tw );
my @output;
- push @output, "# Taskwarrior $type - $project:\n";
+ push @output, "## Taskwarrior $type - $project:\n";
foreach my $h (@{$text}) {
push @output, sprintf ("* %-16s: %s\n", ${$h}{'project'}, ${$h}{'description'});
}
@@ -113,10 +113,14 @@ sub remindersblock {
my $reminders = qx(ssh bobbins remind ~/.reminders $y-$m-$d);
$reminders =~ s/\s{2,}/\n/gs;
$reminders =~ s/^Reminders.+\:\n//;
- $reminders =~ s/^/\* /gs;
- $reminders =~ s/\n/\n\* /gs;
- my $rheader = "\n# Reminders:\n";
- return $rheader . $reminders;
+ my @rems = split /\n/, $reminders;
+ my @out_rems;
+ foreach my $r (@rems) {
+ my $s = sprintf("* %s\n", $r);
+ push @out_rems, $s;
+ }
+ unshift @out_rems, "\n## Reminders:\n";
+ return @out_rems;
}
sub timeblock {