diff options
author | andrewdkim <adkim414@gmail.com> | 2019-07-29 12:24:03 -0400 |
---|---|---|
committer | andrewdkim <adkim414@gmail.com> | 2019-07-29 12:24:03 -0400 |
commit | 10a5b5a99ae77d890412b3a3d25b6b85c935f25b (patch) | |
tree | 506f98d8632df09cfc1f9d25bf0e81891575f623 /src/scraping/buxton/scraper.py | |
parent | afe2355cd66c98e391965ebfe022d8f8607ac794 (diff) | |
parent | e7ea2028f54787d6c92fb22b789f17b7268d3793 (diff) |
Merged from master
Diffstat (limited to 'src/scraping/buxton/scraper.py')
-rw-r--r-- | src/scraping/buxton/scraper.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/scraping/buxton/scraper.py b/src/scraping/buxton/scraper.py index 48b8fe3fa..182b22a1a 100644 --- a/src/scraping/buxton/scraper.py +++ b/src/scraping/buxton/scraper.py @@ -1,4 +1,5 @@ import os +from shutil import copyfile import docx2txt from docx import Document from docx.opc.constants import RELATIONSHIP_TYPE as RT @@ -233,6 +234,8 @@ def parse_document(file_name: str): for image in os.listdir(dir_path): count += 1 view_guids.append(write_image(pure_name, image)) + copyfile(dir_path + "/" + image, dir_path + + "/" + image.replace(".", "_o.", 1)) os.rename(dir_path + "/" + image, dir_path + "/" + image.replace(".", "_m.", 1)) print(f"extracted {count} images...") |