RiiConnect24 / File-Maker

Generate data files for Wii Channels that have the latest news, forecast data, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do we make the coordinates for forecastlists.py?

HilbertIdeals5 opened this issue · comments

Short Description of Issue:
I have no clue how to make the coordinates for forecastlists.py.

Long Issue:
The instructions provided in the README.md for the Forecast Channel folder are vague for the coordinates step. I want to make a pull request to add a city, but:

  1. I don't know how to convert decimal coordinates into the tiny jumbles of characters in the dictionaries. For example, for Mumbai, how did a 19.0760 latitude and 72.8777 longitude turn into "0d7e33c9" ???
  2. Trying to use the provided Python function brought up errors, all pointing to line 2 with value = int(value,16). I tried doing coord_decode(19.0760), and it complained that it was not a string. Then I tried coord_decode("19.0760"), and it complained that it was invalid for something with base 16.

Steps to Reproduce (for the Python snippet):

def coord_decode(value):
    value = int(value,16)
    if value >= 0x8000: value -= 0x10000
    return value*0.0054931640625

coord_decode("19.0760")

  • Press Run, and have a confused reaction :(

Could you please tell me the city and country you want to make coordinates for? That function is to decode the coordinates from hex form.

Or, in other words, what are you messing with this for?

I assume you're just an aficionado for the Forecast Channel.

Oh, um, I wasn't intending to make a clone of the service. The instructions in the README.md file say that we can add our own cities and PR them to you. I assumed PR meant "pull request", so I thought I was supposed to make a fork of the code and just edit it to add the city. Sorry if I made a mistake.

I wanted to add the city of Ahmedabad, Gujarat, India. India has only 2 cities on the Globe, and I thought having it would make it more convenient to see the weather closer to where my relatives live, and would be another city people could check out if they wanted to.

I guess you could say that I'm an aficionado for the Forecast Channel, but if it looks like I'm being nosy or I'm shoving too many expectations, then I'm so sorry for that.

Are you in India? And yes, PR is "pull request".

As you probably know, each country that supports the Forecast Channel has their own list of localized regional cities that are not available in other countries.

India is not one of those countries outside for those 2 cities that are on the Globe for all countries.

The list of international cities comes from Nintendo, and I haven't modified those in any way by adding/removing cities. Sorry, but I don't really want to modify them.

To answer your first question, I'm not in India, I'm in the U.S. Also, if the list of international cities came directly from Nintendo, then it makes sense if you want to keep them pristine. I'll keep my hands off ✋🏼