-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve regex to extract the city names from the filename #29
Conversation
6cba519
to
de732c5
Compare
First thing which comes to my mind: we should start writing tests for the Javascript magic. |
Yes! But not as part of this PR :) |
How about putting the city's display name into the city's meta data? I don't see the point of having a very complex automatism to turn city IDs into display names if we have the meta-data system in place already. |
This solution was inspired by the thought not to store city names in multiple places (file names, README.md, and now |
I would still opt for a specific meta-data file where all cities are named. This leads to double entries, but it removes the problem with querying the github api and doing some filename transformation. We could write an automated test that checks if all .json files are in the cities.json meta-data list. |
I, too, like the idea of not repeating the information too often. One possibility would be to generate the ID from the display name instead of the other way round:
The IDs can be generated when we load the city list. However, I think it's still worth to simply have a separate |
The argument to make the app portable by not depending on the API of GitHub convinces me. |
de732c5
to
d29b28e
Compare
Update dependencies.
This handles the "neu-ulm" case.
neu-ulm => Neu-Ulm.
However: "frankfurt-am-main" would result in "Frankfurt-Am-Main".
#23