Human-readable filenames, skip if exists

This commit is contained in:
Jeremy Penner 2024-10-13 16:09:51 -04:00
parent 1fda53e947
commit ee75d7973d

View file

@ -18,8 +18,13 @@ def apps_from_folder(dirname):
get_apps(os.path.join(dirname, "Store Transaction History - Free Apps.csv"))) get_apps(os.path.join(dirname, "Store Transaction History - Free Apps.csv")))
def fetch_app(app, outdir): def fetch_app(app, outdir):
print(f"Downloading {app["Item Description"]}") appname = app["Item Description"]
subprocess.run(["ipatool", "download", "--app-id", app["id"], "-o", outdir]) filename = os.path.join(outdir, f'{appname}.ipa')
if os.path.exists(filename):
print(f"{appname} exists, skipping")
else:
print(f"Downloading {appname}")
subprocess.run(["ipatool", "download", "--app-id", app["id"], "-o", filename])
def main(): def main():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(