import os import json from subscription import get_subscription, version targetFile = "dist/%s.json" % version def main(): print( """ ------------------------------------------------------ \tGenerating subscription.json ------------------------------------------------------ """ ) os.makedirs(os.path.dirname(targetFile), exist_ok=True) with open(targetFile, "w", encoding="utf-8") as f: json.dump(get_subscription(), f, ensure_ascii=False, indent=4) print( """ ------------------------------------------------------ \tDone ------------------------------------------------------ """ ) if __name__ == "__main__": main()