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

improved TOC generation

parent 80a55b8b
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,8 @@ sub scan_dir
my $quick= shift; # 0/undef: full scan
# 1: quick scan
print __LINE__, " scan_dir: quick=[$quick]\n";
$dir=~ s#/+$##;
unless (opendir (DIR, $dir))
{
......@@ -90,7 +92,7 @@ sub scan_dir
print "scan_dir: quick=[$quick]\n";
# print "rows: ", Dumper ($rows);
%fnm= map { $_->{'fnm'} => $_ } @$rows;
# print "fnm: ", Dumper (\%fnm);
# print __LINE__, " fnm: ", Dumper (\%fnm);
}
else
{
......@@ -117,6 +119,7 @@ sub scan_dir
if ($quick)
{
my $x_rec= $fnm{$fp};
# print __LINE__, " fp=[$fp]\n";
delete ($fnm{$fp});
if (defined ($x_rec))
......@@ -166,6 +169,7 @@ sub scan_dir
closedir (DIR);
# TODO: list dropped files
print __LINE__, " fnm: ", Dumper (\%fnm);
foreach my $fp (keys %fnm)
{
print "dropped: ", $fp, "\n";
......
......@@ -51,6 +51,7 @@ print "find: where=[$where] pattern=[$pattern]\n";
@res;
}
# Note: there is also a Tomboy::Directoy::scan_dir()
sub scan_dir
{
my $self= shift;
......
......@@ -14,6 +14,7 @@ do stuff with Tomboy files
=head1 OPTIONS
--note-path <dir>
-d <dir> ... full path of Tomboy notes directory
-e ... edit note (used with find)
......@@ -71,8 +72,13 @@ while (my $arg= shift (@ARGV))
{
my ($op, $val)= split ('=', $1);
print "op=[$op] val=[$val]\n";
if ($op eq 'note-path') { $note_dir= $val || shift(@ARGV); $note_dir_changed= 1; }
else
{
usage();
}
}
elsif ($arg =~ /^-(.+)/)
{
my @a= split ('', $1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment