diff --git a/fdroidserver/index.py b/fdroidserver/index.py index fb62014b..c2d287db 100644 --- a/fdroidserver/index.py +++ b/fdroidserver/index.py @@ -230,6 +230,41 @@ def make_v1(apps, packages, repodir, repodict, requestsdict, fdroid_signing_key_ else: json.dump(output, fp, default=_index_encoder_default) + html_name = 'index.html' + html_file = os.path.join(repodir, html_name) + with open(html_file, 'w') as f: + name = repodict["name"] + description = repodict["description"] + f.write(""" + + + + {name} + + + + + + + + + + +

{name}

+
+

+QR: {name} + +{description}
+{details}

+{link} +
+""".format(name=name, +description=description, +details="Currently it serves {} apps. To add it to your F-Droid client, scan the QR code (click it to enlarge) or use this URL:".format(len(output['apps'])), +link=repodict["address"] +)) + if common.options.nosign: logging.debug(_('index-v1 must have a signature, use `fdroid signindex` to create it!')) else: