Commit 9011f578 authored by Merlijn Wajer's avatar Merlijn Wajer
Browse files

scandata: change arguments to scandata_get_skip_pages

parent a8c9ccc6
......@@ -53,13 +53,22 @@ def get_scandata_xml(identifier, source_file):
def scandata_parse(scandata_path):
"""
Parse scandata.xml to native Python format
"""
scandata = xmltodict.parse(open(scandata_path, 'rb').read())
return scandata
def scandata_xml_get_skip_pages(xml_file):
scandata = xmltodict.parse(open(xml_file, 'rb'))
def scandata_get_skip_pages(scandata):
"""
Returns a list of indexes of pages in scandata.xml that have
addToAccessFormats = false
Args:
* scandata: Parsed scandata as returned by scandata_parse
"""
skip = []
for idx in range(len(scandata['book']['pageData']['page'])):
......@@ -71,5 +80,3 @@ def scandata_xml_get_skip_pages(xml_file):
pass
return skip
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment