mirror of
https://github.com/sys-nyx/red-arch.git
synced 2025-05-06 08:45:31 -04:00
simplified func defintion of generate_html
This commit is contained in:
parent
38b3cfbbb4
commit
2d105f25c4
1 changed files with 3 additions and 3 deletions
|
@ -94,17 +94,17 @@ with open('templates/partial_url.html', 'r', encoding='utf-8') as file:
|
||||||
|
|
||||||
process = psutil.Process(os.getpid())
|
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)
|
delta = timedelta(days=1)
|
||||||
user_index = {}
|
user_index = {}
|
||||||
processed_subs = []
|
processed_subs = []
|
||||||
stat_links = 0
|
stat_links = 0
|
||||||
stat_filtered_links = 0
|
stat_filtered_links = 0
|
||||||
|
subs = [s.lower() for s in subreddits.keys()]
|
||||||
for sub in subs:
|
for sub in subs:
|
||||||
print("Building current sub: ", sub)
|
print("Building current sub: ", sub)
|
||||||
|
|
||||||
threads = sub_dict[sub]
|
threads = subreddits[sub]
|
||||||
print("Total threads to convert: ", len(threads))
|
print("Total threads to convert: ", len(threads))
|
||||||
built = 0
|
built = 0
|
||||||
# write link pages
|
# write link pages
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue