从 vscode-edi-support 中提取并用 Python 重写的 EDIFACT 解析工具集。
edifact_to_yaml.py: 解析 EDIFACT,默认输出 YAML(可选 JSON)edifact_summary.py: 输出业务摘要(默认 YAML,可选 JSON)edifact_parser.py: 底层解析与语义补全逻辑解析为 YAML:
python3 edifact_to_yaml.py sample-orders.edifact -o sample-orders.yaml
解析为 JSON:
python3 edifact_to_yaml.py sample-orders.edifact --json -o sample-orders.full.json
输出摘要(YAML):
python3 edifact_summary.py sample-orders.edifact -o sample-orders.summary.yaml
输出摘要(JSON):
python3 edifact_summary.py sample-orders.edifact --json -o sample-orders.summary.json