Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Merlijn Wajer
Python Derivermodule
Commits
19b0df30
Commit
19b0df30
authored
Nov 17, 2020
by
Derek Fukumori
Browse files
scandata: fix scandata path when source file is page_numbers.json
parent
2ea2a759
Changes
1
Hide whitespace changes
Inline
Side-by-side
derivermodule/scandata.py
View file @
19b0df30
...
...
@@ -25,7 +25,11 @@ def get_scandata_xml(identifier, source_file):
zip_path
=
item_dir
/
'scandata.zip'
raw_xml_path
=
item_dir
/
'scandata.xml'
identifier_xml_path
=
item_dir
/
f
'
{
identifier
}
_scandata.xml'
source_xml_path
=
Path
(
f
'
{
source_file
.
rsplit
(
"_"
,
1
)[
0
]
}
_scandata.xml'
)
if
source_file
:
if
source_file
.
endswith
(
'page_numbers.json'
):
source_xml_path
=
Path
(
f
'
{
source_file
[
:
-
18
]
}
_scandata.xml'
)
else
:
source_xml_path
=
Path
(
f
'
{
source_file
.
rsplit
(
"_"
,
1
)[
0
]
}
_scandata.xml'
)
if
source_xml_path
.
exists
():
return
source_xml_path
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment