Skip to content
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

Provide custom location #6

Open
Geobert opened this issue Sep 23, 2021 · 5 comments
Open

Provide custom location #6

Geobert opened this issue Sep 23, 2021 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Geobert
Copy link

Geobert commented Sep 23, 2021

Hi,

Fun little CLI tool :D

Maybe you might consider an option (and/or config file) to specify the location manually, because I'm on VPN and it doesn't reflect the correct location for me ^^'

@silvioprog
Copy link
Member

Hi @Geobert, glad you are enjoying it! 😃

I don't have experience with VPN (and proxy), but if you know how to implement it, please feel free to send a PR. (or add it into wish list)

References about it are welcome too!

@silvioprog silvioprog added enhancement New feature or request help wanted Extra attention is needed labels Sep 24, 2021
@Geobert
Copy link
Author

Geobert commented Sep 24, 2021

what I meant is that the location resolver uses the IP address to guess the location. Using the VPN, the IP is the VPN's server one, not mine. Hence the wrong location

So the idea was to provide the location manually (City + country)

@omac777
Copy link

omac777 commented Sep 24, 2021

I'm trying hard to get it to work for my wife's hometown, but it doesn't succeed to display the correct weather.
Please if you could provide a means to specify via Lat and Long, that would help. You display different cities with different LAT/LONG's but I can't select among the ones listed.

Here's an example:

$ wethr Changchun,Jilin,CN,43.897,125.326
Error: Returning 2 cities, please choose one:

City: Changchun
Country code: CN
Coordinates:
  Latitude: 43.88
  Longitude: 125.3228

City: Changchun
Country code: CN
Coordinates:
  Latitude: 26.7286
  Longitude: 120.0401

davidm@pop-os 2021-09-24_06:33:11_EDT : ~
$ wethr 43.897,125.326
, N/D: 25.79C ☁️☁️

That weather information after requesting with LAT/LONG is totally incorrect since it's 16C there at the moment.

Thank you for listening.

@silvioprog
Copy link
Member

@Geobert What do you think about us providing something like wethr -p 'ip-address or host-address'? Let me know if this option could solve the problem. If so, we can start a new branch called "custom_location" to try this possible new feature.

@omac777 thanks a lot for reporting!

What do you think about selecting the option by index? For example:

$ wethr Changchun,Jilin,CN
Error: Returning 2 cities, please choose one:

1) City: Changchun
Country code: CN
Coordinates:
  Latitude: 43.88
  Longitude: 125.3228

2) City: Changchun
Country code: CN
Coordinates:
  Latitude: 26.7286
  Longitude: 120.0401

This away, we could:

$ wethr 2

Where 2 is the second option shown in the output.

For a while, could you try other location providers? There are four (0..3), and you can choose one by -p parameter, for example: wethr -p1 (this selects the second location provider).

@Geobert
Copy link
Author

Geobert commented Sep 24, 2021

To be honest, I totally missed that we can provide city and country already ^^' so my report is invalid. but @omac777 issue is valid though :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants