Jun-01-2020, 10:57 AM
(Jan-14-2020, 12:49 PM)russellmcdonell Wrote: If there's enough interest I'll try and turn them into pip installable modules and some documentation.
Nice work! I recently conducted a poll about adding DMN support to a number of popular languages and editors.
In my informal poll, Python topped the list: https://twitter.com/mengwong/status/1264118536064004096
To date, DMN implementations have involved a GUI saving to XML (either DMN or XLSX).
My twist: I'd like to propose DMN as Markdown tables, inline.
So the Python interface would be something like this:
var whatdish = dmnmd(""" | U | Season | Guest Count | Dish (out) | # Annotation | |---|----------------------|-------------|------------------------------|---------------| | 1 | Fall | <= 8 | Spareribs | | | 2 | Winter | <= 8 | Roastbeef | | | 3 | Spring | <= 4 | Dry Aged Gourmet Steak | | | 4 | Spring | [5..8] | Steak | | | 5 | Fall, Winter, Spring | > 8 | Stew | | | 6 | Summer | - | Light Salad and a nice Steak | Hey, why not? | """);And then whatdish("Fall",4) returns "Spareribs"
Reinventing the wheel slightly, I spent the weekend writing a markdown table parser and FEEL evaluator in Haskell, so I know it can be done … as you've shown with your XLS parser and S/FEEL evaluator.
If this takes off we can imagine extending various IDEs' python modes to do markdown table editing as a submode sort of thing.
Thoughts?