Commit Graph

508 Commits

Author SHA1 Message Date
Igor Chubin
9b1fc05bcf
Fix typos 2021-10-30 17:39:53 +02:00
Igor Chubin
94f5ece8fc
Merge branch 'master' into master 2021-10-30 17:36:16 +02:00
Igor Chubin
156a18d7ed
Merge pull request #670 from JohanSanSebastian/master
Updated we-lang.go and translations_v2.py
2021-10-30 17:33:32 +02:00
parthibanp
6dac926616 Tamil translations added
Tamil translations added
2021-10-29 15:13:23 +08:00
Johan Sebastian
5da5495b7b
Update translations_v2.py 2021-10-29 10:43:23 +04:00
Arlème
635cd65a70
Add mg_MG 2021-10-28 21:44:29 +03:00
Arlème
3a7f0b3690
Add malagasy translation for V2 2021-10-28 21:30:45 +03:00
Arlème
1576c45808
Translate to mg-MG language (Madagascar) 2021-10-28 21:17:42 +03:00
appledora
0d44e0bee3 Added translations for all the available strings 2021-10-25 18:28:29 +06:00
Igor Chubin
8720b289d1
Merge branch 'master' into patch-1 2021-10-20 22:08:26 +02:00
Shweta Goyal
0f5331974f
Added few data sources and updated previous ones.
Made few changes in data sources:

