replaced placeholder function names

This commit is contained in:
likho 2023-09-30 01:24:46 -07:00
parent eec7bc5fff
commit db14ea6b3d

View File

@ -369,7 +369,7 @@ if __name__ == "__main__":
with open(config["file_output"], 'w') as f: with open(config["file_output"], 'w') as f:
print(json.dumps(p), file=f) print(json.dumps(p), file=f)
def fn1(f_cfg): # come up with better name later/ def get_webring(f_cfg): # come up with better name later/
import pycurl import pycurl
from io import BytesIO from io import BytesIO
def get_proxy(): def get_proxy():
@ -445,7 +445,7 @@ if __name__ == "__main__":
print("\tsource: ", profile, file=sys.stderr) print("\tsource: ", profile, file=sys.stderr)
return rendered return rendered
def fn1a(profiles, save_path, img_src): def get_avatars(profiles, save_path, img_src):
import hashlib import hashlib
imgs, info = fetch([p["avatar"] for p in profiles]) imgs, info = fetch([p["avatar"] for p in profiles])
l = len(imgs) l = len(imgs)
@ -475,7 +475,7 @@ if __name__ == "__main__":
if f_cfg["internal-avatars"]["enabled"]: if f_cfg["internal-avatars"]["enabled"]:
a = f_cfg["internal-avatars"]["local_path_to_avatars"] a = f_cfg["internal-avatars"]["local_path_to_avatars"]
b = f_cfg["internal-avatars"]["path_to_avatars"] b = f_cfg["internal-avatars"]["path_to_avatars"]
fn1a(list_of_json_objs, a, b) get_avatars(list_of_json_objs, a, b)
list_of_json_objs.sort(key=lambda e: e["last-updated"], reverse=True) list_of_json_objs.sort(key=lambda e: e["last-updated"], reverse=True)
return render(list_of_json_objs, f_cfg["format"]) return render(list_of_json_objs, f_cfg["format"])
@ -516,7 +516,7 @@ if __name__ == "__main__":
export_profile( export_profile(
len(p), p[0].get_epoch_time(), cfg["webring"] ) len(p), p[0].get_epoch_time(), cfg["webring"] )
if not skip_fetch: if not skip_fetch:
fellows = fn1(cfg["webring"]["following"] ) fellows = get_webring(cfg["webring"]["following"] )
if fellows != []: if fellows != []:
updated += writepage( updated += writepage(
tpl, fellows, tc, cfg["page"], subdir="placeholder" ) tpl, fellows, tc, cfg["page"], subdir="placeholder" )