Files
essay/agents/论文逻辑结构评审专家/一键执行_生成评审输出.sh
2026-02-10 11:09:04 +00:00

40 lines
1011 B
Bash
Executable File
Raw 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
# 用途:
# 1) 提取标杆 PDF 与用户论文 DOCX 文本到 raw/
# 2) 生成输出目录骨架00~04 文件占位)
#
# 注意:
# - 本脚本不调用任何在线能力
# - 真正的评审与改稿由 Agent 根据 raw 文本生成并写入 00~04
BENCHMARK=${1:-"标杆论文.pdf"}
PAPER=${2:-"我的论文/飞机稿_20260130.docx"}
PAPER_BASENAME=$(basename "$PAPER")
PAPER_STEM=${PAPER_BASENAME%.*}
OUT_DIR="评审输出/${PAPER_STEM}"
RAW_DIR="${OUT_DIR}/raw"
mkdir -p "$RAW_DIR"
python scripts/extract_paper_text.py \
--benchmark "$BENCHMARK" \
--paper "$PAPER" \
--out "$RAW_DIR"
for f in \
"00_标杆画像_结构-论证-文风.md" \
"01_对标评审_评分-问题清单.md" \
"02_修改意见_按章节-按优先级.md" \
"03_修改后大纲_v01.md" \
"04_修改说明_v01_改动映射表.md"; do
if [[ ! -f "${OUT_DIR}/${f}" ]]; then
printf "# %s\n\n待生成\n" "$f" > "${OUT_DIR}/${f}"
fi
done
echo "OK: ${OUT_DIR}"