Add preset processing from backend

This commit is contained in:
Kiryl
2022-07-27 20:19:48 +03:00
parent 32a54f0e4e
commit 84b692d39b
7 changed files with 69 additions and 68 deletions

View File

@@ -26,7 +26,7 @@ def process_images(access, html_path, book_id, body_tag):
folder_path = os.path.dirname(
os.path.dirname(os.path.abspath(__file__)))
new_path = pathlib.Path(os.path.join(
folder_path, f'../json/img_{book_id}/'))
folder_path, f'../books/json/img_{book_id}/'))
new_path.mkdir(exist_ok=True)
new_img_path = new_path / img_name
copyfile(img_path, new_img_path)