summaryrefslogtreecommitdiff
path: root/doc/en
diff options
context:
space:
mode:
Diffstat (limited to 'doc/en')
-rw-r--r--doc/en/config.xml49
-rw-r--r--doc/en/weechat.en.xml278
-rw-r--r--doc/en/weechat_commands.xml10
3 files changed, 248 insertions, 89 deletions
diff --git a/doc/en/config.xml b/doc/en/config.xml
index 2760a3002..0007ebcf8 100644
--- a/doc/en/config.xml
+++ b/doc/en/config.xml
@@ -41,34 +41,6 @@
<entry>WeeChat slogan (if empty, slogan is not used)</entry>
</row>
<row>
- <entry><option>look_charset_decode_iso</option></entry>
- <entry>string</entry>
- <entry>any string</entry>
- <entry>'ISO-8859-1'</entry>
- <entry>ISO charset for decoding messages from server (used only if locale is UTF-8) (if empty, messages are not converted if locale is UTF-8)</entry>
-</row>
-<row>
- <entry><option>look_charset_decode_utf</option></entry>
- <entry>string</entry>
- <entry>any string</entry>
- <entry>'UTF-8'</entry>
- <entry>UTF charset for decoding messages from server (used only if locale is not UTF-8) (if empty, messages are not converted if locale is not UTF-8)</entry>
-</row>
-<row>
- <entry><option>look_charset_encode</option></entry>
- <entry>string</entry>
- <entry>any string</entry>
- <entry>''</entry>
- <entry>Charset for encoding messages sent to server, examples: UTF-8, ISO-8859-1 (if empty, messages are not converted)</entry>
-</row>
-<row>
- <entry><option>look_charset_internal</option></entry>
- <entry>string</entry>
- <entry>any string</entry>
- <entry>''</entry>
- <entry>Forces internal WeeChat charset (should be empty in most cases, that means detected charset is used)</entry>
-</row>
-<row>
<entry><option>look_one_server_buffer</option></entry>
<entry>boolean</entry>
<entry>'on' or 'off'</entry>
@@ -1237,24 +1209,3 @@
<entry>''</entry>
<entry>Comma separated list of notify levels for channels of this server (format: #channel:1,..), a channel name '*' is reserved for server default notify level</entry>
</row>
-<row>
- <entry><option>server_charset_decode_iso</option></entry>
- <entry>string</entry>
- <entry>any string</entry>
- <entry>''</entry>
- <entry>Comma separated list of charsets for server and channels, to decode ISO (format: server:charset,#channel:charset,..)</entry>
-</row>
-<row>
- <entry><option>server_charset_decode_utf</option></entry>
- <entry>string</entry>
- <entry>any string</entry>
- <entry>''</entry>
- <entry>Comma separated list of charsets for server and channels, to decode UTF (format: server:charset,#channel:charset,..)</entry>
-</row>
-<row>
- <entry><option>server_charset_encode</option></entry>
- <entry>string</entry>
- <entry>any string</entry>
- <entry>''</entry>
- <entry>Comma separated list of charsets for server and channels, to encode messages (format: server:charset,#channel:charset,..)</entry>
-</row>
diff --git a/doc/en/weechat.en.xml b/doc/en/weechat.en.xml
index 18cb123be..5104eceb7 100644
--- a/doc/en/weechat.en.xml
+++ b/doc/en/weechat.en.xml
@@ -509,6 +509,12 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</entry>
</row>
<row>
+ <entry>Ctrl + T</entry>
+ <entry>
+ Transpose chars
+ </entry>
+ </row>
+ <row>
<entry>Ctrl + U</entry>
<entry>
Delete from cursor until beginning of command line
@@ -521,7 +527,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</entry>
</row>
<row>
- <entry>Backspace</entry>
+ <entry>Ctrl + Y</entry>
+ <entry>
+ Paste clipboard content
+ </entry>
+ </row>
+ <row>
+ <entry>Backspace / Ctrl + H</entry>
<entry>
Delete previous char in command line
</entry>
@@ -533,7 +545,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</entry>
</row>
<row>
- <entry>Tab</entry>
+ <entry>Tab / Shift + Tab</entry>
<entry>
Complete command or nick
(Tab again: find next completion)
@@ -546,7 +558,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
</entry>
</row>
<row>
- <entry>Enter</entry>
+ <entry>Enter / Ctrl + J / Ctrl + M</entry>
<entry>
Execute command or send message
</entry>
@@ -1260,6 +1272,129 @@ fi
<section id="secAPIFunctions">
<title>API functions</title>
+ <section id="secAPI_set_charset">
+ <title>set_charset</title>
+
+ <para>
+ Prototype:
+ <command>
+ void set_charset (t_weechat_plugin *plugin, char *charset)
+ </command>
+ </para>
+ <para>
+ Set new plugin charset.
+ </para>
+ <para>
+ Arguments:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <option>plugin</option>: pointer to plugin structure
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>charset</option>: new charset to use
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Example:
+ <screen>plugin->set_charset (plugin, "ISO-8859-1");</screen>
+ </para>
+ </section>
+
+ <section id="secAPI_iconv_to_internal">
+ <title>iconv_to_internal</title>
+
+ <para>
+ Prototype:
+ <command>
+ void iconv_to_internal (t_weechat_plugin *plugin, char *charset,
+ char *string)
+ </command>
+ </para>
+ <para>
+ Convert string to WeeChat internal charset (UTF-8).
+ </para>
+ <para>
+ Arguments:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <option>plugin</option>: pointer to plugin structure
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>charset</option>: charset to convert
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>string</option>: string to convert
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Return value: converted string.
+ </para>
+ <para>
+ Note: result has to be free by a call to "free" after use.
+ </para>
+ <para>
+ Example:
+ <screen>char *str = plugin->iconv_to_internal (plugin, "ISO-8859-1", "iso string: é à");</screen>
+ </para>
+ </section>
+
+ <section id="secAPI_iconv_from_internal">
+ <title>iconv_from_internal</title>
+
+ <para>
+ Prototype:
+ <command>
+ void iconv_from_internal (t_weechat_plugin *plugin, char *charset,
+ char *string)
+ </command>
+ </para>
+ <para>
+ Convert string from internal WeeChat charset (UTF-8) to another.
+ </para>
+ <para>
+ Arguments:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <option>plugin</option>: pointer to plugin structure
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>charset</option>: target charset
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ <option>string</option>: string to convert
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Return value: converted string.
+ </para>
+ <para>
+ Note: result has to be free by a call to "free" after use.
+ </para>
+ <para>
+ Example:
+ <screen>char *str = plugin->iconv_from_internal (plugin, "ISO-8859-1", "utf-8 string: é à");</screen>
+ </para>
+ </section>
+
<section id="secAPI_ascii_strcasecmp">
<title>ascii_strcasecmp</title>
@@ -4670,25 +4805,25 @@ end
<para>
Perl prototype:
<command>
- weechat::register(name, version, end_function, description);
+ weechat::register(name, version, end_function, description, [charset]);
</command>
</para>
<para>
Python prototype:
<command>
- weechat.register(name, version, end_function, description)
+ weechat.register(name, version, end_function, description, [charset])
</command>
</para>
<para>
Ruby prototype:
<command>
- Weechat.register(name, version, end_function, description)
+ Weechat.register(name, version, end_function, description, [charset])
</command>
</para>
<para>
Lua prototype:
<command>
- weechat.register(name, version, end_function, description)
+ weechat.register(name, version, end_function, description, [charset])
</command>
</para>
<para>
@@ -4721,6 +4856,12 @@ end
<option>description</option>: short description of script
</para>
</listitem>
+ <listitem>
+ <para>
+ <option>charset</option>: charset used by script, you should
+ set this if script is not written with UTF-8
+ </para>
+ </listitem>
</itemizedlist>
</para>
<para>
@@ -4730,16 +4871,77 @@ end
Examples:
<screen>
# perl
-weechat::register("test", "1.0", "end_test", "Test script!");
+weechat::register("test", "1.0", "end_test", "Test script!", "ISO-8859-1");
+
+# python
+weechat.register("test", "1.0", "end_test", "Test script!", "ISO-8859-1")
+
+# ruby
+Weechat.register("test", "1.0", "end_test", "Test script!", "ISO-8859-1")
+
+-- lua
+weechat.register("test", "1.0", "end_test", "Test script!", "ISO-8859-1")
+</screen>
+ </para>
+ </section>
+
+ <section id="secScript_set_charset">
+ <title>set_charset</title>
+
+ <para>
+ Perl prototype:
+ <command>
+ weechat::set_charset(charset);
+ </command>
+ </para>
+ <para>
+ Python prototype:
+ <command>
+ weechat.set_charset(charset)
+ </command>
+ </para>
+ <para>
+ Ruby prototype:
+ <command>
+ Weechat.set_charset(charset)
+ </command>
+ </para>
+ <para>
+ Lua prototype:
+ <command>
+ weechat.set_charset(charset)
+ </command>
+ </para>
+ <para>
+ Set new script charset.
+ </para>
+ <para>
+ Arguments:
+ <itemizedlist>
+ <listitem>
+ <para>
+ <option>charset</option>: new script charset
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ Return value: 1 if new charset was set, 0 if an error occured.
+ </para>
+ <para>
+ Examples:
+<screen>
+# perl
+weechat::set_charset("ISO-8859-1");
# python
-weechat.register("test", "1.0", "end_test", "Test script!")
+weechat.set_charset("ISO-8859-1")
# ruby
-Weechat.register("test", "1.0", "end_test", "Test script!")
+Weechat.set_charset("ISO-8859-1")
-- lua
-weechat.register("test", "1.0", "end_test", "Test script!")
+weechat.set_charset("ISO-8859-1")
</screen>
</para>
</section>
@@ -5367,7 +5569,7 @@ end
-- lua
weechat.add_timer_handler(60, "my_timer")
function my_timer()
- weechat.print("this is timer handler)
+ weechat.print("this is timer handler")
return weechat.PLUGIN_RC_OK()
end
</screen>
@@ -5776,27 +5978,43 @@ weechat.remove_keyboard_handler("my_keyboard")
Examples:
<screen>
# perl
-weechat::add_modifier("irc_in", "privmsg", "my_function");
-sub my_function
+weechat::add_modifier("irc_in", "privmsg", "mod_in");
+weechat::add_modifier("irc_out", "privmsg", "mod_out");
+sub mod_in
+{
+ return "$_[1] [modifier IN]";
+}
+sub mod_out
{
- # TODO
+ return "$_[1] [modifier OUT]";
}
# python
-weechat.add_modifier("irc_in", "privmsg", "my_function")
-def my_function(serveur, args):
- # TODO
+weechat.add_modifier("irc_in", "privmsg", "mod_in")
+weechat.add_modifier("irc_out", "privmsg", "mod_out")
+def mod_in(serveur, args):
+ return args + " [modifier IN]"
+def mod_out(serveur, args):
+ return args + " [modifier OUT]"
# ruby
-Weechat.add_modifier("irc_in", "privmsg", "my_function")
-def my_function(server, args)
- # TODO
+Weechat.add_modifier("irc_in", "privmsg", "mod_in")
+Weechat.add_modifier("irc_out", "privmsg", "mod_out")
+def mod_in(server, args)
+ return args + " [modifier IN]"
+end
+def mod_out(server, args)
+ return args + " [modifier OUT]"
end
-- lua
-weechat.add_modifier("irc_in", "privmsg", "my_function")
-function my_function(server, args)
- -- TODO
+weechat.add_modifier("irc_in", "privmsg", "mod_in")
+weechat.add_modifier("irc_out", "privmsg", "mod_out")
+function mod_in(server, args)
+ return args .. " [modifier IN]"
+end
+function mod_out(server, args)
+ return args .. " [modifier OUT]"
end
</screen>
</para>
@@ -5859,16 +6077,16 @@ end
Examples:
<screen>
# perl
-weechat::remove_modifier("irc_in", "privmsg", "my_function");
+weechat::remove_modifier("irc_in", "privmsg", "mod_in");
# python
-weechat.remove_modifier("irc_in", "privmsg", "my_function")
+weechat.remove_modifier("irc_in", "privmsg", "mod_in")
# ruby
-Weechat.remove_modifier("irc_in", "privmsg", "my_function")
+Weechat.remove_modifier("irc_in", "privmsg", "mod_in")
-- lua
-weechat.remove_modifier("irc_in", "privmsg", "my_function")
+weechat.remove_modifier("irc_in", "privmsg", "mod_in")
</screen>
</para>
</section>
@@ -7162,8 +7380,8 @@ end
</listitem>
<listitem>
<para>
- <emphasis>Kolter</emphasis>
- <email>kolter AT free.fr</email> -
+ <emphasis>kolter (Emmanuel Bouthenot)</emphasis>
+ <email>kolter AT openics.org</email> -
developer
</para>
</listitem>
diff --git a/doc/en/weechat_commands.xml b/doc/en/weechat_commands.xml
index 14306d528..8affaf7fb 100644
--- a/doc/en/weechat_commands.xml
+++ b/doc/en/weechat_commands.xml
@@ -40,16 +40,6 @@ command: command to execute (a '/' is automatically added if not found at beginn
</programlisting>
-<command>charset [(decode_iso | decode_utf | encode) charset]</command>
-<programlisting>
-change charset for server or channel
-
-decode_iso: charset used for decoding ISO
-decode_utf: charset used for decoding UTF
- encode: charset used for encoding messages
- charset: charset to use (for example: ISO-8859-15, UTF-8,..)
-
-</programlisting>
<command>clear [-all]</command>
<programlisting>
clear window(s)