Files
bid-doctor/samples/tenders/fetch.sh
YANG JIANKUAN 581fab93b6 docs(samples): 新增苏采云 IT 集成招标文件样本清单
10 份公开采购文件的清单与来源;原始文件不入库,
由 fetch.sh 重新下载并校验 sha256。

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 18:23:05 +08:00

34 lines
1.7 KiB
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
# 重新下载样本招标文件并校验 sha256 前缀(见 README.md)。
# 用法:samples/tenders/fetch.sh
set -euo pipefail
cd "$(dirname "$0")"
BASE=http://www.ccgp-jiangsu.gov.cn/fileApi/320000
# ID 项目编号 附件路径 sha256 前 16 位
SAMPLES="
S01 JSZC-320000-SHGK-G2026-0101 202610/b6adafa7ffcb4657a01a3c934b62b63d.doc 3c95deee7bdb6ec4
S02 JSZC-320300-XZCG-G2026-0053 202610/c7752430376d4fc98aa3f40a0bd6a310.doc c46209f78e25bae7
S03 JSZC-320404-CZZY-G2026-0029 202611/f99dcbc60cad4fcead3e31713e5d5deb.doc ac80ee1eb3d662e2
S04 JSZC-320613-TDGW-G2026-0042 202610/f706549deb5c4aa0a96fd83f566c29a4.doc efa6a1e0b885a31b
S05 JSZC-320200-JZCG-G2026-0089 202611/8d9136181ddb4790a2b66b02f329f1ec.doc 89d0993eecc36b35
S06 JSZC-320700-JZCG-G2026-0150 202610/5e5b3f43e53a40568866243fdfecacce.doc 4020143e0ecfae23
S07 JSZC-320000-HYGS-G2026-0036 202611/1e5f2270dee747feb00c7fa1649d4fd8.doc fdc34076f4033a2e
S08 JSZC-320000-SCZX-C2026-0520 202611/c7df4b5a37ff4891910fdb2ed45ad764.doc f0294309136c843a
S09 JSZC-320000-HWZX-C2026-0687 202611/b44d964ebe0846ea99964fdfdbb60452.doc 34db1f81260af789
S10 JSZC-320100-JZCG-G2026-0369 202610/4eea6d022e1f4dbcb3f7f655e8808b6b.doc c4f46e53812679da
"
echo "$SAMPLES" | while read -r id code path sha; do
[ -z "$id" ] && continue
mkdir -p "$id"
out="$id/${code}采购文件.doc"
if [ ! -f "$out" ]; then
curl -sSf -m 60 -A 'Mozilla/5.0' -o "$out" "$BASE/$path"
sleep 1.5
fi
actual=$(shasum -a 256 "$out" | cut -c1-16)
if [ "$actual" = "$sha" ]; then echo "$id ok"; else echo "$id 校验不一致($actual),源文件可能已更新"; fi
[ -f "$id/text.txt" ] || textutil -convert txt -output "$id/text.txt" "$out"
done