From b7e11cb45bcf5eb747a655603ba8658cf5219ea9 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Mon, 13 Dec 2021 18:01:48 -0500 Subject: [PATCH] [+] Pack resources --- src/processing.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/processing.py b/src/processing.py index bc34aef..67b0e0d 100644 --- a/src/processing.py +++ b/src/processing.py @@ -14,7 +14,7 @@ import requests from bs4 import BeautifulSoup from py7zr import SevenZipFile -from constants import DATA_DIR, TWEETS_DIR, USER_DIR +from constants import DATA_DIR, TWEETS_DIR, USER_DIR, RES_DIR from utils import read, debug, write, json_stringify @@ -338,3 +338,9 @@ def pack_data() -> None: for p in processed_dirs: debug(f'- Packing {p}') z.writeall(DATA_DIR + p) + + # Pack resources + debug('Packing resources...') + with SevenZipFile(f'{packed_dir}/resources.7z', 'w') as z: + z: SevenZipFile = z + z.writeall(RES_DIR)