fix: wrong database path

This commit is contained in:
kallydev 2020-11-28 22:02:43 +08:00
parent 05cd9b3262
commit b00963624e
No known key found for this signature in database
GPG Key ID: F0BB1C41D9D9F0F6
2 changed files with 9 additions and 6 deletions

View File

@ -22,14 +22,17 @@
1. 创建 SQLite 数据库 1. 创建 SQLite 数据库
在项目文件夹根目录下创建并进入 database 文件夹,创建数据库。
```bash ```bash
mkdir database & cd database
sqlite3 database.db sqlite3 database.db
``` ```
分别执行以下 SQL 语句,用于创建 QQ / 京东 / 顺丰数据表。 分别执行以下 SQL 语句,用于创建 QQ / 京东 / 顺丰数据表。
```sql ```sql
CREATE TABLE IF NOT EXISTS qq CREATE TABLE qq
( (
id BIGINT, id BIGINT,
qq_number BIGINT, qq_number BIGINT,
@ -38,7 +41,7 @@ CREATE TABLE IF NOT EXISTS qq
``` ```
```sql ```sql
CREATE TABLE IF NOT EXISTS jd CREATE TABLE jd
( (
id BIGINT, id BIGINT,
name TEXT, name TEXT,
@ -51,7 +54,7 @@ CREATE TABLE IF NOT EXISTS jd
``` ```
```sql ```sql
CREATE TABLE IF NOT EXISTS sf CREATE TABLE sf
( (
id BIGINT, id BIGINT,
name TEXT, name TEXT,
@ -62,11 +65,11 @@ CREATE TABLE IF NOT EXISTS sf
2. 导入 QQ 库 2. 导入 QQ 库
`6.9更新总库.txt` 文件放到 `database` 目录下,然后执行 `qq.py`。 `6.9更新总库.txt` 文件放到项目根目录下,然后执行 `python scripts/qq.py`。
3.导入京东库 3.导入京东库
`www_jd_com_12g.txt` 文件放到 `database` 目录下,然后执行 `jd.py`。 `www_jd_com_12g.txt` 文件放到项目根目录下,然后执行 `python scripts/jd.py`。
- 创建索引 - 创建索引

View File

@ -99,5 +99,5 @@ class Scanner:
if __name__ == '__main__': if __name__ == '__main__':
scanner = Scanner("8E.db", "6.9更新总库.txt") scanner = Scanner("database/database.db", "6.9更新总库.txt")
scanner.start() scanner.start()