diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2022-05-07 19:37:24 +0100 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2022-05-07 19:37:24 +0100 |
commit | 022fa3780ad63b49cb50c1482aa1d598e27feac5 (patch) | |
tree | 999115e2640d0d484082d535c46145fcc431fc7f /services.py | |
parent | 10d1da4b594838dea0a92daa8ec2de06f7abfab0 (diff) | |
download | eda.gay-022fa3780ad63b49cb50c1482aa1d598e27feac5.tar.gz eda.gay-022fa3780ad63b49cb50c1482aa1d598e27feac5.zip |
Added testimonials
Diffstat (limited to 'services.py')
-rw-r--r-- | services.py | 26 |
1 files changed, 18 insertions, 8 deletions
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("<title>") + 7 : text.find("</title>")] 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 |