mirror of
https://github.com/YunoHost/apps.git
synced 2024-09-03 20:06:07 +02:00
Merge branch 'master' into level-0-for-not-working-apps
This commit is contained in:
commit
e565d5ef5c
3 changed files with 45 additions and 12 deletions
29
apps.json
29
apps.json
|
@ -144,6 +144,14 @@
|
||||||
"state": "notworking",
|
"state": "notworking",
|
||||||
"url": "https://github.com/YunoHost-Apps/bicbucstriim_ynh"
|
"url": "https://github.com/YunoHost-Apps/bicbucstriim_ynh"
|
||||||
},
|
},
|
||||||
|
"bitwarden": {
|
||||||
|
"branch": "master",
|
||||||
|
"level": 7,
|
||||||
|
"maintained": true,
|
||||||
|
"revision": "HEAD",
|
||||||
|
"state": "working",
|
||||||
|
"url": "https://github.com/YunoHost-Apps/bitwarden_ynh"
|
||||||
|
},
|
||||||
"blogotext": {
|
"blogotext": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 7,
|
"level": 7,
|
||||||
|
@ -535,9 +543,10 @@
|
||||||
},
|
},
|
||||||
"framaforms": {
|
"framaforms": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 0,
|
"level": 2,
|
||||||
|
"maintained": true,
|
||||||
"revision": "HEAD",
|
"revision": "HEAD",
|
||||||
"state": "inprogress",
|
"state": "working",
|
||||||
"url": "https://github.com/YunoHost-Apps/framaforms_ynh"
|
"url": "https://github.com/YunoHost-Apps/framaforms_ynh"
|
||||||
},
|
},
|
||||||
"framagames": {
|
"framagames": {
|
||||||
|
@ -849,8 +858,8 @@
|
||||||
},
|
},
|
||||||
"jitsi": {
|
"jitsi": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"maintained": false,
|
"level": 7,
|
||||||
"revision": "b0c2dad3a00ac909e6e659550d0fae7be7dad28e",
|
"revision": "HEAD",
|
||||||
"state": "working",
|
"state": "working",
|
||||||
"url": "https://github.com/YunoHost-Apps/jitsi_ynh"
|
"url": "https://github.com/YunoHost-Apps/jitsi_ynh"
|
||||||
},
|
},
|
||||||
|
@ -863,7 +872,7 @@
|
||||||
},
|
},
|
||||||
"jupyterlab": {
|
"jupyterlab": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 7,
|
"level": 0,
|
||||||
"revision": "HEAD",
|
"revision": "HEAD",
|
||||||
"state": "working",
|
"state": "working",
|
||||||
"url": "https://github.com/YunoHost-Apps/jupyterlab_ynh"
|
"url": "https://github.com/YunoHost-Apps/jupyterlab_ynh"
|
||||||
|
@ -1516,6 +1525,14 @@
|
||||||
"state": "notworking",
|
"state": "notworking",
|
||||||
"url": "https://github.com/YunoHost-Apps/pydio_ynh"
|
"url": "https://github.com/YunoHost-Apps/pydio_ynh"
|
||||||
},
|
},
|
||||||
|
"qr": {
|
||||||
|
"branch": "master",
|
||||||
|
"level": 5,
|
||||||
|
"maintained": true,
|
||||||
|
"revision": "HEAD",
|
||||||
|
"state": "working",
|
||||||
|
"url": "https://code.antopie.org/miraty/qr_ynh"
|
||||||
|
},
|
||||||
"radicale": {
|
"radicale": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 7,
|
"level": 7,
|
||||||
|
@ -1861,7 +1878,7 @@
|
||||||
},
|
},
|
||||||
"timeoff": {
|
"timeoff": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"level": 1,
|
"level": 2,
|
||||||
"maintained": false,
|
"maintained": false,
|
||||||
"revision": "25925abef093ac18f077326c3e7cb0dec9e0cb9b",
|
"revision": "25925abef093ac18f077326c3e7cb0dec9e0cb9b",
|
||||||
"state": "working",
|
"state": "working",
|
||||||
|
|
|
@ -177,6 +177,7 @@
|
||||||
"level": 0,
|
"level": 0,
|
||||||
"revision": "94575a0db73e0ba1028882c625ebb363b0450f01",
|
"revision": "94575a0db73e0ba1028882c625ebb363b0450f01",
|
||||||
"state": "notworking",
|
"state": "notworking",
|
||||||
|
"maintained": "orphaned",
|
||||||
"url": "https://github.com/YunoHost-Apps/chtickynotes_ynh"
|
"url": "https://github.com/YunoHost-Apps/chtickynotes_ynh"
|
||||||
},
|
},
|
||||||
"codimd": {
|
"codimd": {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import time
|
||||||
import json
|
import json
|
||||||
import zlib
|
import zlib
|
||||||
import argparse
|
import argparse
|
||||||
|
import subprocess
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from dateutil.parser import parse
|
from dateutil.parser import parse
|
||||||
|
@ -26,6 +27,12 @@ def fail(msg, retcode=1):
|
||||||
print("Error: {0:s}".format(msg))
|
print("Error: {0:s}".format(msg))
|
||||||
sys.exit(retcode)
|
sys.exit(retcode)
|
||||||
|
|
||||||
|
def error(msg):
|
||||||
|
msg = "[Applist builder error] " + msg
|
||||||
|
if os.path.exists("/usr/bin/sendxmpppy"):
|
||||||
|
subprocess.call(["sendxmpppy", msg], stdout=open(os.devnull, 'wb'))
|
||||||
|
print(msg)
|
||||||
|
|
||||||
|
|
||||||
def include_translations_in_manifest(app_name, manifest):
|
def include_translations_in_manifest(app_name, manifest):
|
||||||
for i in os.listdir("locales"):
|
for i in os.listdir("locales"):
|
||||||
|
@ -157,6 +164,8 @@ for app, info in apps_list.items():
|
||||||
forge_type = "gitlab"
|
forge_type = "gitlab"
|
||||||
elif forge_site == "code.ffdn.org":
|
elif forge_site == "code.ffdn.org":
|
||||||
forge_type = "gogs"
|
forge_type = "gogs"
|
||||||
|
elif forge_site == "code.antopie.org":
|
||||||
|
forge_type = "gitea"
|
||||||
else:
|
else:
|
||||||
forge_type = "unknown"
|
forge_type = "unknown"
|
||||||
|
|
||||||
|
@ -237,6 +246,7 @@ for app, info in apps_list.items():
|
||||||
|
|
||||||
manifest = get_json(raw_url)
|
manifest = get_json(raw_url)
|
||||||
if manifest is None:
|
if manifest is None:
|
||||||
|
error("Manifest is empty for app %s ?" % app)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
api_url = 'https://api.github.com/repos/%s/%s/commits/%s' % (
|
api_url = 'https://api.github.com/repos/%s/%s/commits/%s' % (
|
||||||
|
@ -245,6 +255,7 @@ for app, info in apps_list.items():
|
||||||
|
|
||||||
info2 = get_json(api_url)
|
info2 = get_json(api_url)
|
||||||
if info2 is None:
|
if info2 is None:
|
||||||
|
error("Commit info is empty for app %s ?" % app)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
commit_date = parse(info2['commit']['author']['date'])
|
commit_date = parse(info2['commit']['author']['date'])
|
||||||
|
@ -256,24 +267,27 @@ for app, info in apps_list.items():
|
||||||
raw_url = '%s/raw/%s/manifest.json' % (app_url, app_rev)
|
raw_url = '%s/raw/%s/manifest.json' % (app_url, app_rev)
|
||||||
manifest = get_json(raw_url, verify=True)
|
manifest = get_json(raw_url, verify=True)
|
||||||
if manifest is None:
|
if manifest is None:
|
||||||
|
error("Manifest is empty for app %s ?" % app)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
api_url = 'https://%s/api/v4/projects/%s%%2F%s/repository/commits/%s' % (forge_site, owner, repo, app_rev)
|
api_url = 'https://%s/api/v4/projects/%s%%2F%s/repository/commits/%s' % (forge_site, owner, repo, app_rev)
|
||||||
commit = get_json(api_url)
|
commit = get_json(api_url)
|
||||||
if commit is None:
|
if commit is None:
|
||||||
|
error("Commit info is empty for app %s ?" % app)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
commit_date = parse(commit["authored_date"])
|
commit_date = parse(commit["authored_date"])
|
||||||
timestamp = int(time.mktime(commit_date.timetuple()))
|
timestamp = int(time.mktime(commit_date.timetuple()))
|
||||||
|
|
||||||
# Gogs-type forge
|
# Gogs-type forge
|
||||||
elif forge_type == "gogs":
|
elif forge_type in ["gogs", "gitea"]:
|
||||||
if not app_url.endswith('.git'):
|
if not app_url.endswith('.git'):
|
||||||
app_url += ".git"
|
app_url += ".git"
|
||||||
|
|
||||||
raw_url = '%s/raw/%s/manifest.json' % (app_url[:-4], app_rev)
|
raw_url = '%s/raw/%s/manifest.json' % (app_url[:-4], app_rev)
|
||||||
manifest = get_json(raw_url, verify=False)
|
manifest = get_json(raw_url, verify=False)
|
||||||
if manifest is None:
|
if manifest is None:
|
||||||
|
error("Manifest is empty for app %s ?" % app)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
obj_url = '%s/objects/%s/%s' % (
|
obj_url = '%s/objects/%s/%s' % (
|
||||||
|
@ -282,6 +296,7 @@ for app, info in apps_list.items():
|
||||||
commit = get_zlib(obj_url, verify=False)
|
commit = get_zlib(obj_url, verify=False)
|
||||||
|
|
||||||
if commit is None or len(commit) < 2:
|
if commit is None or len(commit) < 2:
|
||||||
|
error("Commit info is empty for app %s ?" % app)
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
commit = commit[1]
|
commit = commit[1]
|
||||||
|
@ -289,14 +304,14 @@ for app, info in apps_list.items():
|
||||||
# Extract author line and commit date
|
# Extract author line and commit date
|
||||||
commit_author = re_commit_author.search(commit)
|
commit_author = re_commit_author.search(commit)
|
||||||
if not commit_author:
|
if not commit_author:
|
||||||
print("-> Error: author line in commit not found")
|
error("Author line in commit not found for app %s" % app)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Construct UTC timestamp
|
# Construct UTC timestamp
|
||||||
timestamp = int(commit_author.group('time'))
|
timestamp = int(commit_author.group('time'))
|
||||||
tz = commit_author.group('tz')
|
tz = commit_author.group('tz')
|
||||||
if len(tz) != 5:
|
if len(tz) != 5:
|
||||||
print("-> Error: unexpected timezone length in commit")
|
error("Unexpected timezone length in commit for app %s" % app)
|
||||||
continue
|
continue
|
||||||
elif tz != '+0000':
|
elif tz != '+0000':
|
||||||
tdelta = (int(tz[1:3]) * 3600) + (int(tz[3:5]) * 60)
|
tdelta = (int(tz[1:3]) * 3600) + (int(tz[3:5]) * 60)
|
||||||
|
@ -305,10 +320,10 @@ for app, info in apps_list.items():
|
||||||
elif tz[0] == '-':
|
elif tz[0] == '-':
|
||||||
timestamp += tdelta
|
timestamp += tdelta
|
||||||
else:
|
else:
|
||||||
print("-> Error: unexpected timezone format in commit")
|
error("Unexpected timezone format in commit for app %s" % app)
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
print("-> Error: unsupported VCS and/or protocol")
|
error("Unsupported VCS and/or protocol for app %s" % app)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if manifest["id"] != app or manifest["id"] != repo.replace("_ynh", ""):
|
if manifest["id"] != app or manifest["id"] != repo.replace("_ynh", ""):
|
||||||
|
@ -333,7 +348,7 @@ for app, info in apps_list.items():
|
||||||
'featured': app_featured
|
'featured': app_featured
|
||||||
}
|
}
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
print("-> Error: invalid app info or manifest, %s" % e)
|
error("Invalid app info or manifest for app %s, %s" % (app, e))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Write resulting file
|
# Write resulting file
|
||||||
|
|
Loading…
Add table
Reference in a new issue