From cbaac87657d44ac0ab0428a98c5f68ba29b27ac6 Mon Sep 17 00:00:00 2001 From: MarkusJoe Date: Sun, 2 Oct 2022 17:28:20 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 15 +++++++++------ src/scripts/__init__.py | 6 ++++++ 2 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 src/scripts/__init__.py diff --git a/README.md b/README.md index 880e9df..b93365a 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,14 @@ > 翻自 [journey-ad](https://github.com/journey-ad/Moe-counter) 的计数器 -# 预览 - -preview - # 新特性 * 使用了异步Web框架`FastAPI`来提高效率 ***注:数据库部分使用了同步*** * 可以自定义显示图片的数量(长度) * 支持API接口以便自行开发 -* 支持MySQL数据库链接 ***程序内有默认的MySQL数据库请不要随意注水*** -> sql 文件下载地址 https://pac.rtst.tech/static_file_hosting/counter/sql/ +* 支持`Redis`数据库链接 + +> 数据迁移脚本 [sql2Redis.py](src/scripts/sql2Redis.py) ***需要自行手动修改*** # 失去的特性 @@ -30,11 +27,17 @@ $ python3 main.py # 两条命令等价 # 使用 * 访问`http://127.0.0.1:8000/` + > 示例: http://127.0.0.1:8000/_redirect?length=10&theme=moebooru + ## 参数 + * `length` + > length: 1 ≤ x ≤ 10 + * `theme` + > theme: `blacked` `lewd` `lisu` `moebooru` # 单元测试 diff --git a/src/scripts/__init__.py b/src/scripts/__init__.py new file mode 100644 index 0000000..7d9dee2 --- /dev/null +++ b/src/scripts/__init__.py @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 +# -- coding:utf-8 -- +# @Author: markushammered@gmail.com +# @Development Tool: PyCharm +# @Create Time: 2022/10/2 +# @File Name: __init__.py \ No newline at end of file