diff options
author | Frédéric Menou <frederic.menou@fretlink.com> | 2016-12-08 10:19:15 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@fretlink.com> | 2022-05-17 18:01:51 +0200 |
commit | a9d77a20008efe82862cc1adbfa7a6d4f09f8ff7 (patch) | |
tree | adf3186fdccaeef19151026cdfbd38a530cf9ecb /scaffolder/README.md | |
download | edi-parser-a9d77a20008efe82862cc1adbfa7a6d4f09f8ff7.tar.gz edi-parser-a9d77a20008efe82862cc1adbfa7a6d4f09f8ff7.tar.zst edi-parser-a9d77a20008efe82862cc1adbfa7a6d4f09f8ff7.zip |
Diffstat (limited to 'scaffolder/README.md')
-rw-r--r-- | scaffolder/README.md | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/scaffolder/README.md b/scaffolder/README.md new file mode 100644 index 0000000..477b3f6 --- /dev/null +++ b/scaffolder/README.md | |||
@@ -0,0 +1,50 @@ | |||
1 | # edi-parser-scaffolder | ||
2 | |||
3 | Autonomous utility to generate parser for a given revision of the Edifact | ||
4 | specification. | ||
5 | |||
6 | ## Usage | ||
7 | |||
8 | 1. fetch specification for a given Edifact revision | ||
9 | 2. scaffold the parsers for this specification | ||
10 | |||
11 | ### Read specification | ||
12 | |||
13 | Read files downloaded from | ||
14 | https://unece.org/trade/uncefact/unedifact/download | ||
15 | |||
16 | You can specify individual files one by one: | ||
17 | ``` | ||
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 | ||
20 | ``` | ||
21 | |||
22 | Or give the whole zip file: | ||
23 | ``` | ||
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 | ||
25 | ``` | ||
26 | |||
27 | ### Fetch specification | ||
28 | |||
29 | This function is deprecated and parsing may break at any time! | ||
30 | Prefer the bundle reading above | ||
31 | |||
32 | ``` | ||
33 | $ stack exec edi-parser-scaffolder -- \ | ||
34 | fetch --revision D96A --specification ./specification/references | ||
35 | ``` | ||
36 | |||
37 | If you're only interested in a subset of the specification, you can select the | ||
38 | messages: | ||
39 | |||
40 | ``` | ||
41 | $ stack exec edi-parser-scaffolder -- \ | ||
42 | fetch --revision D96A --specification ./specification/references/ --messages IFCSUM,IFTSAI,DESADV | ||
43 | ``` | ||
44 | |||
45 | ### Scaffold the parsers | ||
46 | |||
47 | ``` | ||
48 | $ stack exec edi-parser-scaffolder -- \ | ||
49 | scaffold --revision D96A --specification ./specification/references/ --src specification/src/ | ||
50 | ``` | ||