beyarkay / eskom-calendar

Get your loadshedding schedule in your calendar and never be left in the dark! Open-source, up-to-date, and developer friendly.
https://eskomcalendar.co.za
GNU General Public License v3.0
190 stars 35 forks source link

Create website frontend #16

Closed beyarkay closed 1 year ago

beyarkay commented 2 years ago

Github releases are great, but they're a bit intimidating and unintuitive for those who don't know code. Make a frontend (probably via github pages) on which to host the links. This should include:

Ruandv commented 2 years ago

@beyarkay this is a very interesting project. And I would really like to get involved in the UI side of things for this project. Would it be ok if the website is done in ReactJs? Do you have a specific theme / css framework preference?

beyarkay commented 2 years ago

Hey! Thanks so much for showing interest, and I'm glad you like it! Really excited about getting a more user friendly UI on this thing as well.

Some notes, questions:

  1. I'm happy with react 👍 and have done some things in it myself so that's probably the best option
  2. Easiest way to structure the website would be to create your own repo (hosted on GitHub) with the website's source code and then I'll we can add links to it when it's looking good.
  3. Have you got any ideas about how to host the website? This was the main blocker to me doing it myself
  4. Providing an API via the website would be nice, but I wouldn't worry about it unless you particularly want to. Maybe just keep in mind that it's an enhancement the project would want to make in the future.
  5. I have basically no knowledge of CSS frameworks, but would just ask that there be a darkmode 😄

Let me know if you have any questions about the structure eskom-calendar at the moment, I've tried to make it easy for people to hook into and use as a service but am happy to make changes if something would be useful.

Cheers!

beyarkay commented 2 years ago

Also, you'll find 46cc48a93bc9f18153127506efe8be0210596083 useful. I've made an update to the code so that the file https://github.com/beyarkay/eskom-calendar-dev/releases/download/latest/machine_friendly.csv has machine-friendly, preprocessed loadshedding schedules which will be a lot easier to handle than anything else.

See this section in the readme for examples.

Ruandv commented 2 years ago

Thanks I will have a look at the links. For now I am using the GithubApi to retrieve your latest tag and in there I have the assets and a few other data that I am using ;-). Is it somehow possible to add a comma deiminated property into say which towns/areas are forming part of a certain file?

beyarkay commented 2 years ago

Is it somehow possible to add a comma deiminated property into say which towns/areas are forming part of a certain file?

I'm afraid not, or at least not easily. The sorry truth is that where exactly the different areas are doesn't have to correspond to any logical town/suburb division, so there's no source of truth on the matter.

However I do agree that it would be super useful. You can get some basic information from the name of the file:

This said, I'll look into it a bit more on my end to see if I can scrape some more info from eskom's websites to get better data for you. It might take a while though.

You could always query the google API to get information about suburbs, but that's quite a lot of extra work I think.

beyarkay commented 2 years ago

Also, if I can ask for features: Adding some sort of way to know how many unique users are accessing each calendar would be extremely helpful. Ideally though this wouldn't involve adding some privacy destroying tracking dot though.

Ruandv commented 2 years ago

Very basic site is up and running using GH Pages : https://ruandv.github.io/eskom-calendar/

beyarkay commented 2 years ago

Looking good! Where can I find the source code?

Ruandv commented 2 years ago

Also, if I can ask for features: Adding some sort of way to know how many unique users are accessing each calendar would be extremely helpful. Ideally though this wouldn't involve adding some privacy destroying tracking dot though.

The github api seems to keep track for you : https://api.github.com/repos/beyarkay/eskom-calendar/releases/latest There is a "download_count": 2 property for each of the files.

I have updated the "Card" on the website to also show that.

Ruandv commented 2 years ago

@beyarkay Im not too sure where to post this so I am doing it as part of this issue. I found a pdf/xls that lists all the suburbs and their blocks for COJ (city of joburg)

The COJ has a page that we could also maybe skim? https://www.citypower.co.za/Lists/Suburb%20%20Block/AllItems.aspx

beyarkay commented 1 year ago

The website eskomcalendar.co.za/ec is now live