From 1019ea1ed341e3a7769c046aa0be5764789360b6 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 2 Jun 2024 14:38:13 +0200 Subject: Migrate to Rust and Hyper With sanic, downloading a file locally is around ten times slower than with Rust and hyper. Maybe `pypy` could have helped, but I didn’t succeed to set it up quickly with the dependencies. --- src/templates.py | 105 ------------------------------------------------------- 1 file changed, 105 deletions(-) delete mode 100644 src/templates.py (limited to 'src/templates.py') diff --git a/src/templates.py b/src/templates.py deleted file mode 100644 index 8125f69..0000000 --- a/src/templates.py +++ /dev/null @@ -1,105 +0,0 @@ -import html -import datetime - -page: str = ''' - - - - - - Files - - - - -

Files

-
-''' - -pub index: str = f''' - {page} - -
- - - - - - -
-
- Uploading… -
- -
-
- - -
-''' - -def file_page(file_id: str, filename: str, expires: str) -> str: - href = f'{file_id}/download' - expires_in = datetime.datetime.strptime(expires, '%Y-%m-%d %H:%M:%S') - datetime.datetime.now() - - print() - print(href) - print() - - return f''' - {page} - -
- {html.escape(filename)} -
- Expires in {expires_in} -
-
- ''' - -not_found: str = f''' - {page} - - Oops, not found! -''' -- cgit v1.2.3