root / edi
@smdhz smdhz authored 5 days ago
docs readme 5 days ago
schemas/ edifact init 8 days ago
.gitignore init 8 days ago
LICENSE init 8 days ago
README.md readme 5 days ago
edifact_parser.py init 8 days ago
edifact_summary.py readme 5 days ago
edifact_to_yaml.py init 8 days ago
sample-orders.edifact init 8 days ago
README.md

EDIFACT Python Parser

vscode-edi-support 中提取并用 Python 重写的 EDIFACT 解析工具集。

脚本说明

  • edifact_to_yaml.py: 解析 EDIFACT,默认输出 YAML(可选 JSON)
  • edifact_summary.py: 输出业务摘要(默认文本表格,可选 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

输出摘要(文本表格):

python3 edifact_summary.py sample-orders.edifact -o sample-orders.summary.txt

输出摘要(JSON):

python3 edifact_summary.py sample-orders.edifact --json -o sample-orders.summary.json

edifact_summary 工作流程文档

详细流程见:docs/edifact_summary_workflow.md