new ui

parent 7154d1c6
Pipeline #67044960 failed with stage
in 2 minutes and 17 seconds
......@@ -2,3 +2,4 @@ fdroid/repo/
keystore.jks
cache/versions.json
fdroid/repo/*.apk
fdroid/repo/*.json
image: ubuntu:latest
before_script:
- echo "$fdroid_keystore" > keystore.base64
- cat keystore.base64 | base64 -d > fdroid/keystore.jks
- chmod 600 fdroid/config.py fdroid/keystore.jks
- mkdir -p fdroid/repo
- apt-get -qq update && apt-get -qqy install --no-install-recommends fdroidserver wget
pages:
stage: deploy
only:
- master
- schedules
before_script:
- echo "$fdroid_keystore" > keystore.base64
- cat keystore.base64 | base64 -d > fdroid/keystore.jks
- chmod 600 fdroid/config.py fdroid/keystore.jks
- echo "keypass=\"$fdroid_keypass\"" >> fdroid/config.py
- echo "keystorepass=\"$fdroid_keystorepass\"" >> fdroid/config.py
- mkdir -p fdroid/repo
- cp fdroid/qrcode.png fdroid/repo/
- apt-get -qq update && apt-get -qqy install --no-install-recommends fdroidserver wget
script:
- ./download.py
- cd fdroid
- echo "keypass=\"$fdroid_keypass\"" >>config.py
- echo "keystorepass=\"$fdroid_keystorepass\"" >>config.py
- fdroid update
- fdroid server update
- cd .. && mkdir public && mv -v fdroid/repo public
- mv fdroid/public/index.html public/
- mv fdroid/public/repo-qrcode.png public/
- ./download.py
- cd fdroid; fdroid update; fdroid server update
- cd ..; mkdir public; mv -v fdroid/repo public
- ./generatehtml.py > public/index.html
artifacts:
paths:
- public
only:
- master
- schedules
- public
......@@ -5,7 +5,7 @@ Unofficial F-Droid repo for various apps
Add this URL to F-Droid: `https://fdroid.rakshazi.me/repo?fingerprint=80BF9EC0BCCED7DA2C9B272FA9B53A30E5B79282CFD629BDE14AB1FF1658C02E`
[![Repo URL QRcode](fdroid/public/repo-qrcode.png)](https://fdroid.rakshazi.me/repo?fingerprint=80BF9EC0BCCED7DA2C9B272FA9B53A30E5B79282CFD629BDE14AB1FF1658C02E)
[![Repo URL QRcode](fdroid/qrcode.png)](https://fdroid.rakshazi.me/repo?fingerprint=80BF9EC0BCCED7DA2C9B272FA9B53A30E5B79282CFD629BDE14AB1FF1658C02E)
# How to add new apps
......
#!/usr/bin/env python3
repo_url = "https://fdroid.rakshazi.me/fdroid/repo"
repo_url = "https://fdroid.rakshazi.me/repo"
repo_name = "Rakshazi F-Droid"
repo_icon = "fdroid-icon.png"
repo_description = """
......
<!doctype html>
<html lang="en" prefix="og: http://ogp.me/ns#">
<head>
<!-- SEO -->
<title>Rakshazi F-Droid</title>
<!-- meta -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<meta name="description" content="Rakshazi F-Droid repo">
<meta name="image" content="https://fdroid.rakshazi.me/repo-qrcode.png">
<!-- schema.org -->
<meta itemprop="description" content="Rakshazi F-Droid repo">
<meta itemprop="image" content="https://fdroid.rakshazi.me/repo-qrcode.png">
<meta itemprop="name" content="Rakshazi F-Droid repo">
<!-- twitter card -->
<meta name="twitter:card" content="summary">
<meta name="twitter:creator" content="@rakshazi">
<meta name="twitter:description" content="Rakshazi F-Droid repo">
<meta name="twitter:image:src" content="https://fdroid.rakshazi.me/repo-qrcode.png">
<meta name="twitter:title" content="Rakshazi F-Droid repo">
<!-- ogp.me -->
<meta name="og:description" content="Rakshazi F-Droid repo">
<meta name="og:image" content="https://fdroid.rakshazi.me/repo-qrcode.png">
<meta name="og:site_name" content="Rakshazi F-Droid repo">
<meta name="og:title" content="Rakshazi F-Droid repo">
<meta name="og:type" content="website">
<meta name="og:url" content="https://fdroid.rakshazi.me/">
<meta name="msapplication-TileColor" content="#061621">
<meta name="theme-color" content="#061621">
<!-- links -->
<link rel="canonical" href="https://fdroid.rakshazi.me/">
<!-- END SEO -->
<style>body {background: #061621; color: #fff;}.absolute-center {flex-direction: column;justify-content: center;align-items: center;display: flex;height: 95vh;}</style>
</head>
<body>
<div class="absolute-center">
<a href="https://fdroid.rakshazi.me/repo?fingerprint=80BF9EC0BCCED7DA2C9B272FA9B53A30E5B79282CFD629BDE14AB1FF1658C02E" title="Add to F-Droid">
<img src="repo-qrcode.png" alt="Add to F-Droid" title="Add to F-Droid" width="300px"/>
</a>
<p><b>applications in this repo</b></p>
<!-- apps -->
</div>
</body>
</html>
#!/usr/bin/env python3
import json
from pathlib import Path
def main():
index = json.loads(Path('fdroid/repo/index-v1.json').read_text())
apps = get_apps_html(index["apps"], index["packages"])
layout = get_html(index["repo"], apps)
print(layout)
def get_html(repo, apps):
layout = Path('view/layout.html').read_text()
return layout.format(repo=repo,appshtml=apps)
def get_apps_html(apps, packages):
html = ""
for app in apps:
package = packages[app["packageName"]]
html+= Path('view/app.html').read_text().format(app=app, package=package)
return html
main()
<div style='border-left: 4px solid #4CAF50; padding: 8px 12px; width: 40vw;margin-bottom:1vh;'>
<p><strong>{app[name]}</strong> {package[0][versionName]}<br>
<i style="color: gray">{app[packageName]}</i></p>
{app[description]}
<p><a href="{app[webSite]}" target="_blank" style='color:#fff;'>website</a> |
<a href="{app[sourceCode]}" target="_blank" style='color:#fff;'>code</a> |
<a href="{app[issueTracker]}" target="_blank" style='color:#fff;'>issues</a></p>
</div>
<!doctype html>
<html lang="en" prefix="og: http://ogp.me/ns#">
<head>
<!-- SEO -->
<title>{repo[name]}</title>
<!-- meta -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<meta name="description" content="{repo[description]}">
<meta name="image" content="{repo[address]}/{repo[icon]}">
<!-- schema.org -->
<meta itemprop="description" content="{repo[description]}">
<meta itemprop="image" content="{repo[address]}/{repo[icon]}">
<meta itemprop="name" content="{repo[name]}">
<!-- twitter card -->
<meta name="twitter:card" content="summary">
<meta name="twitter:creator" content="@rakshazi">
<meta name="twitter:description" content="{repo[description]}">
<meta name="twitter:image:src" content="{repo[address]}/{repo[icon]}">
<meta name="twitter:title" content="{repo[name]}">
<!-- ogp.me -->
<meta name="og:description" content="{repo[description]}">
<meta name="og:image" content="{repo[address]}/{repo[icon]}">
<meta name="og:site_name" content="{repo[name]}">
<meta name="og:title" content="{repo[name]}">
<meta name="og:type" content="website">
<meta name="og:url" content="{repo[address]}">
<meta name="msapplication-TileColor" content="#061621">
<meta name="theme-color" content="#061621">
<!-- END SEO -->
</head>
<body style="background: #061621; color: #fff;">
<div style="flex-direction: column;justify-content: center;align-items: center;display: flex;height: 95vh;">
<a href="{repo[address]}?fingerprint=80BF9EC0BCCED7DA2C9B272FA9B53A30E5B79282CFD629BDE14AB1FF1658C02E" title="Add to F-Droid">
<img src="{repo[address]}/qrcode.png" alt="Add to F-Droid" title="Add to F-Droid" width="300px"/>
</a>
{appshtml}
</div>
</body>
</html>
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