e4d62df7e3
- 智能供应商识别(蓉城易购/烟草/杨碧月/通用) - 百度 OCR 表格识别集成 - 规则引擎(列映射/数据清洗/单位转换/规格推断) - 条码映射管理与云端同步(Gitea REST API) - 云端同步支持:条码映射、供应商配置、商品资料、采购模板 - 拖拽一键处理(图片→OCR→Excel→合并) - 191 个单元测试 - 移除无用的模板管理功能 - 清理 IDE 产物目录 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
49 lines
1.4 KiB
Python
49 lines
1.4 KiB
Python
"""
|
|
默认配置
|
|
-------
|
|
包含系统的默认配置值。
|
|
"""
|
|
|
|
# 默认配置
|
|
DEFAULT_CONFIG = {
|
|
'API': {
|
|
'api_key': '', # 将从配置文件中读取
|
|
'secret_key': '', # 将从配置文件中读取
|
|
'timeout': '30',
|
|
'max_retries': '3',
|
|
'retry_delay': '2',
|
|
'api_url': 'https://aip.baidubce.com/rest/2.0/ocr/v1/table',
|
|
'token_url': 'https://aip.baidubce.com/oauth/2.0/token',
|
|
'form_ocr_url': 'https://aip.baidubce.com/rest/2.0/solution/v1/form_ocr/get_request_result'
|
|
},
|
|
'Paths': {
|
|
'input_folder': 'data/input',
|
|
'output_folder': 'data/output',
|
|
'temp_folder': 'data/temp',
|
|
'template_folder': 'templates',
|
|
'template_file': '银豹-采购单模板.xls',
|
|
'processed_record': 'data/processed_files.json',
|
|
'data_dir': 'data',
|
|
'product_db': 'data/product_cache.db'
|
|
},
|
|
'Performance': {
|
|
'max_workers': '4',
|
|
'batch_size': '5',
|
|
'skip_existing': 'true'
|
|
},
|
|
'File': {
|
|
'allowed_extensions': '.jpg,.jpeg,.png,.bmp',
|
|
'excel_extension': '.xlsx',
|
|
'max_file_size_mb': '4'
|
|
},
|
|
'Templates': {
|
|
'purchase_order': '银豹-采购单模板.xls',
|
|
'item_data': '商品资料.xlsx'
|
|
},
|
|
'Gitea': {
|
|
'base_url': 'https://gitea.94kan.cn',
|
|
'owner': 'houhuan',
|
|
'repo': 'yixuan-sync-data',
|
|
'token': ''
|
|
}
|
|
} |