mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
Merge branch 'master' into modify_level
Conflicts: community.json
This commit is contained in:
commit
a806505068
2 changed files with 48 additions and 2 deletions
35
change_level.py
Executable file
35
change_level.py
Executable file
|
@ -0,0 +1,35 @@
|
|||
#!/usr/bin/env python
|
||||
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv[1:]) < 3:
|
||||
print "Usage: ./change_level.py <official.json|community.json> <app_id> <level>"
|
||||
sys.exit(1)
|
||||
|
||||
app_list_name, app_id, level = sys.argv[1:4]
|
||||
|
||||
if not os.path.exists(app_list_name):
|
||||
print "Error: the file '%s' doesn't exist" % app_list_name
|
||||
sys.exit(1)
|
||||
|
||||
app_list = json.load(open(app_list_name))
|
||||
|
||||
if app_id not in app_list:
|
||||
print "Error: app '%s' is not present in %s" % (app_id, app_list_name)
|
||||
sys.exit(1)
|
||||
|
||||
if not level.isdigit():
|
||||
print "Error: app level must be a number, it's '%s'" % level
|
||||
sys.exit(1)
|
||||
|
||||
if not 0 <= int(level) <= 10:
|
||||
print "Error: app level must be between 0 and 10, it's '%s'" % level
|
||||
sys.exit(1)
|
||||
|
||||
app_list[app_id]["level"] = int(level)
|
||||
|
||||
open(app_list_name, "w").write("\n".join(json.dumps(app_list, indent=4, sort_keys=True).split(" \n")) + "\n")
|
|
@ -255,6 +255,12 @@
|
|||
"state": "inprogress",
|
||||
"url": "https://github.com/matlink/gitweb_ynh"
|
||||
},
|
||||
"glowingbear": {
|
||||
"branch": "master",
|
||||
"revision": "b799d63e67307abdfe6ccf94979d4b25ac642d2d",
|
||||
"state": "working",
|
||||
"url": "https://github.com/jodeko/glowing_bear_ynh"
|
||||
},
|
||||
"glpi": {
|
||||
"branch": "master",
|
||||
"revision": "5982ac51159d42cef1c969b479346d6bc95abba5",
|
||||
|
@ -274,6 +280,12 @@
|
|||
"state": "working",
|
||||
"url": "https://github.com/YunoHost-Apps/gogs_ynh"
|
||||
},
|
||||
"headphones": {
|
||||
"branch": "master",
|
||||
"revision": "8f2a891a987dff486d190032cef4352e7f3d8796",
|
||||
"state": "working",
|
||||
"url": "https://github.com/YunoHost-Apps/headphones_ynh"
|
||||
},
|
||||
"hotspot": {
|
||||
"branch": "master",
|
||||
"revision": "850f19584efe0764642587bb49ba47e73415be6b",
|
||||
|
@ -569,8 +581,7 @@
|
|||
},
|
||||
"piwigo": {
|
||||
"branch": "master",
|
||||
"level": 3,
|
||||
"revision": "77f8bbda34bf7ce588ad502530e04eb77d832077",
|
||||
"revision": "4adda14d459492fd474a5f139ede2728483c0e28",
|
||||
"state": "working",
|
||||
"url": "https://github.com/YunoHost-Apps/piwigo_ynh"
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue