|
18 | 18 | #
|
19 | 19 | # ---------------------------------------------
|
20 | 20 | # History
|
| 21 | +# 2023-06-15 : Improved help |
21 | 22 | # 2023-06-14 : Initial release
|
22 | 23 |
|
23 |
| -set SCRIPT_VERSION 1.0 |
| 24 | +set SCRIPT_VERSION 1.1 |
24 | 25 | set SCRIPT_NAME wttr
|
25 | 26 | set SCRIPT_SUMMARY "Adds an item showing weather"
|
26 | 27 |
|
27 | 28 | set SCRIPT_ARGS "loc <location>|format <1-4|format>|lang <ISO lang>"
|
28 |
| -set SCRIPT_ADESC "loc <location> : sets the new location\nformat <format>: Formats of the output, can be an integer (1-4) or a string.\n More explanation @ https://github.com/chubin/wttr.in#one-line-output\nlang <ISO lang>: Defines the lang to use (EN for english, FR for french, ...). Default is your weechat lang." |
| 29 | +set SCRIPT_ADESC "loc <location> : sets the new location\n\ |
| 30 | +: example : /wttr loc Paris, France\n\ |
| 31 | +* format <format>: Formats of the output, can be an integer (predefined formats from 1 to 4) or a string (custom format).\n\ |
| 32 | +: example : /wttr format %l:+%C+%t+(%f)+%w\n\ |
| 33 | +-- Main format variables --\n\ |
| 34 | +: %l : location\n\ |
| 35 | +: %c / %C / %x: weather condition (icon / textual)\n\ |
| 36 | +: %t / %f : temperature (actual / feels like)\n\ |
| 37 | +: %w : wind\n\ |
| 38 | +-- Predefined formats --\n\ |
| 39 | +: 1 - %c+%t\n\ |
| 40 | +: 2 - %c+%t+%w (with icons)\n\ |
| 41 | +: 3 - %l:+%c+%t\n\ |
| 42 | +: 4 - %l:%c+%t+%w (with icons)\n\ |
| 43 | +: More explanation @ https://github.com/chubin/wttr.in#one-line-output\n\ |
| 44 | +* lang <ISO lang>: Defines the lang to use (EN for english, FR for french, ...). Default is your weechat lang.\n\ |
| 45 | +Think to add the \[wttr\] item to a bar. Example to add it to the status bar:\n\ |
| 46 | + /eval /set weechat.bar.status.items \"\${weechat.bar.status.items},wttr\")" |
29 | 47 |
|
30 | 48 | weechat::register $SCRIPT_NAME {CrazyCat < [email protected]>} $SCRIPT_VERSION GPL3 $SCRIPT_SUMMARY {} {}
|
31 | 49 | weechat::hook_command wttr $SCRIPT_SUMMARY $SCRIPT_ARGS $SCRIPT_ADESC {loc || format || lang} wttr_cmds {}
|
|
0 commit comments