From bd74d7ba9f68592308dd074008fd8841d6ab47c6 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 21 Mar 2019 02:09:42 +0100 Subject: [PATCH] Split apps list into official and community for backward compatibility --- list_builder.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/list_builder.py b/list_builder.py index df71b05..29ec157 100755 --- a/list_builder.py +++ b/list_builder.py @@ -341,3 +341,19 @@ with open(args.output, 'w') as f: f.write(json.dumps(result_dict, sort_keys=True)) print("\nDone! Written in %s" % args.output) + +if args.input == "apps.json": + print("\nAlso splitting the file into official and community-build.json for backward compatibility") + + official_apps = set(["agendav", "ampache", "baikal", "dokuwiki", "etherpad_mypads", "hextris", "jirafeau", "kanboard", "my_webapp", "nextcloud", "opensondage", "phpmyadmin", "piwigo", "rainloop", "roundcube", "searx", "shellinabox", "strut", "synapse", "transmission", "ttrss", "wallabag2", "wordpress", "zerobin"]) + + official_apps_dict = {k: v for k, v in result_dict.items() if k in official_apps} + community_apps_dict = {k: v for k, v in result_dict.items() if k not in official_apps} + + with open("official-build.json", 'w') as f: + f.write(json.dumps(official_apps_dict, sort_keys=True)) + + with open("community-build.json", 'w') as f: + f.write(json.dumps(community_apps_dict, sort_keys=True)) + + print("\nDone!")