Skip to content

Commit d7dffae

Browse files
crazycatdevsflashcode
authored andcommitted
wttr.tcl 1.1: improve help
1 parent 7475052 commit d7dffae

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

tcl/wttr.tcl

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,32 @@
1818
#
1919
# ---------------------------------------------
2020
# History
21+
# 2023-06-15 : Improved help
2122
# 2023-06-14 : Initial release
2223

23-
set SCRIPT_VERSION 1.0
24+
set SCRIPT_VERSION 1.1
2425
set SCRIPT_NAME wttr
2526
set SCRIPT_SUMMARY "Adds an item showing weather"
2627

2728
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\")"
2947

3048
weechat::register $SCRIPT_NAME {CrazyCat <[email protected]>} $SCRIPT_VERSION GPL3 $SCRIPT_SUMMARY {} {}
3149
weechat::hook_command wttr $SCRIPT_SUMMARY $SCRIPT_ARGS $SCRIPT_ADESC {loc || format || lang} wttr_cmds {}

0 commit comments

Comments
 (0)