cleanup

parent 6ea8632a
Pipeline #67045583 failed with stage
in 1 minute and 59 seconds
......@@ -32,7 +32,6 @@ def main():
download(apk["baseUrl"].format(ver=ver), ignore)
with open('cache/versions.json', 'w') as file:
json.dump(versions, file, ensure_ascii=False)
update_html(versions)
def download(download_url, ignore):
if download_url.endswith(".apk"):
......@@ -59,21 +58,5 @@ def get_version_json(url, verObj):
version = version[1:]
return version
def get_html_list(versions):
apps = "<ul>"
for app, version in versions.items():
apps = "{}<li><strong>{}</strong> {}</li>".format(apps, app, version)
return "{}</ul>".format(apps)
def update_html(versions):
apps = get_html_list(versions)
with open("fdroid/public/index.html", "r") as f:
data = f.read()
f.close()
data = data.replace("<!-- apps -->", apps)
with open("fdroid/public/index.html", "w") as f:
f.write(data)
f.close()
if __name__ == "__main__":
main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment