md-postprocessor config idea/example too repetitive
Created by: noumar
Please don't take any offense from what I write below. It is meant as constructive criticism
Reading through the Confluence page I almost rolled over on the floor laughing, because the configuration idea is way too repetitive and manual, especially for languages.
There exists Python libraries for specific purposes. E.g the language library is pycountry, see the Languages section. Use it and don't reinvent the wheel, which you then have to maintain.
If you need rules then what they should be for is to link the community
and field
to a Python function that processes it, and it should do more than sed
does. e.g
<community>, <field>, <handler_function>
clarin, language, clarin_language
gbif, language, gbif_language
My opinion of configuration files is that they belong with compiled code like Java, but not Python. It's as easy to edit a list/dict in a Python file as a config file. But you could as well just concatenate the first two fields with underscore and call that function, it will be as reliable as you giving any arbitrary name for a function that doesn't exist, possibly because of a typo.