def app_list(txt_path="osc-dl_export_app_list.txt", repo="hbb1.oscwii.org"): if txt_path is None: txt_path = "osc-dl_export_app_list.txt" sys.stdout = open(str(txt_path), "w") parsecontents.get(raw=True, repo=repo) sys.stdout.close() sys.stdout = sys.__stdout__ print("Exported application list to " + txt_path)
def export_app_list(txt_path="osc-dl_export_app_list.txt", repo="hbb1.oscwii.org"): if txt_path is None: txt_path = "osc-dl_export_app_list.txt" sys.stdout = open(str(txt_path), "w") parsecontents.get(raw=True, repo=repo) sys.stdout.close() sys.stdout = sys.__stdout__ return txt_path
args = parser.parse_args() # if no argument if args.cmd is None: print(ascii_logo) print("Open Source Software, "+year+". Developed by dhtdht020 @ GitHub.") print("\nRun \""+osc_dl+" --help\" for help.") # list of apps on server command if args.cmd == 'list': if args.host is None: args.host = "hbb1.oscwii.org" parsecontents.get(repo=args.host, raw=args.raw) # update osc-dl command if args.cmd == 'update': updater.init_update() # query app command if args.cmd == 'query': if args.host is None: args.host = "hbb1.oscwii.org" if args.verify is False: parsecontents.query(args.name, repo=args.host) else: