documented the renderer section

This commit is contained in:
Hellow
2023-07-27 23:05:49 +02:00
parent db6d5d9e4c
commit d819450e4b
6 changed files with 8144 additions and 7738 deletions

View File

@@ -0,0 +1,18 @@
from pathlib import Path
import json
from .path_manager import LOCATIONS
def dump_to_file(file_name: str, payload: str, is_json: bool = False, exit_after_dump: bool = True):
path = Path(LOCATIONS.TEMP_DIRECTORY, file_name)
print(f"Dumping payload to: \"{path}\"")
if is_json:
payload = json.dumps(json.loads(payload), indent=4)
with path.open("w") as f:
f.write(payload)
if exit_after_dump:
exit()