summaryrefslogtreecommitdiff
path: root/doc/en
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-03-16 16:06:16 +0100
committerSebastien Helleu <flashcode@flashtux.org>2013-03-16 16:06:16 +0100
commite1e3109da3ecf6b81cb6c725f500c8c6e93192f4 (patch)
tree180be7402c5a688d12f890360582c25b1efe9273 /doc/en
parent3fb123510ab764b21479af1372582ba2d00d8e7e (diff)
downloadweechat-e1e3109da3ecf6b81cb6c725f500c8c6e93192f4.zip
doc: add link to weechat.org/info in scripting guide (URL transfer) and plugin API reference (function hook_process)
Diffstat (limited to 'doc/en')
-rw-r--r--doc/en/weechat_plugin_api.en.txt4
-rw-r--r--doc/en/weechat_scripting.en.txt19
2 files changed, 15 insertions, 8 deletions
diff --git a/doc/en/weechat_plugin_api.en.txt b/doc/en/weechat_plugin_api.en.txt
index bba3f6147..f51d4cd10 100644
--- a/doc/en/weechat_plugin_api.en.txt
+++ b/doc/en/weechat_plugin_api.en.txt
@@ -6987,6 +6987,10 @@ The command can be an URL with format: "url:http://www.example.com", to download
content of URL (_new in version 0.3.7_). Options are possible for URL with
function <<_weechat_hook_process_hashtable,weechat_hook_process_hashtable>>.
+[TIP]
+If you want to retrieve infos about WeeChat (like current stable version,
+latest git commit, ...), you can use URLs on page http://weechat.org/info
+
[NOTE]
Buffer size for sending data to callback is 64KB (there are 2 buffers: one for
stdout and one for stderr).
diff --git a/doc/en/weechat_scripting.en.txt b/doc/en/weechat_scripting.en.txt
index dc8f3e225..e7d4dc04f 100644
--- a/doc/en/weechat_scripting.en.txt
+++ b/doc/en/weechat_scripting.en.txt
@@ -715,21 +715,24 @@ in callback (standard output of process):
[source,python]
----------------------------------------
-# Display versions of Linux kernels.
-kernel_txt = ""
+# Display current stable version of WeeChat.
+weechat_version = ""
-def kernel_process_cb(data, command, rc, out, err):
- global kernel_txt
+def weechat_process_cb(data, command, rc, out, err):
+ global weechat_version
if out != "":
- kernel_txt += out
+ weechat_version += out
if int(rc) >= 0:
- weechat.prnt("", kernel_txt)
+ weechat.prnt("", "Current WeeChat stable is: %s" % weechat_version)
return weechat.WEECHAT_RC_OK
-weechat.hook_process("url:http://www.kernel.org/kdist/finger_banner",
- 30 * 1000, "kernel_process_cb", "")
+weechat.hook_process("url:http://weechat.org/info/stable/",
+ 30 * 1000, "weechat_process_cb", "")
----------------------------------------
+[TIP]
+All infos available about WeeChat are on page http://weechat.org/info
+
Example of URL transfer with an option: download latest WeeChat development
package in file '/tmp/weechat-devel.tar.gz':