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

-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])