Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions scripts/custom_config/py_config_example.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# you should copy it into py_config.py.

# 数据库信息
database = {
"host": "127.0.0.1",
"user": "root",
Expand All @@ -8,11 +9,20 @@
"port": 3306,
"charset": "utf-8"
}

# word 文档每页单词数量
per_num = 18

# 待处理文档
original_doc = ""

# 已处理文档
updated_doc = "updated_doc.docx"

# json 文件位置
jsonFile = "../../netem.json"

# 数据库表和实际使用的列名的映射
column_list = [
{"column_name": "序号", "table_column": "id"},
{"column_name": "词频", "table_column": "frequency"},
Expand All @@ -21,10 +31,14 @@
{"column_name": "异形词", "table_column": "variant"}
]

# 处理的数据库表名
table_name = "vocabulary"

# 单元格单行所能容纳最大字符数
max_length = -1

# 已处理后的 json 文件名
updated_json_name = "netem.json"

# json 文件标题
table_name_in_json = "5530考研词汇词频排序表"
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
password=py_config.database["password"],
database=py_config.database["name"],
)

column_list = py_config.column_list

# 2. 获取列名和表字段名的列表
Expand Down