cobaltpet / swl-tool

A ruby script for fetching, parsing, and displaying EiBi shortwave broadcast schedules
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Language filter options -l -le -ls (etc) broken #30

Open cobaltpet opened 7 years ago

cobaltpet commented 7 years ago

I broke the language filtering (options -l -le -ls etc.) when fixing #26 . This is because BroadcastEntry items now store the human-readable languages instead of the raw language codes from the EiBi data, so the records and the filter strings don't match.

cobaltpet commented 7 years ago

While we're at it, consider adopting ISO 639-1 two-letter language codes as standard for the BroadcastEntry items. https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

cobaltpet commented 7 years ago

ISO 639 is for written, not spoken, languages, so for example Cantonese is missing. Instead use the IANA language subtag registry: http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry

So for example, parsing EiBi: EiBi language code -> IANA language subtag -> human-readable language name

cobaltpet commented 7 years ago

This is a large task because I need to modify the EiBi language hash to do EiBi language code -> IANA language subtag, and create a new IANA language subtag -> human-readable language name hash. Moving to 0.2