Commit Graph

66 Commits

Author SHA1 Message Date
Igor Chubin
2b6db3a0c6 Fix minor errors 2021-10-31 21:56:50 +01:00
Igor Chubin
bbf0d6835f Generate exception page (commented out) 2021-02-27 18:27:41 +01:00
Igor Chubin
d551735021 Handle 404 properly (#500, #459, #372) 2021-01-02 17:35:01 +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
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
Igor Chubin
74283de5f5 Bind v3 2020-11-07 19:57:40 +01: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
Igor Chubin
91a5f77d2e JSON output mimetype (fixes #514) 2020-10-14 07:32:43 +02:00
Igor Chubin
79eea95904 moonphase depends on the hemishphere (#247) 2020-09-20 11:09:57 +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
owl73
4bdd28b883 Fix current time output of pngs 2020-06-23 07:41:07 -04:00
Igor Chubin
68e7b8bdb7 remve ansi codes from follow line (#202) 2020-05-24 18:12:32 +02:00
Igor Chubin
01a321c202 png rendering in a separate thread 2020-05-07 23:37:21 +02:00
Igor Chubin
5e2ae43c96 updated from master 2020-05-01 18:48:14 +02:00
Igor Chubin
acb761be0d v2 html: minor fix 2020-04-30 11:21:00 +02:00
Igor Chubin
0d5f6c298c v2+png: new experimental query encoding 2020-04-29 21:35:23 +02:00
Igor Chubin
e041280f27 do not pass query to view functions 2020-04-27 20:00:26 +02:00
Igor Chubin
156ab97cf2 do not add followme to json output 2020-04-27 19:03:58 +02:00
Igor Chubin
40ad45ad03 minor fixes 2020-04-26 19:38:56 +02:00
Igor Chubin
71b3a70e02 view=format 2020-04-25 22:28:28 +02:00
Igor Chubin
4d9a4138aa lib/wttr_srv.py clean up 2020-04-25 18:19:00 +02:00
Igor Chubin
a3bf070bb3 added iterm2 demo page 2020-04-11 18:15:29 +02:00
Igor Chubin
7565baaa85 use (query, parsed_query) args for views 2020-04-05 14:18:53 +02:00
Igor Chubin
8855e494cd cache png using cache.py 2020-04-05 13:52:25 +02:00
Igor Chubin
0ac4790007 lib/wttr_srv.py refactoring 2020-04-05 11:51:36 +02:00
Igor Chubin
4ea5c74b03 extracted get_moon() to lib/view/moon.py 2020-04-04 14:49:53 +02:00
Igor Chubin
bb17342b06 import view, import format 2020-04-04 14:22:26 +02:00
Igor Chubin
88340abec2 switched to python3 2020-04-03 21:49:51 +02:00
Igor Chubin
b1ea9be11f minor fixes 2019-12-28 18:08:06 +01:00
Igor Chubin
de1b79d705 lru cache for formatted answers (fixes #346) 2019-09-07 15:12:10 +02:00
Igor Chubin
d0d152b10c /Moon minifix 2019-08-28 13:56:22 +02:00
Igor Chubin
74d005c0cc initial v2 format implementation (fixes #332) 2019-08-25 20:39:22 +02:00
Igor Chubin
509e87fa86 use original location for /Moon (fixes #337) 2019-08-25 20:39:22 +02:00
Igor Chubin
a17e778bca handle source IP for PNG queries (#311) 2019-07-08 19:56:29 +02:00
Igor Chubin
9944488ba5 converted tests by @talyian into doctests (#304) 2019-07-07 21:51:15 +02:00
Igor Chubin
5ae8fd90a0
Merge pull request #304 from talyian/master
Improve Accept-Language header ordering
2019-07-07 21:27:24 +02:00
Igor Chubin
040b9ea7d7 various png-related problems fixed (#311) 2019-07-07 18:39:53 +02:00
Jimmy
5cee313096 Improve Accept-Language header parsing 2019-05-26 02:24:12 +00:00
Igor Chubin
5901e711f6 multilingual support for the oneline mode 2019-04-23 16:42:58 +02:00
Igor Chubin
f8e7aef267 typos fixed (fixes #267) 2019-02-04 12:12:02 +01:00
Igor Chubin
31d9fb7e59 /moon as well as /Moon should show the Moon; use Moon,Fr for the city Moon in France 2019-02-04 07:29:30 +01:00
Igor Chubin
485b17cf94 set the mime header properly 2019-02-04 07:28:44 +01:00
Igor Chubin
6b3c40922b force ansi output for line mode (fixes #266) 2019-02-04 07:27:22 +01:00
Igor Chubin
65855a6d6a displayed location names for implied locations fixes (fixes #265) 2019-02-01 23:32:17 +01:00
Igor Chubin
5a4c57ce96 added new option: -A (force-ansi=True) (fixes #153) 2019-02-01 12:29:27 +01:00
Igor Chubin
4bbbdaca7b T support for /Moon (fixes #175) 2019-02-01 12:14:01 +01:00
Igor Chubin
6dfd809694 new option: F (no follow line) (fixes #214) 2019-01-11 12:48:00 +01:00
cclauss
7c47cd7d0c Modernize Python 2 code to get ready for Python 3 2018-12-02 09:41:29 +01:00