Skip to content

Commit

Permalink
Copy cover image
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoden committed Feb 28, 2020
1 parent 6080f67 commit d55cf05
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/tei2imxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import re
import subprocess
import pickle
import shutil
import shlex
import argparse
import configparser
Expand Down Expand Up @@ -1452,6 +1453,12 @@ def main():

publication_language = xml_tree.xpath("//t:teiHeader/t:profileDesc/t:langUsage/t:language/@ident", namespaces=NS_MAP)[0]

cover_image_path = xml_tree.xpath("//t:text/t:front/t:figure[@type='cover']/t:graphic/@url", namespaces=NS_MAP)[0]

shutil.copy( INPUT_DIR / cover_image_path,
OUTPUT_DIR / "Cover.jpg"
)

bib_data = check_bibliography(xml_tree)

logging.debug("Creating bibliographies.")
Expand Down

0 comments on commit d55cf05

Please sign in to comment.