[scripts/supportedsites] add 'main()' function
This commit is contained in:
@@ -741,8 +741,14 @@ Consider all listed sites to potentially be NSFW.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
categories, domains = build_extractor_list()
|
def main(path=None):
|
||||||
PATH = (sys.argv[1] if len(sys.argv) > 1 else
|
categories, domains = build_extractor_list()
|
||||||
util.path("docs", "supportedsites.md"))
|
|
||||||
with util.lazy(PATH) as fp:
|
if path is None:
|
||||||
fp.write(generate_output(COLUMNS, categories, domains))
|
path = util.path("docs", "supportedsites.md")
|
||||||
|
with util.lazy(path) as fp:
|
||||||
|
fp.write(generate_output(COLUMNS, categories, domains))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main(sys.argv[1] if len(sys.argv) > 1 else None)
|
||||||
|
|||||||
Reference in New Issue
Block a user