1 # edi-parser-scaffolder
3 Autonomous utility to generate parser for a given revision of the Edifact
8 1. fetch specification for a given Edifact revision
9 2. scaffold the parsers for this specification
11 ### Read specification
13 Read files downloaded from
14 https://unece.org/trade/uncefact/unedifact/download
16 You can specify individual files one by one:
18 $ stack exec edi-parser-scaffolder -- read-bundle --revision D96A --specification ./specification/references/ --message-file /path/to/D96A/DIRDEF_D.96A --segment-file /path/to/D96A/TRSD.96A --composite-file /path/to/D96A/TRCD.96A --simple-file /path/to/D96A/TRED.96A --simple-code-file /path/to/D96A/UNCL-1.96A --simple-code-file /path/to/D96A/UNCL-2.96A
19 $ stack exec edi-parser-scaffolder -- read-bundle --revision D21B --specification ./specification/references/ --message-file /path/to/D21B/IFCSUM_D.21B --message-file /path/to/D21B/IFTSTA_D.21B --segment-file /path/to/D21B/EDSD.21B --segment-file /path/to/D21B/IDSD.21B --composite-file /path/to/D21B/EDCD.21B --composite-file /path/to/D21B/IDCD.21B --simple-file /path/to/D21B/EDED.21B --simple-code-file /path/to/D21B/UNCL.21B
22 Or give the whole zip file:
24 $ stack exec edi-parser-scaffolder -- read-bundle --revision D96A --message IFCSUM --message IFTSTA --message IFTSAI --message DESADV --specification ./specification/references/ --bundle /path/to/D96A/d96a.zip
27 ### Fetch specification
29 This function is deprecated and parsing may break at any time!
30 Prefer the bundle reading above
33 $ stack exec edi-parser-scaffolder -- \
34 fetch --revision D96A --specification ./specification/references
37 If you're only interested in a subset of the specification, you can select the
41 $ stack exec edi-parser-scaffolder -- \
42 fetch --revision D96A --specification ./specification/references/ --messages IFCSUM,IFTSAI,DESADV
45 ### Scaffold the parsers
48 $ stack exec edi-parser-scaffolder -- \
49 scaffold --revision D96A --specification ./specification/references/ --src specification/src/