Igor Chubin
3c8149a227
Cleanup
2021-01-02 12:45:17 +01:00
Igor Chubin
3ae30af48d
Update from master
2021-01-02 12:24:04 +01:00
Igor Chubin
ab756f1134
Check for 'United States of America' ( #474 )
2021-01-01 23:20:47 +01:00
Igor Chubin
482dffc9a9
Use violet for extremely cold temp ( #11 )
2021-01-01 18:44:05 +01:00
Igor Chubin
4e42841c4b
Clean we-lang code up
2021-01-01 18:35:27 +01:00
Igor Chubin
b5d3da52cc
Add alias conversion for YYZ ( #557 )
2020-12-31 21:28:14 +01:00
Igor Chubin
40892a937d
Merge pull request #558 from amadeogarcia/master
...
Final Spanish corrections
2020-12-31 19:36:38 +01:00
Igor Chubin
b2b8d6d17d
Merge branch 'master' into master
2020-12-31 19:36:24 +01:00
Amadeo García Torrano
08de2bf51a
Final Spanish corrections
...
In my opinion with this commit we can close the issue #533 . I edited `es.txt` and `es-help.txt` in `share/translations`. `we-lang.go` was okay, so I didn't touch it.
I apologize for being absent the last 2 months after suggesting said issue.
2020-12-30 11:25:18 -03:00
Gregory Danielson
e98fbe9258
Document expected ipcachewrite input and output, with optional latlong entries
2020-11-26 12:21:22 -06:00
Gregory Danielson
c49c0a5c0e
Remove lat, long from _ip2location because WS5 is more expensive
2020-11-26 12:20:35 -06:00
Igor Chubin
1b25e16a37
Minor code cleanup
2020-11-16 19:52:10 +01:00
Igor Chubin
41d4d3d789
Extend location.py docstring
2020-11-16 19:51:51 +01:00
Gregory Danielson
26372148b5
Merge branch 'master' of github.com:chubin/wttr.in
2020-11-15 11:24:46 -06:00
Gregory Danielson
303c2d2ab7
Observe two possible names for United States when checking us_ip
2020-11-15 11:13:15 -06:00
Gregory Danielson
bdcb24742d
Rework ipcache write to include new data from all sources
2020-11-15 11:10:19 -06:00
Gregory Danielson
c349dc2f17
Break from IPLOCATION method loop if one method produces non-null result
2020-11-15 11:02:12 -06:00
Gregory Danielson
34313eb162
Rework get_location to handle additions to location tuple; same return
2020-11-15 10:58:51 -06:00
Gregory Danielson
e8cc9adc7f
Rework geoip to include ccode, lat, long for cache purposes
2020-11-15 10:57:53 -06:00
Gregory Danielson
88cd84b5d2
Rework ipinfo to include ccode, lat, long for cache purposes
2020-11-15 10:57:22 -06:00
Gregory Danielson
b7517bce65
Rework ip2location to include ccode, lat, long for cache purposes
2020-11-15 10:56:43 -06:00
Gregory Danielson
66802657a5
Add COUNTRY_MAP dict for workaround function cleanliness
2020-11-15 10:54:51 -06:00
Gregory Danielson
117727bc2b
Add pycountry dependency for converting ISO code to country name
2020-11-15 10:53:59 -06:00
Igor Chubin
4eedafb813
Merge pull request #546 from dnkl/add-foot-to-list-of-terminals-with-image-support
2020-11-12 19:22:54 +01:00
Daniel Eklöf
9c4e2b1cfb
Add ‘foot’ to list of terminals with image support
...
Foot, https://codeberg.org/dnkl/foot , has sixel support.
2020-11-12 18:30:29 +01:00
Igor Chubin
b37d8028bf
Merge pull request #545 from UlisesAlexanderAM/master
...
Spanish translation corrections and additions
2020-11-11 09:58:37 +01:00
Ulises Alexander Arguelles Monjaraz
3c64af0697
Corrects some words in spanish, and adds translation
...
for 2 options not include in es-help.txt but present in help.txt
2020-11-10 12:57:54 -06:00
Ulises Alexander Arguelles Monjaraz
cbea96f43a
Corrects some words in spanish, and changes others for a better comprehention
2020-11-10 12:17:01 -06:00
Igor Chubin
74283de5f5
Bind v3
2020-11-07 19:57:40 +01:00
Igor Chubin
626a106186
Fix bug with location format
2020-11-07 19:57:39 +01:00
Igor Chubin
d224efae39
Add note about VTE-based terminals
2020-11-06 23:44:25 +01:00
Igor Chubin
8401a06f4a
Add Konsole and st sixel support info
2020-11-06 23:38:31 +01:00
Gregory Danielson
bd7dd05cca
Observe region in geolocator
2020-11-01 20:04:14 -06:00
Gregory Danielson
953284d3d1
Check US IP out of 2nd element of query_source_location, due to added region
2020-11-01 17:18:04 -06:00
Gregory Danielson
afde91211c
Check and observe region and country in building formatted location
2020-11-01 17:00:09 -06:00
Gregory Danielson
deb2a5d01f
Adjust ipcache to observe new region
...
THIS WILL INVALIDATE THE EXISTING CACHE!
The new cache now pulls data from all three of geoip, ip2location, and
ipinfo, and stores it in the relatively simple city;region;country
format.
The old format would either store city;country or store
countrycode;country;region;city directly from ip2location, so it is much
more consistent with this change.
2020-11-01 16:37:45 -06:00
Gregory Danielson
2ebdb15398
Adjust ipcachewrite to account for region addition
2020-11-01 16:37:26 -06:00
Gregory Danielson
c7d3b32d53
Remove cache operation from ip2location; shortcut where possible
...
This comes with something of a refactor.
- IP2LOCATION_KEY is now checked with `if not` to reduce indention
- ConnectionError is increased to RequestException to catch all requests
errors
- On that note, now raising for status too
2020-11-01 16:35:17 -06:00
Gregory Danielson
628a860d6d
Remove cache operation from ipinfo; shortcut where possible
...
This comes with something of a refactor.
- IPINFO_TOKEN is now checked with `if not` to reduce indention
- ConnectionError is increased to RequestException to catch all requests
errors
- On that note, now raising for status too
- Now catching ValueError in case of json parsing failure
2020-11-01 16:32:13 -06:00
Gregory Danielson
996485adf1
Remove cache operation from geoip; shortcut where possible
2020-11-01 16:31:46 -06:00
Gregory Danielson
e4ac3f266f
Do cache read and write in get_location instead of duplicated in each IPLOCATION_ORDER method
2020-11-01 16:31:15 -06:00
Gregory Danielson
7af4aaa8ec
Correct docstring for get_location
2020-11-01 16:30:00 -06:00
Gregory Danielson
e1adca3bf0
Add region into location formatting
2020-11-01 16:28:24 -06:00
Gregory Danielson
f3bce5f806
Unpack region from get_location call or fail case
2020-11-01 16:27:40 -06:00
Gregory Danielson
4fa1ebd995
Add location[2] to ipcachewrite for new region part of cache
2020-11-01 15:03:14 -06:00
Gregory Danielson
08be8787b1
Observe new region var in get_location
2020-11-01 13:50:05 -06:00
Gregory Danielson
c65614d230
Enable ipcache writes from geoip lookup
2020-11-01 13:45:32 -06:00
Gregory Danielson
ef477822ae
Coalesce location into 3-tuple in geoip lookup
2020-11-01 13:45:08 -06:00
Gregory Danielson
4996c5a553
Pass region through workaround for consistency
2020-11-01 13:42:31 -06:00
Gregory Danielson
511b13bdcb
Capture and return region from ipinfo lookup
2020-11-01 13:41:52 -06:00