update: 更新文档细节

This commit is contained in:
MarkusJoe
2022-11-11 18:46:32 +08:00
parent 8ace692ea6
commit ca1e31e866
4 files changed
-34

No files matched your search

-3
View File
@@ -7,9 +7,6 @@
* 使用了异步Web框架`FastAPI`来提高效率 ***注:数据库部分使用了同步*** * 使用了异步Web框架`FastAPI`来提高效率 ***注:数据库部分使用了同步***
* 可以自定义显示图片的数量(长度) * 可以自定义显示图片的数量(长度)
* 支持API接口以便自行开发 * 支持API接口以便自行开发
* 支持`Redis`数据库链接
> 数据迁移脚本 [sql2Redis.py](src/scripts/sql2Redis.py) ***需要自行手动修改***
# 失去的特性 # 失去的特性
-2
View File
@@ -1,2 +0,0 @@
#!/usr/bin/env sh
uvicorn src:create_app --factory --host=0.0.0.0
-6
View File
@@ -1,6 +0,0 @@
#!/usr/bin/env python3
# -- coding:utf-8 --
# @Author: markushammered@gmail.com
# @Development Tool: PyCharm
# @Create Time: 2022/10/2
# @File Name: __init__.py
-23
View File
@@ -1,23 +0,0 @@
#!/usr/bin/env python3
# -- coding:utf-8 --
# @Author: markushammered@gmail.com
# @Development Tool: PyCharm
# @Create Time: 2022/10/2
# @File Name: sql2Redis
import redis
import sqlite3
redis = redis.Redis('localhost')
sqlite = sqlite3.connect('./data.sqlite')
cursor = sqlite.cursor()
table = 'blacked'
cursor.execute('select * from %s;' % table)
data = cursor.fetchall()
for i in data:
redis.set(f'{table}-{i[0]}', i[1])
redis.set(f'{table}-width', data[0][-2])
redis.set(f'{table}-height', data[0][-1])