From 022fa3780ad63b49cb50c1482aa1d598e27feac5 Mon Sep 17 00:00:00 2001 From: jwansek Date: Sat, 7 May 2022 19:37:24 +0100 Subject: Added testimonials --- services.py | 26 ++++++++++++++++++-------- static/images/testimonials.PNG | Bin 0 -> 190391 bytes templates/isocd.jinja | 2 ++ templates/services.jinja | 28 +++++----------------------- 4 files changed, 25 insertions(+), 31 deletions(-) create mode 100644 static/images/testimonials.PNG diff --git a/services.py b/services.py index d2ae979..51ab6a1 100644 --- a/services.py +++ b/services.py @@ -18,6 +18,12 @@ import os theLastId = 0 +def get_isos(iso_dir): + print(os.path.exists(iso_dir)) + return [ + i for i in os.listdir(iso_dir) + ] + def humanbytes(B): 'Return the given bytes as a human friendly KB, MB, GB, or TB string' B = float(B) @@ -94,8 +100,8 @@ def get_qbit_stats(): def get_trans_stats(): client = clutch.client.Client( address = "http://%s:%s/transmission/rpc" % (app.CONFIG["transmission"]["url"], app.CONFIG["transmission"]["port"]), - username = app.CONFIG["transmission"]["user"], - password = app.CONFIG["transmission"]["passwd"] + # username = app.CONFIG["transmission"]["user"], + # password = app.CONFIG["transmission"]["passwd"] ) stats = json.loads(client.session.stats().json()) return { @@ -228,10 +234,14 @@ def link_deleted(url): return text[text.find("") + 7 : text.find("")] in ["Error | nitter", "イラストコミュニケーションサービス[pixiv]"] if __name__ == "__main__": - sbi = get_random_image(["lio_fotia", "promare"]) - print(sbi.tags) - print(sbi.source) - print(sbi.imurl) - print(sbi.remove_tag("promare")) + # sbi = get_random_image(["lio_fotia", "promare"]) + # print(sbi.tags) + # print(sbi.source) + # print(sbi.imurl) + # print(sbi.remove_tag("promare")) + + import configparser + CONFIG = configparser.ConfigParser() + CONFIG.read("edaweb.conf") - + print(get_isos(CONFIG.get("cds", "location"))) \ No newline at end of file diff --git a/static/images/testimonials.PNG b/static/images/testimonials.PNG new file mode 100644 index 0000000..8584cdd Binary files /dev/null and b/static/images/testimonials.PNG differ diff --git a/templates/isocd.jinja b/templates/isocd.jinja index 915f837..da7a737 100644 --- a/templates/isocd.jinja +++ b/templates/isocd.jinja @@ -26,4 +26,6 @@

I make no promises how long this will actually take, but you might get a special present too uwu

btw if u abuse this service i'll just ignore u

+

Testimonials

+ {% endblock %} \ No newline at end of file diff --git a/templates/services.jinja b/templates/services.jinja index 8044437..310d148 100644 --- a/templates/services.jinja +++ b/templates/services.jinja @@ -21,29 +21,6 @@ {% endif %}
-

qbittorrent

- {% if qbit == None %} -

Couldn't access the qbittorrent API. Is docker container running?

- {% else %} - - - - - - - - - - - - - - - - - -
downloaded{{qbit["bytes_dl"]}}
uploaded{{qbit["bytes_up"]}}
torrents{{qbit["num"]}}
ratio{{qbit["ratio"]}}
- {% endif %}

transmission

{% if trans == None %}

Couldn't access the transmission API. Is docker container running?

@@ -67,6 +44,11 @@ {% endif %} +
+ + +
+ statistics of my two old torrent clients which were shut down recently ;_;

pihole

-- cgit v1.2.3