vliz-be-opsci / pysubyt

python module for Linked Data production (aka semantic uplifting) through Templating
MIT License
0 stars 0 forks source link

re-organize the ttl_fmt functions as custom filters #33

Closed marc-portier closed 2 years ago

marc-portier commented 2 years ago

this would benefit the readability of our templates

{{ttl_fmt(value, 'xsd:float')}} --> {{value | ttlfmt('xsd:float')}}

see https://jinja.palletsprojects.com/en/3.0.x/api/#custom-filters

marc-portier commented 2 years ago

@laurianvm please update your templates to stop using the syntax {{ ttl_fmt(value, args...) }} and instead adopt the new way of writing {{ value | ttl(args...) }}

see the applied diff of commit 1bbb96e to the tests as a guide

marc-portier commented 2 years ago

@laurianvm while at it you might want to remove all use oof unparse() as well - xmlasdict no longer requires it - see #38