From 87ef1289f90b0b4e38fba585c6a4bd8952206efe Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sat, 14 Jan 2017 18:22:43 +0100 Subject: [PATCH 1/8] [enh] add a script to change the level of an app --- change_level.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 change_level.py diff --git a/change_level.py b/change_level.py new file mode 100755 index 00000000..c993fcf8 --- /dev/null +++ b/change_level.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +import os +import sys +import json + + +if __name__ == '__main__': + if len(sys.argv[1:]) < 3: + print "Usage: ./change_level.py " + 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) + + app_list[app_id]["level"] = level + + open(app_list_name, "w").write("\n".join(json.dumps(app_list, indent=4, sort_keys=True).split(" \n")) + "\n") + os.system("git diff") From 83c4636ea28e7900660f770a36250b4578a6bcc0 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Mon, 16 Jan 2017 17:26:00 +0100 Subject: [PATCH 2/8] Update change_level.py --- change_level.py | 1 - 1 file changed, 1 deletion(-) diff --git a/change_level.py b/change_level.py index c993fcf8..35feb556 100755 --- a/change_level.py +++ b/change_level.py @@ -25,4 +25,3 @@ if __name__ == '__main__': app_list[app_id]["level"] = level open(app_list_name, "w").write("\n".join(json.dumps(app_list, indent=4, sort_keys=True).split(" \n")) + "\n") - os.system("git diff") From c31d795499735ef7241afa640338055b90c95a30 Mon Sep 17 00:00:00 2001 From: jodeko Date: Tue, 24 Jan 2017 07:06:03 +0100 Subject: [PATCH 3/8] Update community.json --- community.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/community.json b/community.json index 61493088..54e8c5ef 100644 --- a/community.json +++ b/community.json @@ -239,6 +239,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", From b2dff28389ba5cb0b14b25f59008943f26cc9586 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Tue, 24 Jan 2017 17:19:37 +0100 Subject: [PATCH 4/8] inprogress https://github.com/jodeko/glowing_bear_ynh/issues/1 --- community.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community.json b/community.json index 54e8c5ef..564bf9d3 100644 --- a/community.json +++ b/community.json @@ -242,7 +242,7 @@ "glowingbear": { "branch": "master", "revision": "b799d63e67307abdfe6ccf94979d4b25ac642d2d", - "state": "working", + "state": "inprogress", "url": "https://github.com/jodeko/glowing_bear_ynh" }, "glpi": { From 6bceb467c506516f1b3430a7ed8e57704e009517 Mon Sep 17 00:00:00 2001 From: Maniack Crudelis Date: Wed, 25 Jan 2017 18:46:16 +0100 Subject: [PATCH 5/8] Glowing Bear working https://github.com/jodeko/glowing_bear_ynh/issues/1 --- community.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community.json b/community.json index 564bf9d3..54e8c5ef 100644 --- a/community.json +++ b/community.json @@ -242,7 +242,7 @@ "glowingbear": { "branch": "master", "revision": "b799d63e67307abdfe6ccf94979d4b25ac642d2d", - "state": "inprogress", + "state": "working", "url": "https://github.com/jodeko/glowing_bear_ynh" }, "glpi": { From eb2deb950eebe6c135c46d0c54e91da4ec7fc8de Mon Sep 17 00:00:00 2001 From: likeitneverwentaway Date: Thu, 26 Jan 2017 21:26:45 +0100 Subject: [PATCH 6/8] Add headphones --- community.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/community.json b/community.json index 54e8c5ef..4efb2344 100644 --- a/community.json +++ b/community.json @@ -263,6 +263,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", From f4f124da98c8453ab530920d308b1f959989ba9f Mon Sep 17 00:00:00 2001 From: JimboJoe Date: Sat, 28 Jan 2017 13:29:30 +0100 Subject: [PATCH 7/8] Update Piwigo to version 2.8.6 --- community.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/community.json b/community.json index 4efb2344..af80ded0 100644 --- a/community.json +++ b/community.json @@ -559,7 +559,7 @@ }, "piwigo": { "branch": "master", - "revision": "77f8bbda34bf7ce588ad502530e04eb77d832077", + "revision": "4adda14d459492fd474a5f139ede2728483c0e28", "state": "working", "url": "https://github.com/YunoHost-Apps/piwigo_ynh" }, From b52094a01f042db83b19b8e28b3f76bff2d7e6a3 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Mon, 30 Jan 2017 23:47:59 +0100 Subject: [PATCH 8/8] [enh] change_level.py uses int not and have sanity checks for that --- change_level.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/change_level.py b/change_level.py index 35feb556..e9213548 100755 --- a/change_level.py +++ b/change_level.py @@ -22,6 +22,14 @@ if __name__ == '__main__': print "Error: app '%s' is not present in %s" % (app_id, app_list_name) sys.exit(1) - app_list[app_id]["level"] = level + 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")