From 9a5d0559f7fb7c30496a8c6b1f5855f917cc0d13 Mon Sep 17 00:00:00 2001 From: Gerhard Gonter <ggonter@gmail.com> Date: Wed, 24 Aug 2016 18:03:14 +0200 Subject: [PATCH] added --today option to start with today's calendar page (note-name format should be configurable!) --- perl/Gnome-Tomboy/tom | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/perl/Gnome-Tomboy/tom b/perl/Gnome-Tomboy/tom index 250f05c..4ec857d 100755 --- a/perl/Gnome-Tomboy/tom +++ b/perl/Gnome-Tomboy/tom @@ -83,6 +83,14 @@ while (my $arg= shift (@ARGV)) if ($op eq 'note-path') { $note_dir= $val || shift(@ARGV); $note_dir_changed= 1; } elsif ($op eq 'export-path') { $export_path= $val || shift(@ARGV); } elsif ($op eq 'notebook') { $notebook= $val || shift(@ARGV); } + elsif ($op eq 'today') + { + my $note= `date '+%G-KW%W'`; + chop($note); + push (@PAR, $note); + $op_code= 'find'; + $start_tb= 1; + } else { usage(); @@ -111,7 +119,7 @@ while (my $arg= shift (@ARGV)) } } -my $op_code= shift (@PAR) unless (defined ($op_code)); +$op_code= shift (@PAR) unless (defined ($op_code)); print "op_code=[$op_code] par=[", join (';', @PAR), "]\n"; if ($op_code eq 'help') { usage(); } -- GitLab