mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
Ontegrate app categories into apps.json ...
This commit is contained in:
parent
3447856ae1
commit
888c8b6c0f
3 changed files with 1160 additions and 15 deletions
166
categories.yml
Normal file
166
categories.yml
Normal file
|
@ -0,0 +1,166 @@
|
|||
- id: "synchronization"
|
||||
icon: "cloud"
|
||||
title:
|
||||
en: "Synchronization"
|
||||
fr: "Synchronisation"
|
||||
description:
|
||||
en: "Files sync, contact, calendar, password managers, ..."
|
||||
fr: "Fichiers, contacts, calendrier, mots de passe, ..."
|
||||
subtags:
|
||||
- files
|
||||
- calendar
|
||||
- contacts
|
||||
- password
|
||||
- id: "publishing"
|
||||
icon: "globe"
|
||||
title:
|
||||
en: "Publishing"
|
||||
fr: "Publication"
|
||||
description:
|
||||
en: "Websites, blog, wiki, CMS, ..."
|
||||
fr: "Site web, blog, wiki, CMS, ..."
|
||||
subtags:
|
||||
- websites
|
||||
- blog
|
||||
- wiki
|
||||
- ecommerce
|
||||
- analytics
|
||||
- id: "communication"
|
||||
icon: "comments-o"
|
||||
title:
|
||||
en: "Communication"
|
||||
fr: "Communication"
|
||||
description:
|
||||
en: "Chat, email, forum, meetings, ..."
|
||||
fr: "Chat, email, forum, meetings, ..."
|
||||
subtags:
|
||||
- chat
|
||||
- forum
|
||||
- email
|
||||
- meeting
|
||||
- id: "office"
|
||||
icon: "file-text-o"
|
||||
title:
|
||||
en: "Office"
|
||||
fr: "Bureautique"
|
||||
description:
|
||||
en: "Text edition, spreadsheets, ..."
|
||||
fr: "Edition de texte, tableurs, ..."
|
||||
subtags:
|
||||
- text
|
||||
- spreadsheet
|
||||
- impress
|
||||
- draw
|
||||
- mindmap
|
||||
- id: "productivity_and_management"
|
||||
icon: "area-chart"
|
||||
title:
|
||||
en: "Productivity & management"
|
||||
fr: "Productivité & gestion"
|
||||
description:
|
||||
en: "Tasks, polls, accounting, ERP, ..."
|
||||
fr: "Tâches, sondages, comptabilité, ERP, ..."
|
||||
subtags:
|
||||
- task
|
||||
- poll
|
||||
- accounting
|
||||
- business_and_ngos
|
||||
- id: "small_utilities"
|
||||
icon: "umbrella"
|
||||
title:
|
||||
en: "Small utilities"
|
||||
fr: "Petits utilitaires"
|
||||
description:
|
||||
en: "Pastebins, URL shortener, proxies, ..."
|
||||
fr: "Pastebins, raccourcisseurs d'URL, proxys, ..."
|
||||
subtags:
|
||||
- pastebin
|
||||
- url_shortener
|
||||
- id: "reading"
|
||||
icon: "newspaper-o"
|
||||
title:
|
||||
en: "Reading"
|
||||
fr: "Lecture"
|
||||
description:
|
||||
en: "Newsfeed readers, books library, ..."
|
||||
fr: "Fils d'actualité, livres, ..."
|
||||
subtags:
|
||||
- rssreader
|
||||
- books
|
||||
- id: "multimedia"
|
||||
icon: "music"
|
||||
title:
|
||||
en: "Multimedia"
|
||||
fr: "Multimédia"
|
||||
description:
|
||||
en: "Music / pictures gallery, P2P, TV shows, ..."
|
||||
fr: "Gallerie de musique, d'images, P2P, séries, ..."
|
||||
subtags:
|
||||
- mediacenter
|
||||
- download
|
||||
- music
|
||||
- pictures
|
||||
- id: "social_media"
|
||||
icon: "users"
|
||||
title:
|
||||
en: "Social medias"
|
||||
fr: "Media sociaux"
|
||||
description:
|
||||
en: "Microblogging, federated medias"
|
||||
fr: "Microblogging, médias fédérés"
|
||||
subtags:
|
||||
- microblogging
|
||||
- blogging
|
||||
- events
|
||||
- videos
|
||||
- pictures
|
||||
- music
|
||||
- id: "games"
|
||||
icon: "gamepad"
|
||||
title:
|
||||
en: "Games"
|
||||
fr: "Jeux"
|
||||
description:
|
||||
en: "Wanna have some fun ? ;)"
|
||||
fr: "Envie de s'amuser ? ;)"
|
||||
- id: "dev"
|
||||
icon: "flask"
|
||||
title:
|
||||
en: "Development"
|
||||
fr: "Développement"
|
||||
description:
|
||||
en: "Git forges, apps skeleton, CI, translation, ..."
|
||||
fr: "Forges git, squelette d'apps, CI, traduction, ..."
|
||||
subtags:
|
||||
- forge
|
||||
- skeleton
|
||||
- programming
|
||||
- id: "system_tools"
|
||||
icon: "wrench"
|
||||
title:
|
||||
en: "System tools"
|
||||
fr: "Outils système"
|
||||
description:
|
||||
en: "Monitoring, backup, network, DB tools, ..."
|
||||
fr: "Monitoring, sauvegardes, outils réseau, bases de données, ..."
|
||||
subtags:
|
||||
- backup
|
||||
- monitoring
|
||||
- network
|
||||
- db
|
||||
- id: "iot"
|
||||
icon: "home"
|
||||
title:
|
||||
en: "Internet of Things"
|
||||
fr: "Internet des Objets (IoT)"
|
||||
description:
|
||||
en: "Home automation, energy dashboard, ..."
|
||||
fr: "Domotique, énergie, ..."
|
||||
- id: "wat"
|
||||
icon: "tree"
|
||||
title:
|
||||
en: "Wat"
|
||||
fr: "Wat"
|
||||
description:
|
||||
en: "Weird experimental or very-custom stuff"
|
||||
fr: "Trucs expérimentaux et autres projets spécifiques"
|
|
@ -7,6 +7,7 @@ import json
|
|||
import zlib
|
||||
import argparse
|
||||
import subprocess
|
||||
import yaml
|
||||
|
||||
import requests
|
||||
from dateutil.parser import parse
|
||||
|
@ -349,34 +350,42 @@ for app, info in apps_list.items():
|
|||
'level': info.get('level', '?'),
|
||||
'maintained': app_maintained,
|
||||
'high_quality': app_high_quality,
|
||||
'featured': app_featured
|
||||
'featured': app_featured,
|
||||
'category': info.get('category', None),
|
||||
'subtags': info.get('subtags', []),
|
||||
}
|
||||
except KeyError as e:
|
||||
error("Invalid app info or manifest for app %s, %s" % (app, e))
|
||||
continue
|
||||
|
||||
# Write resulting file
|
||||
## output version 2, including the categories
|
||||
categories = yaml.load(open("categories.yml").read())
|
||||
with open(args.output.replace(".json", "-v2.json"), 'w') as f:
|
||||
f.write(json.dumps({"apps": result_dict, "categories": categories}, sort_keys=True))
|
||||
|
||||
## output version 1
|
||||
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"])
|
||||
## output version 0
|
||||
print("\nAlso splitting the file into official and community-build.json for backward compatibility")
|
||||
|
||||
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}
|
||||
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"])
|
||||
|
||||
# We need the official apps to have "validated" as state to be recognized as official
|
||||
for app, infos in official_apps_dict.items():
|
||||
infos["state"] = "validated"
|
||||
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))
|
||||
# We need the official apps to have "validated" as state to be recognized as official
|
||||
for app, infos in official_apps_dict.items():
|
||||
infos["state"] = "validated"
|
||||
|
||||
with open("community-build.json", 'w') as f:
|
||||
f.write(json.dumps(community_apps_dict, sort_keys=True))
|
||||
with open("official-build.json", 'w') as f:
|
||||
f.write(json.dumps(official_apps_dict, sort_keys=True))
|
||||
|
||||
print("\nDone!")
|
||||
with open("community-build.json", 'w') as f:
|
||||
f.write(json.dumps(community_apps_dict, sort_keys=True))
|
||||
|
||||
print("\nDone!")
|
||||
|
|
Loading…
Add table
Reference in a new issue