From d54ee81c2e6208f4d53f77d49ffff4a0ac7a1d9d Mon Sep 17 00:00:00 2001 From: Ari Archer Date: Tue, 12 Apr 2022 23:43:22 +0300 Subject: [PATCH] update @ Tue 12 Apr 23:43:22 EEST 2022 Signed-off-by: Ari Archer --- scripts/blog | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/scripts/blog b/scripts/blog index beedc88..fdecd46 100755 --- a/scripts/blog +++ b/scripts/blog @@ -131,27 +131,6 @@ def log(message: str, header: str = "ERROR", code: int = EXIT_ERR) -> int: return code -def generate_file_hash(filename: str): - hash_filename = filename + ".hash" - - log(filename, "READ") - - with open(filename, "rb") as file: - file_content = file.read() - - log(hash_filename, "GENERATE") - - with open(hash_filename, "w") as hash_file: - for hashf in hashlib.algorithms_available: - try: - print( - f"{hashf} {getattr(hashlib, hashf)(file_content).hexdigest()}", - file=hash_file, - ) - except (TypeError, AttributeError): - pass - - def sanitise_title(title: str, titleset: Dict) -> str: _title: str = "" @@ -565,12 +544,6 @@ def generate_metadata(config: Dict) -> Tuple[int, Dict]: manifest, ) - log(f"Hashing {manifest.name}", "HASH") - generate_file_hash(manifest.name) - - log(f"Hashing {DEFAULT_CONFIG_FILE}", "HASH") - generate_file_hash(DEFAULT_CONFIG_FILE) - return EXIT_OK, config