From 2d105f25c430d3bbc1fab00a61143660fe20776b Mon Sep 17 00:00:00 2001 From: sys-nyx Date: Mon, 30 Dec 2024 00:29:07 -0800 Subject: [PATCH] simplified func defintion of generate_html --- write_html.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/write_html.py b/write_html.py index 04c38ba..1262371 100755 --- a/write_html.py +++ b/write_html.py @@ -94,17 +94,17 @@ with open('templates/partial_url.html', 'r', encoding='utf-8') as file: process = psutil.Process(os.getpid()) -def generate_html(subs: list[str], sub_dict, min_score=0, min_comments=0, hide_deleted_comments=False): +def generate_html(subreddits, min_score=0, min_comments=0, hide_deleted_comments=False): delta = timedelta(days=1) user_index = {} processed_subs = [] stat_links = 0 stat_filtered_links = 0 - + subs = [s.lower() for s in subreddits.keys()] for sub in subs: print("Building current sub: ", sub) - threads = sub_dict[sub] + threads = subreddits[sub] print("Total threads to convert: ", len(threads)) built = 0 # write link pages