1.) Added links to few data sources.
2.) Updated previous data sources with added links to their respective sites.
2021-10-15 02:12:27 +05:30
Igor Chubin
bb2780440b Enable Marathi language (#633) 2021-10-11 14:00:01 +02:00
Conor O'Callaghan
1129a20db7
Update translations_v2.py
Adding some more for  #305 in the spirit of Hacktoberfest :)
2021-10-02 21:22:52 +01:00
Austin Huang
74fc4df691
Add Environment Canada to the datasources list 2021-09-20 16:19:12 -04:00
kainengr
42333c54ce
Add Lithuanian translation 2021-09-20 01:25:32 +03:00
kainengr
df8feacfc5
add Lithuanian translation 2021-09-20 00:29:22 +03:00
Igor Chubin
6927116794 Store missing translations in separate logs (#324) 2021-04-26 20:56:16 +02:00
Igor Chubin
896dc263a1 Add missing translations (#324) (#535) 2021-04-21 20:03:17 +02:00
Igor Chubin
3c1ef6f681 Improve support for inverted mode for PNG 2021-04-05 14:02:08 +02:00
Igor Chubin
5ef9e3eddb Make background of png images configurable (#200) 2021-04-05 13:13:16 +02:00
Igor Chubin
e0cc061a64 Add fetch and aiohttp to PLAIN_TEXT_AGENTS (#586) 2021-03-15 15:02:53 +01:00
Igor Chubin
ed3a322f77 Add minor fix for plain-text weather symbols (#583) 2021-03-15 14:40:03 +01:00
Joseph
edd1e1e3dd Add new function: render_condition_plain 2021-03-01 01:58:37 +01:00
Joseph
747740997e Add optional argument 'plain' to render_condition 2021-03-01 01:41:42 +01:00
Joseph
cbae22a11f Add plaintext weather symbols 2021-03-01 01:27:56 +01:00
Igor Chubin
de6c771f3c Add www.bom.gov.au to list datasources to be used (#567) 2021-02-28 17:52:00 +01:00
Igor Chubin
2904c4f36d Add datasource/ (#526) 2021-02-28 15:44:27 +01:00
Igor Chubin
10392a878f Add support for T and Z (#566) 2021-02-28 10:30:04 +01:00
Igor Chubin
bbf0d6835f Generate exception page (commented out) 2021-02-27 18:27:41 +01:00
Igor Chubin
f067e82956 Filter cache entries affected by #576 2021-02-27 18:27:41 +01:00
Igor Chubin
2141bdb944 Fix bug in geoip resolution 2021-02-27 18:27:41 +01:00
Igor Chubin
94cdb961f9 Fix cache format bug (#576) 2021-02-27 18:27:41 +01:00
Igor Chubin
ee2fb37fdb
Merge pull request #569 from rkassa/master
WIP: Amharic Translations
2021-01-22 18:58:34 +01:00
Igor Chubin
fe39b77813 Log ip resolution queries 2021-01-21 23:12:40 +01:00
Igor Chubin
a6d0adbbf7 Fix _geoip() format bug 2021-01-21 23:12:06 +01:00
Robel Kassa
a5459d2388 fix for timezone 2021-01-12 22:59:31 -05:00
Robel Kassa
18629445dd v2 translations and we lang 2021-01-12 22:56:47 -05:00
Robel Kassa
2d22b751f5 amharic lang updates 2021-01-12 22:43:26 -05:00
Igor Chubin
49daae6f40 Use real temperature instead of feel-like in v2 (#562) 2021-01-07 23:24:41 +01:00
Igor Chubin
d551735021 Handle 404 properly (#500, #459, #372) 2021-01-02 17:35:01 +01:00
Igor Chubin
ed569540bc Canonify contries names 2021-01-02 17:32:06 +01:00
Igor Chubin
e525129847 Move broken entries to a separate dir 2021-01-02 13:58:28 +01:00
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
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
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
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
Gregory Danielson
35a35a56e2
Capture region from ip2location lookup 2020-11-01 13:40:20 -06:00
Gregory Danielson
af9658f63b
Check ipcache before fetching from geoip 2020-11-01 13:19:45 -06:00
Gregory Danielson
0056a97386
Capture and return region from geoip lookup 2020-11-01 13:05:03 -06:00
Igor Chubin
3717e30837
Merge branch 'master' into patch-1 2020-10-15 06:20:14 +02:00
Amadeo García Torrano
54f0b6ec48
Small mistake v2
I don't know why I put 'reporte'... Weird word.
2020-10-14 18:49:35 -03:00
Amadeo García Torrano
5bc944e464
Small mistake
Forgot a preposition in the 'FOLLOW' message.
2020-10-14 18:37:47 -03:00
Amadeo García Torrano
ad57cf96ea
Spanish translation
- Fixed minor grammar issues.
- Translated Oymyakon in 'NOT_FOUND_MESSAGE'
2020-10-14 18:35:42 -03:00
Igor Chubin
9e62a8cdcb Basque translation, v2 view (#438) 2020-10-14 08:22:24 +02:00
Igor Chubin
91a5f77d2e JSON output mimetype (fixes #514) 2020-10-14 07:32:43 +02:00
Emil Lerch
17e6e6c218
initial metno implementation 2020-10-08 16:24:19 -07:00
Igor Chubin
79eea95904 moonphase depends on the hemishphere (#247) 2020-09-20 11:09:57 +02:00
Igor Chubin
a62e3d979d fxed a regression (geolocation cache) 2020-09-20 11:09:04 +02:00
Igor Chubin
4a980be2f3 se pyphoon from PATH 2020-09-20 09:59:23 +02:00
Igor Chubin
1c7d2854fc
Merge pull request #505 from elerch/ipinfo
support for ipinfo and ip to location ordering
2020-09-17 08:37:07 +02:00
Igor Chubin
385cec249d
Merge pull request #519 from johnnyapol/http
wttr_srv: implement http status codes, resolves #163
2020-09-16 21:42:24 +02:00
John C. Allwein
e745ac6a08
wttr_srv: implement http status codes, resolves #163
This change implements proper HTTP status codes
for wttr_srv, returning:

- 200 if request was successful
- 403 if location is blocked
- 429 if rate-limited
- 500 if internal error occurred (MALFORMED_RESPONSE_HTML_PAGE)
- 503 if the service is unavailable (CAPACITY_LIMIT_REACHED)
2020-08-27 17:17:26 -04:00
PinkPanther-ny
34ec4470d6
Update translations_v2.py
Add translation of Hungarian -- PinkPanther-ny
2020-08-22 18:07:08 +10:00
Emil Lerch
3c16ac7993
support for ipinfo and ip to location ordering 2020-07-27 17:25:44 -07:00
Igor Chubin
4a6b4ec797 v2: added Occitan translation (#494) 2020-07-15 18:16:36 +02:00
Igor Chubin
b85e5732ec added oc to PROXY_LANGS (#494) 2020-07-15 17:48:27 +02:00
Igor Chubin
6b8ef7c330 recovered hi-translation broken by #501 2020-07-15 17:40:42 +02:00