Go to file
2024-01-17 02:37:30 +00:00
static Add picture zoom in feature (Leah Rowe's Sleepless Rants – 1337box, an insanely optimized CSS-only, no-JS lightbox implementation) 2023-07-27 10:16:33 +08:00
templates fix hyperlinks 2023-10-04 10:47:13 +08:00
.gitignore Initial Commit 2023-07-11 19:32:13 +08:00
aiotieba-handle-exception-expose.patch Multiple features 2023-07-13 18:48:49 +08:00
app.py Update app.py 2024-01-17 02:37:30 +00:00
Dockerfile add Dockerfile 2023-10-04 10:38:36 +08:00
extra.py remove unused module import 2023-07-21 11:52:21 +08:00
filters.py Initial Commit 2023-07-11 19:32:13 +08:00
LICENSE 添加 LICENSE 2023-06-28 15:01:01 +00:00
proxify.py fix proxify, workaround for memory leak 2023-10-04 10:11:46 +08:00
README.md fix proxify, workaround for memory leak 2023-10-04 10:11:46 +08:00
requirements.txt fix proxify, workaround for memory leak 2023-10-04 10:11:46 +08:00
shared.py Several fixes and enhancement 2023-07-24 15:00:19 +08:00
utils.py Multiple features 2023-07-13 18:48:49 +08:00

Rat Aint Tieba

RAT 是一款尊重用户自由的百度贴吧前端。RAT 项目内所有文件均以 AGPLv3 分发,具体内容 见 LICENSE。

部署方法

$ cd rat
$ virtualenv venv
$ . venv/bin/activate
(venv) $ pip install -r requirements.txt
(venv) $ patch -p1 < aiotieba-handle-exception-expose.patch

patch 命令提示需要文件路径,输入对应路径即可。

运行方法

调试运行(已知在生产环境下有内存溢出):

(venv) $ python main.py

生产环境运行:

(venv) $ gunicorn app:proxified --max-requests 50 --workers 2 --worker-class uvicorn.workers.UvicornWorker

默认参数下,你应将反向代理指向 127.0.0.1:8000

配置方法

其中的 should_fetch_comments 用于控制是否获取楼中楼。如果浏览性能不佳可以考虑 关闭楼中楼获取。