Commit graph

34 commits

Author SHA1 Message Date
029c57e257
refactor: remove all noinspections 2025-05-21 05:28:58 +03:00
d4d460a2a0
feat: add PreferSecureProtocol in config.ini 2025-05-21 05:06:45 +03:00
b266a1a2df
fix: since when str can't use is/is not 2025-05-21 04:43:15 +03:00
9ad1ce38ee
style: some weird black code reformatting 2025-05-21 04:34:01 +03:00
673a3768b8
fix: add more is_banned checks to avoid infinite fetching 2025-05-21 04:30:48 +03:00
78db4c85db
style: use html_parser in inline_query.py 2025-05-21 04:03:59 +03:00
bd957e2bd2
fix: use http protocols and app.hostname 2025-05-21 03:54:25 +03:00
10c2d58efb
fix: use ApplicationBuilder to avoid PTBUserWarning 2025-05-21 03:38:25 +03:00
6141d674a9
feat: add /info command (#1)
Reviewed-on: #1
Co-authored-by: mctaylors <cantsendmails@mctaylors.ru>
Co-committed-by: mctaylors <cantsendmails@mctaylors.ru>
2025-05-20 18:15:12 +03:00
c70d7fe3be
refactor: completely rewrite humanize_tags_from_json
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-05-18 12:30:22 +03:00
f07a51f76a
change: make inline query answer more compact
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-05-18 12:30:22 +03:00
df1735ef36
feat: use LinkPreviewOptions in answer_query
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-05-18 12:30:22 +03:00
0cc77dd42c
change: make return None statement explicit in format_rating
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-05-18 12:30:22 +03:00
d646920210
fix: set encoding for _c.read
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-05-18 12:30:22 +03:00
0ee018e2ce
refactor: define parameter types *again*
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-05-18 12:30:22 +03:00
7fdf18b5cb
i18n: use strings from Danbooru
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-05-18 12:30:22 +03:00
ff86c78b21
fix: add is_banned check
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-05-18 12:30:22 +03:00
05cbca7509
chore: remove unused imports
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-05-18 12:30:22 +03:00
b503234b85
pip: add requirements.txt
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-05-18 12:30:22 +03:00
5262975275
refactor: add config.py
this change adds self validation in __init__, allows to make config values with different types (not just string) and stores config values in classes for easier accessibility

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-26 20:29:44 +03:00
768f9abdcf
license: add GNU AGPLv3 license
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-26 19:25:48 +03:00
4fbdb198ae
refactor: move imports in main.py
this change allows to avoid multiple and very specific imports in other python files

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-26 14:28:15 +03:00
d363fa9afd
fix: use App.HostName (if set) in /about
oh yeah and we're also moving that strange ternary to main.py

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-26 14:18:41 +03:00
a41417ee84
feat: App.HostName is now optional
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-26 14:04:06 +03:00
496ea38b5c
change: update config.ini
use definitions from danbooru dotenv, add comments

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-26 14:03:09 +03:00
895f27470f
change: use status.json
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-26 14:01:44 +03:00
e5277d50f8
feat: add PublicDomain in config.ini
DMZ in stupid routers sucks

Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-24 20:40:08 +03:00
25768e4c90
refactor: add html_parser.py
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-10 15:16:00 +03:00
3bbfb7b692
refactor: use more None type annotations
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-10 00:25:35 +03:00
8b97a60a34
refactor: explicitly define parameter types
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-10 00:21:20 +03:00
20b8bf2432
feat: show rating
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-03 01:17:12 +03:00
3242418ae6
fix: about used General because i forgor
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-02 14:28:12 +03:00
1178c80831
feat: add token in config.ini
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-02 14:09:49 +03:00
6ec797a387
Initial commit
Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
2025-03-02 01:20:11 +03:00