Commit Graph

57 Commits

Author SHA1 Message Date
mataha
9d23087ca4 Introduce 'dumb' mode for terminals without fallback glyphs
Windows' native terminal, `conhost.exe`, lacks font fallback support.
This causes some of the characters used in `wttr.in`'s terminal output
to not be displayed at all - placeholders are supplied in their place.
This PR provides a mode that, when enabled, translates missing glyphs
to ones available on every platform without (*I believe*) making any
compromises regarding their meaning; see translation table below.

| Character        | C-UCP  | Replacements                          | R-UCPs |
| :--------------- | :----: | :------------------------------------ | :----: |
| NORTH WEST ARROW | U+2196 | BOX DRAWINGS LIGHT ARC DOWN AND LEFT  | U+256E |
| NORTH EAST ARROW | U+2197 | BOX DRAWINGS LIGHT ARC DOWN AND RIGHT | U+256D |
| SOUTH EAST ARROW | U+2198 | BOX DRAWINGS LIGHT ARC UP AND RIGHT   | U+2570 |
| SOUTH WEST ARROW | U+2199 | BOX DRAWINGS LIGHT ARC UP AND LEFT    | U+256F |
| HIGH VOLTAGE SIGN | U+26A1 | BOX DRAWINGS LIGHT DOWN AND RIGHT + UP AND LEFT | U+250C + U+2518 |
2023-08-09 19:02:39 +02:00
Igor Chubin
cf70167529 Switch geolocation client to the internal service 2023-07-14 21:08:02 +02:00
Ken MacInnis
12c1f1639e
Nice update to preconfig formats 2022-06-13 17:09:05 -07:00
Igor Chubin
e7e532b24d
Merge pull request #730 from Skillkiller/location-not-found
Add not found header after postprocessing
2022-06-06 11:41:43 +02:00
Igor Chubin
3cbf7a9349 Add UV Index support (one-line format) 2022-06-05 20:07:00 +02:00
Sebastian Espei
856a67a474
Add not found header after postprocessing
The postprocessing method assumes that the sout data is always delivered in the same format. If the location is not found, the passed format deviates and this then leads to an incorrect behavior => incorrect return value.
Close #729
Close #728
2022-05-13 12:53:22 +02:00
Nathaniel Evan
556559a151 Make v2d use WEATHER_SYMBOL_WI_DAY 2022-01-06 04:31:29 +07:00
Nathaniel Evan
2f18e8ac02 Enables Nerd Font for "Weather:" line with v2d or v2n 2022-01-06 04:30:32 +07:00
blakadder
9dcc90c666
remove hourly from weather for JSON j2 format
#661 related 

Pardon my Python, I'm still a novice.

This is basically what I was thinking, strip out the hourly data completely and leave the rest.
2021-11-08 10:31:37 +01:00
Igor Chubin
50670c677d Add USCS support for v2 (#376) 2021-11-07 09:28:39 +01:00
Igor Chubin
4f7b182e4c Add j2 view (#661) 2021-11-01 11:13:00 +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
Igor Chubin
10392a878f Add support for T and Z (#566) 2021-02-28 10:30:04 +01: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
74283de5f5 Bind v3 2020-11-07 19:57:40 +01:00
Igor Chubin
79eea95904 moonphase depends on the hemishphere (#247) 2020-09-20 11:09:57 +02:00
Igor Chubin
05f04fc272 single line: now newline for %-notation by default (#496) 2020-07-09 20:30:19 +02:00
Igor Chubin
5b9ccb31d5 format=j1: output in utf8 2020-06-19 20:07:21 +02:00
Igor Chubin
ac62bb7387 prometheus: removed help lines duplicates (#446) 2020-06-12 19:21:53 +02:00
Igor Chubin
dabfc55c8b prometheus format code clean up (#446) 2020-06-12 19:12:08 +02:00
Manuel Rüger
cc46d78442 prometheus: Add timestamp, astronomy fields 2020-06-12 15:34:25 +02:00
Manuel Rüger
5156b9e589 prometheus: Proper help format 2020-06-10 23:30:15 +02:00
Igor Chubin
d0023d7940 yet another typo fixed (#446, #469) 2020-06-10 22:25:54 +02:00
Igor Chubin
6c7cd5a367 typo fixed (#446, #469) 2020-06-10 22:20:15 +02:00
Manuel Rüger
5b7e10f7c6 prometheus: Add help descriptions, improve metric names 2020-06-10 21:59:45 +02:00
Manuel Rüger
1857581cce Fix prometheus output 2020-06-10 13:17:19 +02:00
Igor Chubin
a573ae27eb initial naïve Prometheus implementation (#446) 2020-06-09 23:11:11 +02:00
Igor Chubin
b0a9d27a20 v2: fixed alignment problems for nerdphonts (#363) 2020-06-07 18:48:49 +02:00
Igor Chubin
949f601263
Merge pull request #463 from spywhere/feel-like
lib/view/line.py: add feel like temperature
2020-06-05 21:22:04 +02:00
Igor Chubin
228b93aad5 nerd fonts: initial support of v2d/v2n view (#363) 2020-06-05 20:29:40 +02:00
Sirisak Lueangsaksri
f312641f1a lib/view/line.py: add feel like temperature 2020-06-05 16:55:37 +07:00
Igor Chubin
f488160294 even preciser wind direction visualization (#455) 2020-06-01 14:17:34 +02:00
Igor Chubin
bac771051a v2?T: remve ansi codes (#202) 2020-05-24 18:18:01 +02:00
Igor Chubin
ce93b59a9e minor fix 2020-05-21 13:22:50 +02:00
Igor Chubin
d7afd94c31 v2: fixed bug with location behind polar circle 2020-05-13 10:22:38 +02:00
Igor Chubin
270d77dd5f line mode: astro funcs fixed 2020-05-10 23:09:53 +02:00
Igor Chubin
ddc08d6fba %c: added spaces after weather confidition when needed (#440) 2020-05-10 17:06:12 +02:00
Igor Chubin
12d3ea2035 view/wttr.py clean up 2020-05-07 09:37:36 +02:00
Igor Chubin
6c7600c309 removed space before km/h (#433) 2020-05-01 18:48:19 +02:00
Igor Chubin
413f23bec3 /Moon language fixed 2020-04-30 21:57:25 +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
2ef8435b36 line.py: use new astral lib 2020-04-27 19:04:27 +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
9f5edb963e v2 html 2020-04-25 19:36:44 +02:00