added option to skip fetching remote profile data
This commit is contained in:
parent
0eb134136f
commit
57bd52e537
@ -277,11 +277,15 @@ if __name__ == "__main__":
|
||||
help="sorts content from oldest to newest"
|
||||
" (this is a separate operation from page generation)", \
|
||||
action="store_true")
|
||||
p.add_argument("--skip-fetch", \
|
||||
help="skips fetching profile data from remote sources;"
|
||||
" has no effect if webring is not enabled",\
|
||||
action="store_true")
|
||||
args = p.parse_args()
|
||||
if args.sort:
|
||||
sort(args.content)
|
||||
exit()
|
||||
return args.template, args.content
|
||||
return args.template, args.content, args.skip_fetch
|
||||
|
||||
# assume relative path
|
||||
def demote_css(template, css_list, level=1):
|
||||
@ -476,7 +480,7 @@ if __name__ == "__main__":
|
||||
return render(list_of_json_objs, f_cfg["format"])
|
||||
|
||||
def main():
|
||||
tpl, content = get_args()
|
||||
tpl, content, skip_fetch = get_args()
|
||||
cfg = load_settings()
|
||||
if cfg == None:
|
||||
print("exit: no settings.toml found.", file=sys.stderr)
|
||||
@ -511,6 +515,7 @@ if __name__ == "__main__":
|
||||
if cfg["webring"]["enabled"] == True:
|
||||
export_profile(
|
||||
len(p), p[0].get_epoch_time(), cfg["webring"] )
|
||||
if not skip_fetch:
|
||||
fellows = fn1(cfg["webring"]["following"] )
|
||||
if fellows != []:
|
||||
updated += writepage(
|
||||
|
Loading…
x
Reference in New Issue
Block a user