Skip to content
Snippets Groups Projects
Commit 2eaada06 authored by Gerhard Gonter's avatar Gerhard Gonter :speech_balloon:
Browse files

tom find: -T .. show title only on

parent 07c3a926
No related branches found
No related tags found
No related merge requests found
......@@ -58,6 +58,7 @@ my ($note_dir)= Tomboy::paths();
my $start_tb= 0;
my $start_visual_editor= 0; # AKA $EDITOR
my $dump_note= 0;
my $verbosity= 'dump';
my $toc;
my $op_code;
my @PAR;
......@@ -89,6 +90,7 @@ while (my $arg= shift (@ARGV))
{
if ($a eq 'd') { $note_dir= shift (@ARGV); $note_dir_changed= 1; }
elsif ($a eq 't') { $toc_file= shift (@ARGV); }
elsif ($a eq 'T') { $verbosity= 'title'; }
elsif ($a eq 'e') { $start_tb= 1; }
elsif ($a eq 'v') { $start_visual_editor= 1; }
elsif ($a eq 'D') { $dump_note= 1; }
......@@ -185,8 +187,11 @@ sub find_note
foreach my $res (@res) { $uuid{$res->{'uuid'}}= $res; } # TODO: count hits
}
print '='x72, "\n";
foreach my $uuid (keys %uuid)
{
my $rec= $uuid{$uuid};
if ($start_tb)
{
my @par= ('uuid' => $uuid);
......@@ -202,11 +207,18 @@ sub find_note
}
elsif ($dump_note)
{
dump_note($uuid{$uuid}->{'fnm'});
dump_note($rec->{'fnm'});
}
else
{
if ($verbosity eq 'title')
{
print $rec->{'title'}, "\n";
}
else
{
print Dumper ($uuid{$uuid});
print Dumper ($rec);
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment