[+] Pack resources

This commit is contained in:
Hykilpikonna
2021-12-13 18:01:48 -05:00
parent 70df2ce43a
commit b7e11cb45b
+7 -1
View File
@@ -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)