johnrajbd / bots

Automatically exported from code.google.com/p/bots
0 stars 0 forks source link

Improve: simpler printing of edi files (edifax, template-html) #308

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Existing implementation was somewhat cumbersome: in mapping write to python 
data types, than use this in genshi template.
Now: use a 'normal' grammar (with structure, recorddefs, etc), map like any 
'normal' translation.
The field and record names as used in the grammar are printed; so probably you 
do not want to call header record 'HEA' but eg 'Orderheader' using field names 
as 'Order number' and 'Order date'.

Will upload a plugin that uses this. This includes a html-template that writes 
nodes directly to html-tables. This template is quite generic, idea is that it 
can be used for all messagetypes (might want to edit the CSS)
Additional advantage is that the html-output is checked according to grammar.

To use this use in grammar-syntax:
        'has_structure':True,  #indicates you use structure etc
Extra option in grammar syntax: 'print_as_row', eg:
        'print_as_row':[['Order header', 'order lines']],
This indicates the order lines should be printed as a table with 1 row per 
line/record.

Original issue reported on code.google.com by hjebb...@gmail.com on 28 Apr 2014 at 12:52

GoogleCodeExporter commented 8 years ago

Original comment by hjebb...@gmail.com on 10 Sep 2014 at 2:57