Convert script to Kotlin and merge into StreetComplete?
I recently reworked the whole build scripts of StreetComplete. Before, there was a mix of python, groovy and "JUnit" scripts, each of them had to be executed manually.
Now, all build scripts, and I mean also scripts that collect data and generate metadata are all written in Kotlin and are all here: https://github.com/westnordost/StreetComplete/tree/master/buildSrc
- pulling translations from POEditor API
- updating the medata/ directory for the shop descriptions for F-Droid from POEditor API
- pulling translations meta information from POEditor API
- update the presets data from iD
- transform the country metadata in /res/country_metadata and copy it to the assets folder in the app
- and new: use SPARQL queries to generate country metadata like this - https://github.com/westnordost/StreetComplete/blob/master/res/country_metadata/atmOperators.yml
Why am I telling you this? Because now this is an oppurtunity to have your crops parser run as part of the build process in StreetComplete too, or to be more precise, as part of the scripts that update the country_metadata (which might move to a separate repository one day). You'd just need to rewrite the parser as a kotlin task. What do you think?
Thanks for the nice, yeah, technically it's a great idea.
Also, if I had to rewrite this, I certainly would not choose bash scripts again, they are hardly suitable for that task. (As the filtering etc. was more complex than I initially thought.) I would possibly use Python next time.
But yeah, likely you can also properly do it in Kotlin, though I have no experience in that.
Anyway, I totally agree rewriting this would be a very good idea. That said, I likely won't have much time for this (I assume quite big task) in the next time, so I'll mark this with "help wanted".