Closed declan-fitzpatrick closed 11 months ago
Thanks for the PR! Checking it out now...
Not sure how you do the area search on https://eskomcalendar.co.za, that will also need to be updated
The area search on eskomcalendar.co.za is powered by a frankly horrendous YAML file in this repo, https://github.com/beyarkay/eskom-calendar/blob/main/area_metadata.yaml. It basically takes care of the question "what calendar is associated with this suburb/area/town", but that question gets really messy because Eskom and the municipalities treat things differently.
I've got something in the works to replace that (and also to improve the website a ton), but it's not ready yet and has also been put on hold until after the MSc.
The website will still show the updated schedules when this PR is merged if you go directly to the correct URL, but you won't be able to search for each schedule by giving it your suburb (although if you search directly for the calendar name like city-power-x then all will work okay).
If you want to take a crack at the area_metadata.yaml editing:
yamllint --config-file .area_metadata.yamllint area_metadata.yaml
and lots of the silly mistakes will get caught (you should have no warnings and no errors)calendar_name: city-power-X.ics
, like the one here: https://github.com/beyarkay/eskom-calendar/blob/main/area_metadata.yaml#L3790source
will need to be to the URL of the new schedules. (source_info
just points to the "main" website for that area/municipalities loadshedding schedules, in case the URL to the PDF gets deleted and we want to figure out where the new schedules might be)areas
will need to be updated to have a list of the names of areas which are related to the schedule. So if city-power-1
now shows the schedule for the suburbs Foo and Bar and Baz, then the areas should become:
...
areas:
- {name: "Foo"}
- {name: "Bar"}
- {name: "Baz"}
After that, everything should work. And the website will get updated immediately once the PR is merged into main
.
LGTM!
@all-contributors please add @declan-fitzpatrick for data and maintenance
@beyarkay
I've put up a pull request to add @declan-fitzpatrick! :tada:
Update for #488
:information_source: City Power revised the blocks as well as the schedules. Generated names have been kept the same
generated/city-power-x.csv
for consistency, but will require users in revised blocks to update calendars or automations that are using this repo.