Files
PACS/UPP列表处理/数据处理工作区/08_本地运行流程.template.sh
2026-05-25 12:33:24 +08:00

32 lines
1.3 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
set -euo pipefail
# 复制本文件后再填写真实批次名、密钥和数据库配置。
CONFIG="数据处理工作区/01_任务配置.json"
BATCH_NAME="[批次文件夹名]"
INPUT_DIR="待处理-[任务名]图片集群/${BATCH_NAME}"
OUTPUT_DIR="数据处理结果区/已处理-[任务名]图片集群/${BATCH_NAME}-列表归档结果"
export TENCENTCLOUD_SECRET_ID="${TENCENTCLOUD_SECRET_ID:-填入腾讯云 SecretId}"
export TENCENTCLOUD_SECRET_KEY="${TENCENTCLOUD_SECRET_KEY:-填入腾讯云 SecretKey}"
python3 数据处理工作区/02_图片表格OCR归档.py \
--config "${CONFIG}" \
--input "${INPUT_DIR}" \
--output "${OUTPUT_DIR}"
python3 数据处理工作区/04_合并批次结果.py \
--config "${CONFIG}"
# 如需入库,先复制 06_PostgreSQL建表结构.template.sql 为 06_PostgreSQL建表结构.sql并设置以下变量。
# export WORKFLOW_DB_HOST='数据库主机'
# export WORKFLOW_DB_PORT='5432'
# export WORKFLOW_DB_NAME='数据库名'
# export WORKFLOW_DB_USER='数据库用户'
# export WORKFLOW_DB_PASSWORD='数据库密码'
#
# python3 数据处理工作区/05_同步PostgreSQL单表.py \
# --input 数据处理结果区/合并_图片表格_结构化.json \
# --schema 数据处理工作区/06_PostgreSQL建表结构.sql