Skip to content

Commit

Permalink
Assume print images are unrestricted
Browse files Browse the repository at this point in the history
  • Loading branch information
thvitt committed May 8, 2022
1 parent 5aeb874 commit 9b49efd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions utils/find-download-image.py
Expand Up @@ -30,8 +30,10 @@ def download_config(archives_xml="../data/xml/archives.xml"):
rules = facs.attrib
result[id] = rules
except IndexError:
print(f"No facsimile element for {id}")
logger.warning(f"No facsimile element for {id}")
result[id] = {"downloadable": "unknown"}
if "print" not in result:
result["print"] = {"downloadable": "yes"}
return result


Expand Down Expand Up @@ -143,7 +145,7 @@ def main():
options = getargparser().parse_args()
rules = download_config(options.archives)
if logger.isEnabledFor(logging.DEBUG):
logger.debug('Rules: %s', pformat(rules))
logger.info('Rules:\n%s', pformat(rules))
page_data = per_documents_data(options.document_metadata)
with logging_redirect_tqdm():
for page in tqdm(page_data):
Expand Down

0 comments on commit 9b49efd

Please sign in to comment.