Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
docu-tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gerhard Gonter
docu-tools
Commits
4938ed1f
Commit
4938ed1f
authored
10 years ago
by
Gerhard Gonter
Browse files
Options
Downloads
Patches
Plain Diff
start to deal with broken note files
parent
1c0ce15d
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
perl/Gnome-Tomboy/lib/Tomboy/Directory.pm
+11
-1
11 additions, 1 deletion
perl/Gnome-Tomboy/lib/Tomboy/Directory.pm
perl/Gnome-Tomboy/lib/Tomboy/TOC.pm
+1
-0
1 addition, 0 deletions
perl/Gnome-Tomboy/lib/Tomboy/TOC.pm
with
12 additions
and
1 deletion
perl/Gnome-Tomboy/lib/Tomboy/Directory.pm
+
11
−
1
View file @
4938ed1f
...
@@ -99,6 +99,7 @@ print __LINE__, " scan_dir: quick=[$quick]\n";
...
@@ -99,6 +99,7 @@ print __LINE__, " scan_dir: quick=[$quick]\n";
$quick
=
0
;
$quick
=
0
;
}
}
my
@broken
=
();
my
@res
=
();
my
@res
=
();
my
(
$cnt_added
,
$cnt_updated
,
$cnt_unchanged
,
$cnt_dropped
)
=
(
0
,
0
,
0
,
0
);
my
(
$cnt_added
,
$cnt_updated
,
$cnt_unchanged
,
$cnt_dropped
)
=
(
0
,
0
,
0
,
0
);
NOTE:
while
(
my
$e
=
readdir
(
DIR
))
NOTE:
while
(
my
$e
=
readdir
(
DIR
))
...
@@ -152,8 +153,10 @@ print __LINE__, " scan_dir: quick=[$quick]\n";
...
@@ -152,8 +153,10 @@ print __LINE__, " scan_dir: quick=[$quick]\n";
{
{
print
"
ATTN: parsing [
$fp
] returned undefined note!
\n
";
print
"
ATTN: parsing [
$fp
] returned undefined note!
\n
";
print
"
caller:
",
join
('
',
caller
()),
"
\n
";
print
"
caller:
",
join
('
',
caller
()),
"
\n
";
push
(
@broken
,
$fp
);
next
NOTE
;
next
NOTE
;
}
}
# print "n: ", main::Dumper ($n);
# print "n: ", main::Dumper ($n);
my
%rec
=
map
{
$_
=>
$n
->
{
$_
}
}
@TB_note_attrs
;
my
%rec
=
map
{
$_
=>
$n
->
{
$_
}
}
@TB_note_attrs
;
...
@@ -179,7 +182,14 @@ print __LINE__, " scan_dir: quick=[$quick]\n";
...
@@ -179,7 +182,14 @@ print __LINE__, " scan_dir: quick=[$quick]\n";
# TODO: save statistics and/or file status for later processing
# TODO: save statistics and/or file status for later processing
print
"
statistics: cnt_added=
$cnt_added
cnt_updated=
$cnt_updated
cnt_dropped=
$cnt_dropped
cnt_unchanged=
$cnt_unchanged
\n
";
my
$cnt_broken
=
@broken
;
print
"
statistics: cnt_added=
$cnt_added
cnt_updated=
$cnt_updated
cnt_dropped=
$cnt_dropped
cnt_unchanged=
$cnt_unchanged
cnt_broken=
$cnt_broken
\n
";
if
(
$cnt_broken
>
0
)
{
print
"
\n
broken files:
\n
*
",
join
("
\n
*
",
@broken
),
"
\n
";
}
(
wantarray
)
?
@res
:
\
@res
;
(
wantarray
)
?
@res
:
\
@res
;
}
}
...
...
This diff is collapsed.
Click to expand it.
perl/Gnome-Tomboy/lib/Tomboy/TOC.pm
+
1
−
0
View file @
4938ed1f
...
@@ -67,6 +67,7 @@ print main::Dumper ($self);
...
@@ -67,6 +67,7 @@ print main::Dumper ($self);
my
(
$mode
,
$toc
,
$rows
)
=
$self
->
load_toc
();
my
(
$mode
,
$toc
,
$rows
)
=
$self
->
load_toc
();
my
$toc_data
=
$tb_d
->
scan_dir
(
$note_dir
,
$rows
,
$mode
);
my
$toc_data
=
$tb_d
->
scan_dir
(
$note_dir
,
$rows
,
$mode
);
# print "toc_data=[$toc_data]\n";
# TODO: if verbose or so print "toc_data: ", Dumper ($toc_data);
# TODO: if verbose or so print "toc_data: ", Dumper ($toc_data);
$toc
->
{'
data
'}
=
$toc_data
;
$toc
->
{'
data
'}
=
$toc_data
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment