$ python3 lemmy_migrate.py
Traceback (most recent call last):
File "/home/draconic/Programs/lemmy-migrate/lemmy_migrate.py", line 1, in <module>
{"payload":{"allShortcutsEnabled":true,"fileTree":{"":{"items":[{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"__init__.py","path":"__init__.py","contentType":"file"},{"name":"config.ini","path":"config.ini","contentType":"file"},{"name":"lemmy.py","path":"lemmy.py","contentType":"file"},{"name":"lemmy_migrate.py","path":"lemmy_migrate.py","contentType":"file"}],"totalCount":6}},"fileTreeProcessingTime":2.737098,"foldersToFetch":[],"reducedMotionEnabled":"system","repo":{"id":654366789,"defaultBranch":"master","name":"lemmy_migrate","ownerLogin":"wescode","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2023-06-16T01:26:41.000+00:00","ownerAvatar":"https://avatars.githubusercontent.com/u/6325477?v=4","public":true,"private":false,"isOrgOwned":false},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1690312392.0","canEdit":true,"refType":"branch","currentOid":"a5fadd9586c316dfb34bfb2ba3a491b88f6e099a"},"path":"lemmy_migrate.py","currentUser":{"id":44508470,"login":"DraconicNEO","userEmail":"[email protected]"},"blob":{"rawLines":["import sys","import argparse","import configparser","import json","from lemmy import Lemmy","","","def get_config(cfile):"," config = configparser.ConfigParser(interpolation=None)"," read = config.read(cfile)"," if not read:"," print(f\"Could not read config {cfile}!\")"," sys.exit(1)",""," accounts = {i: dict(config.items(i)) for i in config.sections()}"," return accounts","","","def get_args():"," parser = argparse.ArgumentParser("," prog=\"lemmy_migrate\","," description=f\"Migrate subscribed \""," f\"communities from one account \""," f\"to another\","," )",""," parser.add_argument("," \"-c\", required=True, help=\"Path to config file\", metavar=\"<config file>\""," )"," parser.add_argument("," \"-u\","," help=\"use to update main account subscriptions\","," action=\"store_true\","," default=False,"," )"," parser.add_argument("," \"-e\", help=\"Export main account subscriptions to json\", metavar=\"<export file>\""," )"," parser.add_argument("," \"-i\", help=\"Import subscriptions from json file\", metavar=\"<import file>\""," )"," args = parser.parse_args()"," return args","","","def sync_subscriptions(src_acct: Lemmy, dest_acct: Lemmy, from_backup):"," print("," f\"\\n[ Subscribing {dest_acct.site_url} to new communities from \""," f\"{src_acct.site_url} ]\""," )"," print(\" Getting list of subscribed communities from the two communities\")"," if from_backup:"," src_comms = from_backup"," else:"," src_comms = src_acct.get_communities()"," print("," f\" {len(src_comms)} subscribed communities found in the source\""," f\" {src_acct.site_url}\""," )",""," dest_comms = dest_acct.get_communities()"," print("," f\" {len(dest_comms)} subscribed communities found in the target\""," f\" {dest_acct.site_url}\""," )",""," new_communities = [c for c in src_comms if c not in dest_comms]",""," if new_communities:"," print(f\" Subscribing to {len(new_communities)} new communities\")"," dest_acct.subscribe(new_communities)","","","def write_backup(account: Lemmy, output: str) -> None:"," comms = account.get_communities()"," try:"," with open(output, \"w\") as f:"," json.dump({account.site_url: list(comms)}, f, indent=4)"," except Exception as e:"," print(f\" Error exporting file {output} -- {e}\")"," else:"," print(f\" {len(comms)} Subscriptions backed up to {output}\")","","","def read_backup(file: str) -> set | None:"," comms = None"," try:"," with open(file, \"r\") as f:"," data = json.load(f)"," comms = {c for k, v in data.items() for c in v}"," except Exception:"," print(f\" Failed to read import list {file}\")",""," return comms","","","def main():"," cfg = get_args()"," accounts = get_config(cfg.c)",""," # source site"," print(f\"\\n[ Getting Main Account info -\" f\" {accounts['Main Account']['site']} ]\")"," main_lemming = Lemmy(accounts[\"Main Account\"][\"site\"])"," main_lemming.login("," accounts[\"Main Account\"][\"user\"], accounts[\"Main Account\"][\"password\"]"," )"," accounts.pop(\"Main Account\", None)",""," # export subscriptions"," if cfg.e:"," write_backup(main_lemming, cfg.e)"," return",""," # import communites backed up if specified"," comms_backup = None"," if cfg.i and not cfg.u:"," comms_backup = read_backup(cfg.i)",""," # sync main account communities to each account"," for acc in accounts:"," print(f\"\\n[ Getting {acc} - {accounts[acc]['site']} ]\")"," new_lemming = Lemmy(accounts[acc][\"site\"])"," new_lemming.login(accounts[acc][\"user\"], accounts[acc][\"password\"])",""," if cfg.u:"," print(\" Update main flag set. Updating main account subscriptions\")"," src = new_lemming"," dest = main_lemming"," else:"," src = main_lemming"," dest = new_lemming",""," sync_subscriptions(src, dest, comms_backup)","","","if __name__ == \"__main__\":"," main()"],"stylingDirectives":[[{"start":0,"end":6,"cssClass":"pl-k"},{"start":7,"end":10,"cssClass":"pl-s1"}],[{"start":0,"end":6,"cssClass":"pl-k"},{"start":7,"end":15,"cssClass":"pl-s1"}],[{"start":0,"end":6,"cssClass":"pl-k"},{"start":7,"end":19,"cssClass":"pl-s1"}],[{"start":0,"end":6,"cssClass":"pl-k"},{"start":7,"end":11,"cssClass":"pl-s1"}],[{"start":0,"end":4,"cssClass":"pl-k"},{"start":5,"end":10,"cssClass":"pl-s1"},{"start":11,"end":17,"cssClass":"pl-k"},{"start":18,"end":23,"cssClass":"pl-v"}],[],[],[{"start":0,"end":3,"cssClass":"pl-k"},{"start":4,"end":14,"cssClass":"pl-en"},{"start":15,"end":20,"cssClass":"pl-s1"}],[{"start":4,"end":10,"cssClass":"pl-s1"},{"start":11,"end":12,"cssClass":"pl-c1"},{"start":13,"end":25,"cssClass":"pl-s1"},{"start":26,"end":38,"cssClass":"pl-v"},{"start":39,"end":52,"cssClass":"pl-s1"},{"start":52,"end":53,"cssClass":"pl-c1"},{"start":53,"end":57,"cssClass":"pl-c1"}],[{"start":4,"end":8,"cssClass":"pl-s1"},{"start":9,"end":10,"cssClass":"pl-c1"},{"start":11,"end":17,"cssClass":"pl-s1"},{"start":18,"end":22,"cssClass":"pl-en"},{"start":23,"end":28,"cssClass":"pl-s1"}],[{"start":4,"end":6,"cssClass":"pl-k"},{"start":7,"end":10,"cssClass":"pl-c1"},{"start":11,"end":15,"cssClass":"pl-s1"}],[{"start":8,"end":13,"cssClass":"pl-en"},{"start":14,"end":47,"cssClass":"pl-s"},{"start":38,"end":45,"cssClass":"pl-s1"},{"start":38,"end":39,"cssClass":"pl-kos"},{"start":39,"end":44,"cssClass":"pl-s1"},{"start":44,"end":45,"cssClass":"pl-kos"}],[{"start":8,"end":11,"cssClass":"pl-s1"},{"start":12,"end":16,"cssClass":"pl-en"},{"start":17,"end":18,"cssClass":"pl-c1"}],[],[{"start":4,"end":12,"cssClass":"pl-s1"},{"start":13,"end":14,"cssClass":"pl-c1"},{"start":16,"end":17,"cssClass":"pl-s1"},{"start":19,"end":23,"cssClass":"pl-en"},{"start":24,"end":30,"cssClass":"pl-s1"},{"start":31,"end":36,"cssClass":"pl-en"},{"start":37,"end":38,"cssClass":"pl-s1"},{"start":41,"end":44,"cssClass":"pl-k"},{"start":45,"end":46,"cssClass":"pl-s1"},{"start":47,"end":49,"cssClass":"pl-c1"},{"start":50,"end":56,"cssClass":"pl-s1"},{"start":57,"end":65,"cssClass":"pl-en"}],[{"start":4,"end":10,"cssClass":"pl-k"},{"start":11,"end":19,"cssClass":"pl-s1"}],[],[],[{"start":0,"end":3,"cssClass":"pl-k"},{"start":4,"end":12,"cssClass":"pl-en"}],[{"start":4,"end":10,"cssClass":"pl-s1"},{"start":11,"end":12,"cssClass":"pl-c1"},{"start":13,"end":21,"cssClass":"pl-s1"},{"start":22,"end":36,"cssClass":"pl-v"}],[{"start":8,"end":12,"cssClass":"pl-s1"},{"start":12,"end":13,"cssClass":"pl-c1"},{"start":13,"end":28,"cssClass":"pl-s"}],[{"start":8,"end":19,"cssClass":"pl-s1"},{"start":19,"end":20,"cssClass":"pl-c1"},{"start":20,"end":42,"cssClass":"pl-s"}],[{"start":8,"end":40,"cssClass":"pl-s"}],[{"start":8,"end":21,"cssClass":"pl-s"}],[],[],[{"start":4,"end":10,"cssClass":"pl-s1"},{"start":11,"end":23,"cssClass":"pl-en"}],[{"start":8,"end":12,"cssClass":"pl-s"},{"start":14,"end":22,"cssClass":"pl-s1"},{"start":22,"end":23,"cssClass":"pl-c1"},{"start":23,"end":27,"cssClass":"pl-c1"},{"start":29,"end":33,"cssClass":"pl-s1"},{"start":33,"end":34,"cssClass":"pl-c1"},{"start":34,"end":55,"cssClass":"pl-s"},{"start":57,"end":64,"cssClass":"pl-s1"},{"start":64,"end":65,"cssClass":"pl-c1"},{"start":65,"end":80,"cssClass":"pl-s"}],[],[{"start":4,"end":10,"cssClass":"pl-s1"},{"start":11,"end":23,"cssClass":"pl-en"}],[{"start":8,"end":12,"cssClass":"pl-s"}],[{"start":8,"end":12,"cssClass":"pl-s1"},{"start":12,"end":13,"cssClass":"pl-c1"},{"start":13,"end":55,"cssClass":"pl-s"}],[{"start":8,"end":14,"cssClass":"pl-s1"},{"start":14,"end":15,"cssClass":"pl-c1"},{"start":15,"end":27,"cssClass":"pl-s"}],[{"start":8,"end":15,"cssClass":"pl-s1"},{"start":15,"end":16,"cssClass":"pl-c1"},{"start":16,"end":21,"cssClass":"pl-c1"}],[],[{"start":4,"end":10,"cssClass":"pl-s1"},{"start":11,"end":23,"cssClass":"pl-en"}],[{"start":8,"end":12,"cssClass":"pl-s"},{"start":14,"end":18,"cssClass":"pl-s1"},{"start":18,"end":19,"cssClass":"pl-c1"},{"start":19,"end":62,"cssClass":"pl-s"},{"start":64,"end":71,"cssClass":"pl-s1"},{"start":71,"end":72,"cssClass":"pl-c1"},{"start":72,"end":87,"cssClass":"pl-s"}],[],[{"start":4,"end":10,"cssClass":"pl-s1"},{"start":11,"end":23,"cssClass":"pl-en"}],[{"start":8,"end":12,"cssClass":"pl-s"},{"start":14,"end":18,"cssClass":"pl-s1"},{"start":18,"end":19,"cssClass":"pl-c1"},{"start":19,"end":56,"cssClass":"pl-s"},{"start":58,"end":65,"cssClass":"pl-s1"},{"start":65,"end":66,"cssClass":"pl-c1"},{"start":66,"end":81,"cssClass":"pl-s"}],[],[{"start":4,"end":8,"cssClass":"pl-s1"},{"start":9,"end":10,"cssClass":"pl-c1"},{"start":11,"end":17,"cssClass":"pl-s1"},{"start":18,"end":28,"cssClass":"pl-en"}],[{"start":4,"end":10,"cssClass":"pl-k"},{"start":11,"end":15,"cssClass":"pl-s1"}],[],[],[{"start":0,"end":3,"cssClass":"pl-k"},{"start":4,"end":22,"cssClass":"pl-en"},{"start":23,"end":31,"cssClass":"pl-s1"},{"start":33,"end":38,"cssClass":"pl-v"},{"start":40,"end":49,"cssClass":"pl-s1"},{"start":51,"end":56,"cssClass":"pl-v"},{"start":58,"end":69,"cssClass":"pl-s1"}],[{"start":4,"end":9,"cssClass":"pl-en"}],[{"start":8,"end":72,"cssClass":"pl-s"},{"start":10,"end":12,"cssClass":"pl-cce"},{"start":26,"end":46,"cssClass":"pl-s1"},{"start":26,"end":27,"cssClass":"pl-kos"},{"start":27,"end":36,"cssClass":"pl-s1"},{"start":37,"end":45,"cssClass":"pl-s1"},{"start":45,"end":46,"cssClass":"pl-kos"}],[{"start":8,"end":32,"cssClass":"pl-s"},{"start":10,"end":29,"cssClass":"pl-s1"},{"start":10,"end":11,"cssClass":"pl-kos"},{"start":11,"end":19,"cssClass":"pl-s1"},{"start":20,"end":28,"cssClass":"pl-s1"},{"start":28,"end":29,"cssClass":"pl-kos"}],[],[{"start":4,"end":9,"cssClass":"pl-en"},{"start":10,"end":76,"cssClass":"pl-s"}],[{"start":4,"end":6,"cssClass":"pl-k"},{"start":7,"end":18,"cssClass":"pl-s1"}],[{"start":8,"end":17,"cssClass":"pl-s1"},{"start":18,"end":19,"cssClass":"pl-c1"},{"start":20,"end":31,"cssClass":"pl-s1"}],[{"start":4,"end":8,"cssClass":"pl-k"}],[{"start":8,"end":17,"cssClass":"pl-s1"},{"start":18,"end":19,"cssClass":"pl-c1"},{"start":20,"end":28,"cssClass":"pl-s1"},{"start":29,"end":44,"cssClass":"pl-en"}],[{"start":4,"end":9,"cssClass":"pl-en"}],[{"start":8,"end":71,"cssClass":"pl-s"},{"start":11,"end":27,"cssClass":"pl-s1"},{"start":11,"end":12,"cssClass":"pl-kos"},{"start":12,"end":15,"cssClass":"pl-en"},{"start":16,"end":25,"cssClass":"pl-s1"},{"start":26,"end":27,"cssClass":"pl-kos"}],[{"start":8,"end":31,"cssClass":"pl-s"},{"start":11,"end":30,"cssClass":"pl-s1"},{"start":11,"end":12,"cssClass":"pl-kos"},{"start":12,"end":20,"cssClass":"pl-s1"},{"start":21,"end":29,"cssClass":"pl-s1"},{"start":29,"end":30,"cssClass":"pl-kos"}],[],[],[{"start":4,"end":14,"cssClass":"pl-s1"},{"start":15,"end":16,"cssClass":"pl-c1"},{"start":17,"end":26,"cssClass":"pl-s1"},{"start":27,"end":42,"cssClass":"pl-en"}],[{"start":4,"end":9,"cssClass":"pl-en"}],[{"start":8,"end":72,"cssClass":"pl-s"},{"start":11,"end":28,"cssClass":"pl-s1"},{"start":11,"end":12,"cssClass":"pl-kos"},{"start":12,"end":15,"cssClass":"pl-en"},{"start":16,"end":26,"cssClass":"pl-s1"},{"start":27,"end":28,"cssClass":"pl-kos"}],[{"start":8,"end":32,"cssClass":"pl-s"},{"start":11,"end":31,"cssClass":"pl-s1"},{"start":11,"end":12,"cssClass":"pl-kos"},{"start":12,"end":21,"cssClass":"pl-s1"},{"start":22,"end":30,"cssClass":"pl-s1"},{"start":30,"end":31,"cssClass":"pl-kos"}],[],[],[{"start":4,"end":19,"cssClass":"pl-s1"},{"start":20,"end":21,"cssClass":"pl-c1"},{"start":23,"end":24,"cssClass":"pl-s1"},{"start":25,"end":28,"cssClass":"pl-k"},{"start":29,"end":30,"cssClass":"pl-s1"},{"start":31,"end":33,"cssClass":"pl-c1"},{"start":34,"end":43,"cssClass":"pl-s1"},{"start":44,"end":46,"cssClass":"pl-k"},{"start":47,"end":48,"cssClass":"pl-s1"},{"start":49,"end":52,"cssClass":"pl-c1"},{"start":53,"end":55,"cssClass":"pl-c1"},{"start":56,"end":66,"cssClass":"pl-s1"}],[],[{"start":4,"end":6,"cssClass":"pl-k"},{"start":7,"end":22,"cssClass":"pl-s1"}],[{"start":8,"end":13,"cssClass":"pl-en"},{"start":14,"end":71,"cssClass":"pl-s"},{"start":32,"end":54,"cssClass":"pl-s1"},{"start":32,"end":33,"cssClass":"pl-kos"},{"start":33,"end":36,"cssClass":"pl-en"},{"start":37,"end":52,"cssClass":"pl-s1"},{"start":53,"end":54,"cssClass":"pl-kos"}],[{"start":8,"end":17,"cssClass":"pl-s1"},{"start":18,"end":27,"cssClass":"pl-en"},{"start":28,"end":43,"cssClass":"pl-s1"}],[],[],[{"start":0,"end":3,"cssClass":"pl-k"},{"start":4,"end":16,"cssClass":"pl-en"},{"start":17,"end":24,"cssClass":"pl-s1"},{"start":26,"end":31,"cssClass":"pl-v"},{"start":33,"end":39,"cssClass":"pl-s1"},{"start":41,"end":44,"cssClass":"pl-s1"},{"start":46,"end":48,"cssClass":"pl-c1"},{"start":49,"end":53,"cssClass":"pl-c1"}],[{"start":4,"end":9,"cssClass":"pl-s1"},{"start":10,"end":11,"cssClass":"pl-c1"},{"start":12,"end":19,"cssClass":"pl-s1"},{"start":20,"end":35,"cssClass":"pl-en"}],[{"start":4,"end":7,"cssClass":"pl-k"}],[{"start":8,"end":12,"cssClass":"pl-k"},{"start":13,"end":17,"cssClass":"pl-en"},{"start":18,"end":24,"cssClass":"pl-s1"},{"start":26,"end":29,"cssClass":"pl-s"},{"start":31,"end":33,"cssClass":"pl-k"},{"start":34,"end":35,"cssClass":"pl-s1"}],[{"start":12,"end":16,"cssClass":"pl-s1"},{"start":17,"end":21,"cssClass":"pl-en"},{"start":23,"end":30,"cssClass":"pl-s1"},{"start":31,"end":39,"cssClass":"pl-s1"},{"start":41,"end":45,"cssClass":"pl-en"},{"start":46,"end":51,"cssClass":"pl-s1"},{"start":55,"end":56,"cssClass":"pl-s1"},{"start":58,"end":64,"cssClass":"pl-s1"},{"start":64,"end":65,"cssClass":"pl-c1"},{"start":65,"end":66,"cssClass":"pl-c1"}],[{"start":4,"end":10,"cssClass":"pl-k"},{"start":11,"end":20,"cssClass":"pl-v"},{"start":21,"end":23,"cssClass":"pl-k"},{"start":24,"end":25,"cssClass":"pl-s1"}],[{"start":8,"end":13,"cssClass":"pl-en"},{"start":14,"end":55,"cssClass":"pl-s"},{"start":39,"end":47,"cssClass":"pl-s1"},{"start":39,"end":40,"cssClass":"pl-kos"},{"start":40,"end":46,"cssClass":"pl-s1"},{"start":46,"end":47,"cssClass":"pl-kos"},{"start":51,"end":54,"cssClass":"pl-s1"},{"start":51,"end":52,"cssClass":"pl-kos"},{"start":52,"end":53,"cssClass":"pl-s1"},{"start":53,"end":54,"cssClass":"pl-kos"}],[{"start":4,"end":8,"cssClass":"pl-k"}],[{"start":8,"end":13,"cssClass":"pl-en"},{"start":14,"end":67,"cssClass":"pl-s"},{"start":18,"end":30,"cssClass":"pl-s1"},{"start":18,"end":19,"cssClass":"pl-kos"},{"start":19,"end":22,"cssClass":"pl-en"},{"start":23,"end":28,"cssClass":"pl-s1"},{"start":29,"end":30,"cssClass":"pl-kos"},{"start":58,"end":66,"cssClass":"pl-s1"},{"start":58,"end":59,"cssClass":"pl-kos"},{"start":59,"end":65,"cssClass":"pl-s1"},{"start":65,"end":66,"cssClass":"pl-kos"}],[],[],[{"start":0,"end":3,"cssClass":"pl-k"},{"start":4,"end":15,"cssClass":"pl-en"},{"start":16,"end":20,"cssClass":"pl-s1"},{"start":22,"end":25,"cssClass":"pl-s1"},{"start":27,"end":29,"cssClass":"pl-c1"},{"start":30,"end":33,"cssClass":"pl-s1"},{"start":34,"end":35,"cssClass":"pl-c1"},{"start":36,"end":40,"cssClass":"pl-c1"}],[{"start":4,"end":9,"cssClass":"pl-s1"},{"start":10,"end":11,"cssClass":"pl-c1"},{"start":12,"end":16,"cssClass":"pl-c1"}],[{"start":4,"end":7,"cssClass":"pl-k"}],[{"start":8,"end":12,"cssClass":"pl-k"},{"start":13,"end":17,"cssClass":"pl-en"},{"start":18,"end":22,"cssClass":"pl-s1"},{"start":24,"end":27,"cssClass":"pl-s"},{"start":29,"end":31,"cssClass":"pl-k"},{"start":32,"end":33,"cssClass":"pl-s1"}],[{"start":12,"end":16,"cssClass":"pl-s1"},{"start":17,"end":18,"cssClass":"pl-c1"},{"start":19,"end":23,"cssClass":"pl-s1"},{"start":24,"end":28,"cssClass":"pl-en"},{"start":29,"end":30,"cssClass":"pl-s1"}],[{"start":12,"end":17,"cssClass":"pl-s1"},{"start":18,"end":19,"cssClass":"pl-c1"},{"start":21,"end":22,"cssClass":"pl-s1"},{"start":23,"end":26,"cssClass":"pl-k"},{"start":27,"end":28,"cssClass":"pl-s1"},{"start":30,"end":31,"cssClass":"pl-s1"},{"start":32,"end":34,"cssClass":"pl-c1"},{"start":35,"end":39,"cssClass":"pl-s1"},{"start":40,"end":45,"cssClass":"pl-en"},{"start":48,"end":51,"cssClass":"pl-k"},{"start":52,"end":53,"cssClass":"pl-s1"},{"start":54,"end":56,"cssClass":"pl-c1"},{"start":57,"end":58,"cssClass":"pl-s1"}],[{"start":4,"end":10,"cssClass":"pl-k"},{"start":11,"end":20,"cssClass":"pl-v"}],[{"start":8,"end":13,"cssClass":"pl-en"},{"start":14,"end":53,"cssClass":"pl-s"},{"start":46,"end":52,"cssClass":"pl-s1"},{"start":46,"end":47,"cssClass":"pl-kos"},{"start":47,"end":51,"cssClass":"pl-s1"},{"start":51,"end":52,"cssClass":"pl-kos"}],[],[{"start":4,"end":10,"cssClass":"pl-k"},{"start":11,"end":16,"cssClass":"pl-s1"}],[],[],[{"start":0,"end":3,"cssClass":"pl-k"},{"start":4,"end":8,"cssClass":"pl-en"}],[{"start":4,"end":7,"cssClass":"pl-s1"},{"start":8,"end":9,"cssClass":"pl-c1"},{"start":10,"end":18,"cssClass":"pl-en"}],[{"start":4,"end":12,"cssClass":"pl-s1"},{"start":13,"end":14,"cssClass":"pl-c1"},{"start":15,"end":25,"cssClass":"pl-en"},{"start":26,"end":29,"cssClass":"pl-s1"},{"start":30,"end":31,"cssClass":"pl-s1"}],[],[{"start":4,"end":17,"cssClass":"pl-c"}],[{"start":4,"end":9,"cssClass":"pl-en"},{"start":10,"end":44,"cssClass":"pl-s"},{"start":12,"end":14,"cssClass":"pl-cce"},{"start":45,"end":85,"cssClass":"pl-s"},{"start":48,"end":82,"cssClass":"pl-s1"},{"start":48,"end":49,"cssClass":"pl-kos"},{"start":49,"end":57,"cssClass":"pl-s1"},{"start":58,"end":72,"cssClass":"pl-s"},{"start":74,"end":80,"cssClass":"pl-s"},{"start":81,"end":82,"cssClass":"pl-kos"}],[{"start":4,"end":16,"cssClass":"pl-s1"},{"start":17,"end":18,"cssClass":"pl-c1"},{"start":19,"end":24,"cssClass":"pl-v"},{"start":25,"end":33,"cssClass":"pl-s1"},{"start":34,"end":48,"cssClass":"pl-s"},{"start":50,"end":56,"cssClass":"pl-s"}],[{"start":4,"end":16,"cssClass":"pl-s1"},{"start":17,"end":22,"cssClass":"pl-en"}],[{"start":8,"end":16,"cssClass":"pl-s1"},{"start":17,"end":31,"cssClass":"pl-s"},{"start":33,"end":39,"cssClass":"pl-s"},{"start":42,"end":50,"cssClass":"pl-s1"},{"start":51,"end":65,"cssClass":"pl-s"},{"start":67,"end":77,"cssClass":"pl-s"}],[],[{"start":4,"end":12,"cssClass":"pl-s1"},{"start":13,"end":16,"cssClass":"pl-en"},{"start":17,"end":31,"cssClass":"pl-s"},{"start":33,"end":37,"cssClass":"pl-c1"}],[],[{"start":4,"end":26,"cssClass":"pl-c"}],[{"start":4,"end":6,"cssClass":"pl-k"},{"start":7,"end":10,"cssClass":"pl-s1"},{"start":11,"end":12,"cssClass":"pl-s1"}],[{"start":8,"end":20,"cssClass":"pl-en"},{"start":21,"end":33,"cssClass":"pl-s1"},{"start":35,"end":38,"cssClass":"pl-s1"},{"start":39,"end":40,"cssClass":"pl-s1"}],[{"start":8,"end":14,"cssClass":"pl-k"}],[],[{"start":4,"end":46,"cssClass":"pl-c"}],[{"start":4,"end":16,"cssClass":"pl-s1"},{"start":17,"end":18,"cssClass":"pl-c1"},{"start":19,"end":23,"cssClass":"pl-c1"}],[{"start":4,"end":6,"cssClass":"pl-k"},{"start":7,"end":10,"cssClass":"pl-s1"},{"start":11,"end":12,"cssClass":"pl-s1"},{"start":13,"end":16,"cssClass":"pl-c1"},{"start":17,"end":20,"cssClass":"pl-c1"},{"start":21,"end":24,"cssClass":"pl-s1"},{"start":25,"end":26,"cssClass":"pl-s1"}],[{"start":8,"end":20,"cssClass":"pl-s1"},{"start":21,"end":22,"cssClass":"pl-c1"},{"start":23,"end":34,"cssClass":"pl-en"},{"start":35,"end":38,"cssClass":"pl-s1"},{"start":39,"end":40,"cssClass":"pl-s1"}],[],[{"start":4,"end":51,"cssClass":"pl-c"}],[{"start":4,"end":7,"cssClass":"pl-k"},{"start":8,"end":11,"cssClass":"pl-s1"},{"start":12,"end":14,"cssClass":"pl-c1"},{"start":15,"end":23,"cssClass":"pl-s1"}],[{"start":8,"end":13,"cssClass":"pl-en"},{"start":14,"end":62,"cssClass":"pl-s"},{"start":16,"end":18,"cssClass":"pl-cce"},{"start":28,"end":33,"cssClass":"pl-s1"},{"start":28,"end":29,"cssClass":"pl-kos"},{"start":29,"end":32,"cssClass":"pl-s1"},{"start":32,"end":33,"cssClass":"pl-kos"},{"start":36,"end":59,"cssClass":"pl-s1"},{"start":36,"end":37,"cssClass":"pl-kos"},{"start":37,"end":45,"cssClass":"pl-s1"},{"start":46,"end":49,"cssClass":"pl-s1"},{"start":51,"end":57,"cssClass":"pl-s"},{"start":58,"end":59,"cssClass":"pl-kos"}],[{"start":8,"end":19,"cssClass":"pl-s1"},{"start":20,"end":21,"cssClass":"pl-c1"},{"start":22,"end":27,"cssClass":"pl-v"},{"start":28,"end":36,"cssClass":"pl-s1"},{"start":37,"end":40,"cssClass":"pl-s1"},{"start":42,"end":48,"cssClass":"pl-s"}],[{"start":8,"end":19,"cssClass":"pl-s1"},{"start":20,"end":25,"cssClass":"pl-en"},{"start":26,"end":34,"cssClass":"pl-s1"},{"start":35,"end":38,"cssClass":"pl-s1"},{"start":40,"end":46,"cssClass":"pl-s"},{"start":49,"end":57,"cssClass":"pl-s1"},{"start":58,"end":61,"cssClass":"pl-s1"},{"start":63,"end":73,"cssClass":"pl-s"}],[],[{"start":8,"end":10,"cssClass":"pl-k"},{"start":11,"end":14,"cssClass":"pl-s1"},{"start":15,"end":16,"cssClass":"pl-s1"}],[{"start":12,"end":17,"cssClass":"pl-en"},{"start":18,"end":78,"cssClass":"pl-s"}],[{"start":12,"end":15,"cssClass":"pl-s1"},{"start":16,"end":17,"cssClass":"pl-c1"},{"start":18,"end":29,"cssClass":"pl-s1"}],[{"start":12,"end":16,"cssClass":"pl-s1"},{"start":17,"end":18,"cssClass":"pl-c1"},{"start":19,"end":31,"cssClass":"pl-s1"}],[{"start":8,"end":12,"cssClass":"pl-k"}],[{"start":12,"end":15,"cssClass":"pl-s1"},{"start":16,"end":17,"cssClass":"pl-c1"},{"start":18,"end":30,"cssClass":"pl-s1"}],[{"start":12,"end":16,"cssClass":"pl-s1"},{"start":17,"end":18,"cssClass":"pl-c1"},{"start":19,"end":30,"cssClass":"pl-s1"}],[],[{"start":8,"end":26,"cssClass":"pl-en"},{"start":27,"end":30,"cssClass":"pl-s1"},{"start":32,"end":36,"cssClass":"pl-s1"},{"start":38,"end":50,"cssClass":"pl-s1"}],[],[],[{"start":0,"end":2,"cssClass":"pl-k"},{"start":3,"end":11,"cssClass":"pl-s1"},{"start":12,"end":14,"cssClass":"pl-c1"},{"start":15,"end":25,"cssClass":"pl-s"}],[{"start":4,"end":8,"cssClass":"pl-en"}]],"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/wescode/lemmy_migrate/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":false,"repoAlertsPath":"/wescode/lemmy_migrate/security/dependabot","repoSecurityAndAnalysisPath":"/wescode/lemmy_migrate/settings/security_analysis","repoOwnerIsOrg":false,"currentUserCanAdminRepo":false},"displayName":"lemmy_migrate.py","displayUrl":"https://github.com/wescode/lemmy_migrate/blob/master/lemmy_migrate.py?raw=true","headerInfo":{"blobSize":"3.8 KB","deleteInfo":{"deleteTooltip":"Fork this repository and delete the file"},"editInfo":{"editTooltip":"Fork this repository and edit the file"},"ghDesktopPath":"x-github-client://openRepo/https://github.com/wescode/lemmy_migrate?branch=master&filepath=lemmy_migrate.py","gitLfsPath":null,"onBranch":true,"shortPath":"bae7985","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fwescode%2Flemmy_migrate%2Fblob%2Fmaster%2Flemmy_migrate.py","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"137","truncatedSloc":"111"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplateHelpUrl":"https://docs.github.com/articles/about-issue-and-pull-request-templates","issueTemplate":null,"discussionTemplate":null,"language":"Python","languageID":303,"large":false,"loggedIn":true,"newDiscussionPath":"/wescode/lemmy_migrate/discussions/new","newIssuePath":"/wescode/lemmy_migrate/issues/new","planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/wescode/lemmy_migrate/blob/master/lemmy_migrate.py","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","dismissStackNoticePath":"/settings/dismiss-notice/publish_stack_from_file","releasePath":"/wescode/lemmy_migrate/releases/new?marketplace=true","showPublishActionBanner":false,"showPublishStackBanner":false},"renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"repoOwner":"wescode","repoName":"lemmy_migrate","showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","showDependabotConfigurationBanner":false,"actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timedOut":false,"notAnalyzed":false,"symbols":[{"name":"get_config","kind":"function","identStart":89,"identEnd":99,"extentStart":85,"extentEnd":372,"fullyQualifiedName":"get_config","identUtf16":{"start":{"lineNumber":7,"utf16Col":4},"end":{"lineNumber":7,"utf16Col":14}},"extentUtf16":{"start":{"lineNumber":7,"utf16Col":0},"end":{"lineNumber":15,"utf16Col":19}}},{"name":"get_args","kind":"function","identStart":379,"identEnd":387,"extentStart":375,"extentEnd":1117,"fullyQualifiedName":"get_args","identUtf16":{"start":{"lineNumber":18,"utf16Col":4},"end":{"lineNumber":18,"utf16Col":12}},"extentUtf16":{"start":{"lineNumber":18,"utf16Col":0},"end":{"lineNumber":42,"utf16Col":15}}},{"name":"sync_subscriptions","kind":"function","identStart":1124,"identEnd":1142,"extentStart":1120,"extentEnd":2003,"fullyQualifiedName":"sync_subscriptions","identUtf16":{"start":{"lineNumber":45,"utf16Col":4},"end":{"lineNumber":45,"utf16Col":22}},"extentUtf16":{"start":{"lineNumber":45,"utf16Col":0},"end":{"lineNumber":70,"utf16Col":44}}},{"name":"write_backup","kind":"function","identStart":2010,"identEnd":2022,"extentStart":2006,"extentEnd":2375,"fullyQualifiedName":"write_backup","identUtf16":{"start":{"lineNumber":73,"utf16Col":4},"end":{"lineNumber":73,"utf16Col":16}},"extentUtf16":{"start":{"lineNumber":73,"utf16Col":0},"end":{"lineNumber":81,"utf16Col":68}}},{"name":"read_backup","kind":"function","identStart":2382,"identEnd":2393,"extentStart":2378,"extentEnd":2667,"fullyQualifiedName":"read_backup","identUtf16":{"start":{"lineNumber":84,"utf16Col":4},"end":{"lineNumber":84,"utf16Col":15}},"extentUtf16":{"start":{"lineNumber":84,"utf16Col":0},"end":{"lineNumber":93,"utf16Col":16}}},{"name":"main","kind":"function","identStart":2674,"identEnd":2678,"extentStart":2670,"extentEnd":3848,"fullyQualifiedName":"main","identUtf16":{"start":{"lineNumber":96,"utf16Col":4},"end":{"lineNumber":96,"utf16Col":8}},"extentUtf16":{"start":{"lineNumber":96,"utf16Col":0},"end":{"lineNumber":132,"utf16Col":51}}}]}},"copilotInfo":{"documentationUrl":"https://docs.github.com/copilot/overview-of-github-copilot/about-github-copilot-for-individuals","notices":{"codeViewPopover":{"dismissed":false,"dismissPath":"/settings/dismiss-notice/code_view_copilot_popover"}},"userAccess":{"accessAllowed":false,"hasSubscriptionEnded":false,"orgHasCFBAccess":false,"userHasCFIAccess":false,"userHasOrgs":false,"userIsOrgAdmin":false,"userIsOrgMember":false,"business":null,"featureRequestInfo":null}},"csrf_tokens":{"/wescode/lemmy_migrate/branches":{"post":"54Yb3O77oFetMzk72fdMOrLk849BOglEl0lFgqQJ5wIwK65EIDCogvCLkWqdWxdIE68YcNplpxhzNS37ej4bDQ"},"/repos/preferences":{"post":"pPDJh6Rr9X1BHntp-xOpqXadaBPiDI5Pbr6FQSP_nLLdXeet06iuAc9uOQSf_HBJgmRexfbnNirdRONAamxQVA"}}},"title":"lemmy_migrate/lemmy_migrate.py at master · wescode/lemmy_migrate"}
NameError: name 'true' is not defined. Did you mean: 'True'?