1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-27 13:26:38 +02:00

Update doc

This commit is contained in:
Sebastien Helleu
2008-05-26 14:27:35 +02:00
parent fb1b3e7cff
commit 4fa856c773
31 changed files with 965 additions and 8993 deletions
+10
View File
@@ -100,7 +100,9 @@ IF(BUILD_HTML OR BUILD_PDF)
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/usage.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugins.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_api.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_irc.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_charset.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_fifo.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_scripts.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/authors.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/config.xml" "${CMAKE_CURRENT_BINARY_DIR}/html/${dlang}-build"
@@ -119,6 +121,9 @@ IF(BUILD_HTML OR BUILD_PDF)
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/usage.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugins.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_api.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_irc.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_charset.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_fifo.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_scripts.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/authors.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/config.xml
@@ -150,7 +155,9 @@ IF(BUILD_HTML OR BUILD_PDF)
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/usage.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugins.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_api.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_irc.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_charset.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_fifo.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_scripts.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/authors.${dlang}.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
COMMAND ${COPY} ARGS "${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/config.xml" "${CMAKE_CURRENT_BINARY_DIR}/pdf/${dlang}-build"
@@ -166,6 +173,9 @@ IF(BUILD_HTML OR BUILD_PDF)
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/usage.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugins.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_api.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_irc.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_charset.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_fifo.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/plugin_scripts.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/authors.${dlang}.xml
${CMAKE_CURRENT_SOURCE_DIR}/${dlang}/config.xml
+9 -4
View File
@@ -16,11 +16,16 @@
LANGCODE = de
BOOK = weechat.$(LANGCODE)
BOOK_INCLUDE = intro.$(LANGCODE).xml install.$(LANGCODE).xml \
usage.$(LANGCODE).xml plugins.$(LANGCODE).xml \
plugin_api.$(LANGCODE).xml plugin_charset.$(LANGCODE).xml \
BOOK_INCLUDE = intro.$(LANGCODE).xml \
install.$(LANGCODE).xml \
usage.$(LANGCODE).xml \
plugins.$(LANGCODE).xml \
plugin_api.$(LANGCODE).xml \
plugin_irc.$(LANGCODE).xml \
plugin_charset.$(LANGCODE).xml \
plugin_fifo.$(LANGCODE).xml \
plugin_scripts.$(LANGCODE).xml \
weechat_commands.xml irc_commands.xml key_functions.xml \
weechat_commands.xml \
config.xml
QUICKSTART = weechat_quickstart.$(LANGCODE).txt
+18 -18
View File
@@ -73,6 +73,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Tschechische Übersetzung, Patches
</para>
</listitem>
<listitem>
<para>
<emphasis>Pavel Shevchuk</emphasis> -
Russisch Übersetzung
</para>
</listitem>
<listitem>
<para>
<emphasis>Frank Zacharias</emphasis> -
Deutsche Übersetzung
</para>
</listitem>
<listitem>
<para>
<emphasis>voroskoi</emphasis> -
Ungarische Übersetzung
</para>
</listitem>
<listitem>
<para>
<emphasis>Rudolf Polzer</emphasis> -
@@ -103,24 +121,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Patches
</para>
</listitem>
<listitem>
<para>
<emphasis>voroskoi</emphasis> -
Ungarische Übersetzung
</para>
</listitem>
<listitem>
<para>
<emphasis>Frank Zacharias</emphasis> -
Deutsche Übersetzung
</para>
</listitem>
<listitem>
<para>
<emphasis>Pavel Shevchuk</emphasis> -
Russisch Übersetzung
</para>
</listitem>
</itemizedlist>
</para>
+35 -9
View File
@@ -44,7 +44,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<para>
Mandriva/RedHat (oder jede RPM-kompatible Distribution):
<userinput>
rpm -i /chemin/weechat-x.y.z-1.i386.rpm
rpm -i /path/to/weechat-x.y.z-1.i386.rpm
</userinput>
</para>
</listitem>
@@ -63,19 +63,44 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<section id="secSourcePackage">
<title>Quellcode-Pakete</title>
<!-- TRANSLATION NEEDED -->
<section id="secCompileWithAutotools">
<title>Compile with Autotools</title>
<para>
Alles was sie tun müssen, ist in einer Konsole oder einem Terminal
aufzurufen:
<para>
In a console or a terminal:
<screen><prompt>$ </prompt><userinput>./configure</userinput>
<prompt>$ </prompt><userinput>make</userinput></screen>
</para>
<para>
Dann root werden und WeeChat installieren:
</para>
<para>
Dann root werden und WeeChat installieren:
<screen><prompt>$ </prompt><userinput>su</userinput>
(root-Passwort eingeben)
<prompt># </prompt><userinput>make install</userinput></screen>
</para>
</para>
</section>
<!-- TRANSLATION NEEDED -->
<section id="secCompileWithCmake">
<title>Compile with Cmake</title>
<para>
In a console or a terminal:
<screen><prompt>$ </prompt><userinput>mkdir build</userinput>
<prompt>$ </prompt><userinput>cd build</userinput>
<prompt>$ </prompt><userinput>cmake ..</userinput>
<prompt>$ </prompt><userinput>make</userinput></screen>
</para>
<para>
Dann root werden und WeeChat installieren:
<screen><prompt>$ </prompt><userinput>su</userinput>
(root-Passwort eingeben)
<prompt># </prompt><userinput>make install</userinput></screen>
</para>
</section>
</section>
@@ -94,7 +119,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</para>
<para>
Ausführen des folgenden Skripts:
<!-- TRANSLATION NEEDED -->
If you're using Autotools (and not cmake), Ausführen des folgenden Skripts:
<userinput>./autogen.sh</userinput>
</para>
+7 -4
View File
@@ -47,8 +47,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</listitem>
<listitem>
<para>
viele unterschiedliche User-Interfaces: Curses, wxWidgets, Gtk
und Qt
<!-- TRANSLATION NEEDED -->
viele unterschiedliche User-Interfaces: Curses (wxWidgets, Gtk
und Qt under development)
</para>
</listitem>
<listitem>
@@ -93,7 +94,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secPreRequis">
<section id="secPreRequisites">
<title>Vorraussetzungen</title>
<para>
@@ -101,7 +102,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<itemizedlist>
<listitem>
<para>
ein laufendes GNU/Linux (Compiler für Quellcode-Pakete)
<!-- TRANSLATION NEEDED -->
ein laufendes GNU/Linux (Compiler für Quellcode-Pakete) or
compatible OS (see above)
</para>
</listitem>
<listitem>
+13
View File
@@ -21,6 +21,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<chapter id="chapPluginAPI">
<title>Plugin API</title>
<para>
Dieses Kapitel beschreibt das Plugin-Interface (API).
--- will be completed soon! ---
</para>
</chapter>
<!--
<section id="secAPIFunctions">
<title>API Funktionen</title>
@@ -3599,3 +3610,5 @@ if (buffer_line)
</section>
</section>
-->
+100
View File
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
WeeChat documentation (german version)
Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
This manual is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This manual is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<section id="secFIFOpipe">
<title>Remote-Schnittstelle (FIFO pipe)</title>
<para>
<!-- TRANSLATION NEEDED -->
You can remote control WeeChat, by sending commands or text to a
FIFO pipe (if option "plugins.var.fifo.fifo" is enabled, it is by default).
</para>
<para>
Diese pipe liegt in "<literal>~/.weechat/</literal>" und hat den Namen
"weechat_fifo_xxxxx" (das xxxxx ist die Prozess-ID (PID) eines
laufenden WeeChat).
</para>
<para>
<!-- TRANSLATION NEEDED -->
Syntax for the FIFO pipe commands/text is one of following:
<screen>
category,name *text or command here
name *text or command here
*text or command here
</screen>
</para>
<para>
Einige Beispiele:
<itemizedlist>
<listitem>
<para>
Ändern des Nicks auf freenode in "mynick|out" :
<screen><prompt>$ </prompt><userinput>echo 'freenode,freenode */nick mynick|out' &gt;~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
<listitem>
<para>
Senden einer Nachricht an #weechat:
<screen><prompt>$ </prompt><userinput>echo 'freenode,#weechat *hello everybody!' >~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
<listitem>
<para>
Senden einer Nachricht an den gegenwärtigen Channel (Puffer, der
in WeeChat angezeigt wird):
<screen><prompt>$ </prompt><userinput>echo '*hello!' >~/.weechat/weechat_fifo_12345</userinput></screen>
<emphasis>Warnung:</emphasis> Das ist gefährlich und sie sollten
das nicht tun, ausgenommen sie wissen was sie tun!
</para>
</listitem>
<listitem>
<para>
Sende zwei Kommandos um (alle) Perl-Skripte abzuschalten/neu zu
laden (getrennt durch ein "\n"):
<screen><prompt>$ </prompt><userinput>echo -e "weechat,weechat */perl unload\nweechat,weechat */perl autoload" >~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
</itemizedlist>
</para>
<para>
Sie können ein Skript schreiben, um ein Kommando an alle laufenden WeeChat-Instanzen zu senden,
zum Beispiel:
<screen>
#!/bin/sh
if [ $# -eq 1 ]; then
for fifo in ~/.weechat/weechat_fifo_*
do
echo -e "$1" >$fifo
done
fi
</screen>
Wenn das Skript "auto_weechat_command" heisst, können sie es
folgendermassen aufrufen:
<screen><prompt>$ </prompt><userinput>./auto_weechat_command "freenode,#weechat *hello"</userinput></screen>
</para>
</section>
+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
WeeChat documentation (english version)
Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
This manual is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This manual is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<section id="secPluginIrc">
<title>IRC plugin</title>
</section>
+92 -45
View File
@@ -25,8 +25,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<title>Plugins</title>
<para>
Dieses Kapitel beschreibt das Plugin-Interface (API) in WeeChat und die
Standard-Skriptplugins (Perl, Python, Ruby, Lua), die zu WeeChat gehören.
<!-- TRANSLATION NEEDED -->
This chapter describes WeeChat plugin API and default plugins provided with
WeeChat.
</para>
<section id="secPluginsInWeeChat">
@@ -64,28 +65,41 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</para>
<para>
Das Plugin muss einige Variablen und Funktionen besitzen
(nötig, sonst kann das Plugin nicht geladen werden):
<!-- TRANSLATION NEEDED -->
The plugin must use some mandatory macros (to define some variables)
and some functions (without them the plugin can't load):
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
<row>
<entry>Variable</entry>
<entry>Beschreibung</entry>
<entry>Macro</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>char plugin_name[]</literal></entry>
<entry>Plugin Name</entry>
<entry><literal>WEECHAT_PLUGIN_NAME</literal></entry>
<entry>plugin name</entry>
</row>
<row>
<entry><literal>char plugin_version[]</literal></entry>
<entry>Plugin Version</entry>
<entry><literal>WEECHAT_PLUGIN_DESCRIPTION</literal></entry>
<entry>short description of plugin</entry>
</row>
<row>
<entry><literal>char plugin_description[]</literal></entry>
<entry>kurze Beschreibung des Plugins</entry>
<entry><literal>WEECHAT_PLUGIN_VERSION</literal></entry>
<entry>plugin version</entry>
</row>
<row>
<entry><literal>WEECHAT_PLUGIN_WEECHAT_VERSION</literal></entry>
<entry>
target WeeChat version where plugin will run (warning: plugin
will not run on any other WeeChat version!)
</entry>
</row>
<row>
<entry><literal>WEECHAT_PLUGIN_LICENSE</literal></entry>
<entry>plugin license</entry>
</row>
</tbody>
</tgroup>
@@ -101,15 +115,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</thead>
<tbody>
<row>
<entry><literal>int weechat_plugin_init (t_weechat_plugin *plugin)</literal></entry>
<entry><literal>int weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])</literal></entry>
<entry>
Die Funktion wird aufgerufen, wenn das Plugin geladen wird.
Sie muss bei Erfolg PLUGIN_RC_OK, bei Fehlschlag PLUGIN_RC_KO
zurückgeben. (Bei einem Fehler wird das Plugin nicht geladen)
<!-- TRANSLATION NEEDED -->
function called when plugin is loaded, must return
WEECHAT_RC_OK if successful, WEECHAT_RC_ERROR if error
(if error, plugin will NOT be loaded), argc/argv are arguments
for plugin (given on command line by user)
</entry>
</row>
<row>
<entry><literal>void weechat_plugin_end (t_weechat_plugin *plugin)</literal></entry>
<entry><literal>int weechat_plugin_end (struct t_weechat_plugin *plugin)</literal></entry>
<entry>Funktion wird beim Abschalten aufgerufen</entry>
</row>
</tbody>
@@ -117,13 +133,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</informaltable>
</para>
&plugin_api.de.xml;
<section id="secCompilePlugin">
<title>Übersetzen eines Plugins</title>
<para>
Das Übersetzen braucht keine WeeChat-Quellen, aber die Datei "<literal>weechat-plugin.h</literal>".
Das Übersetzen braucht keine WeeChat-Quellen, aber die Datei
"<literal>weechat-plugin.h</literal>".
</para>
<para>
@@ -159,56 +174,88 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<title>Plugin Beispiel</title>
<para>
Vollständiges Beispiel eines Plugins, welches das Kommando /double
implementiert, dass seine Argumente im gegenwärtigen Channel doppelt
ausgibt (ok, das ist weniger nützlich, aber auch nur ein Beispiel!):
<!-- TRANSLATION NEEDED -->
Full example of plugin, which adds a /double command, which displays
two times arguments on current buffer, or execute two times a command
(ok that's not very useful, but that's just an example!):
<screen>
#include &lt;stdlib.h&gt;
#include "weechat-plugin.h"
char plugin_name[] = "Double";
char plugin_version[] = "0.1";
char plugin_description[] = "Test plugin for WeeChat";
WEECHAT_PLUGIN_NAME("double");
WEECHAT_PLUGIN_DESCRIPTION("Test plugin for WeeChat");
WEECHAT_PLUGIN_AUTHOR("FlashCode &lt;flashcode@flashtux.org&gt;");
WEECHAT_PLUGIN_VERSION("0.1");
WEECHAT_PLUGIN_WEECHAT_VERSION("0.2.7");
WEECHAT_PLUGIN_LICENSE("GPL3");
struct t_weechat_plugin *weechat_plugin = NULL;
/* "/double" command manager */
int double_cmd (t_weechat_plugin *plugin, int argc, char **argv,
char *handler_args, void *handler_pointer)
int
double_cmd (void *data, struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
if (argv[2] &amp;&amp; (argv[2][0] != '/'))
/* make C compiler happy */
(void) argv;
if (argc &gt; 1)
{
plugin->exec_command (plugin, NULL, NULL, argv[2]);
plugin->exec_command (plugin, NULL, NULL, argv[2]);
weechat_command (NULL, argv_eol[1]);
weechat_command (NULL, argv_eol[1]);
}
return PLUGIN_RC_OK;
return WEECHAT_RC_OK;
}
int weechat_plugin_init (t_weechat_plugin *plugin)
int
weechat_plugin_init (struct t_weechat_plugin *plugin,
int argc, char *argv[])
{
plugin->cmd_handler_add (plugin, "double",
"Display two times a message",
"msg",
"msg: message to display two times",
NULL,
&amp;double_cmd,
NULL, NULL);
return PLUGIN_RC_OK;
weechat_plugin = plugin;
weechat_hook_command ("double",
"Display two times a message",
"msg",
"msg: message to display two times",
NULL,
&amp;double_cmd, NULL);
return WEECHAT_RC_OK;
}
void weechat_plugin_end (t_weechat_plugin *plugin)
int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
/* nothing done here */
(void) plugin;
return WEECHAT_RC_OK;
}
</screen>
</para>
</section>
<!-- &plugin_api.de.xml; -->
</section>
&plugin_charset.de.xml;
&plugin_scripts.de.xml;
<!-- TRANSLATION NEEDED -->
<section id="secDefaultPlugins">
<title>Default plugins</title>
&plugin_irc.de.xml;
<!-- &plugin_charset.de.xml; -->
&plugin_fifo.de.xml;
<!-- &plugin_scripts.de.xml; -->
</section>
</chapter>
+22 -188
View File
@@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
und die FIFO für die remote-Bedienung.
</para>
<section id="secRunningWeeChat">
<section id="secRunWeeChat">
<title>Starten von WeeChat</title>
<para>
@@ -50,13 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Schaltet das auto-connect ab
</entry>
</row>
<row>
<entry><literal>-c, --config</literal></entry>
<entry>
Zeigt eine Hilfe zu den Konfigurationsmöglichkeiten (Liste
der Optionen)
</entry>
</row>
<row>
<entry><literal>-d, --dir &lt;path&gt;</literal></entry>
<entry>
@@ -68,25 +61,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
exitiert.
</entry>
</row>
<row>
<entry><literal>-f, --key-functions</literal></entry>
<entry>
Zeigt die intern verwendeten Funktionen von WeeChat für
bestimmte Tastenkombinationen an
</entry>
</row>
<row>
<entry><literal>-h, --help</literal></entry>
<entry>
Zeigt eine zusammenfassende Hilfe an.
</entry>
</row>
<row>
<entry><literal>-i, --irc-commands</literal></entry>
<entry>
Zeigt die IRC-Kommandos an
</entry>
</row>
<row>
<entry><literal>-k, --keys</literal></entry>
<entry>
@@ -111,12 +91,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Zeigt die Programmversion an
</entry>
</row>
<row>
<entry><literal>-w, --weechat-commands</literal></entry>
<entry>
Zeigt die Weechat-eigenen Kommandos an
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
@@ -161,13 +135,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<para>
Wenn Sie Weechat zum ersten Mal starten, wird eine Konfigurationsdatei
erzeugt, deren Optionen besitzen Standardwerte. Diese Datei ist:
"<literal>~/.weechat/weechat.rc</literal>"
"<literal>~/.weechat/weechat.conf</literal>"
</para>
<para>
Sie können diese Datei entsprechend ihren Bedürfnissen editieren,
um Weechat anzupassen (NUR wenn Weechat nicht läuft) oder Parameter
zu beeinflussen mit
um Weechat anzupassen oder Parameter zu beeinflussen mit
"<literal>/set</literal>" Kommando in WeeChat
(siehe <xref linkend="secWeeChatCommands" />)
</para>
@@ -448,12 +421,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Entferne den letzten Hinweis in der Infobar
</entry>
</row>
<row>
<entry>Alt + J dann Alt + D</entry>
<entry>
Zeige den DCC-Puffer
</entry>
</row>
<row>
<entry>Alt + J dann Alt + L</entry>
<entry>
@@ -467,25 +434,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Switch to buffer previously displayed
</entry>
</row>
<row>
<entry>Alt + J dann Alt + R</entry>
<entry>
Schalte in den reinen IRC-Daten Puffer
</entry>
</row>
<row>
<entry>Alt + J dann Alt + S</entry>
<entry>
Schalte in den Server-Puffer
</entry>
</row>
<row>
<entry>Alt + J dann Alt + X</entry>
<entry>
Schalte in den ersten Channel des nächsten Servers
(oder in den Server-Puffer wenn keine Channel offen ist)
</entry>
</row>
<row>
<entry>Alt + Zahl (0-9)</entry>
<entry>
@@ -553,38 +501,37 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<title>Kommandozeile</title>
<para>
Die WeeChat Kommandozeile (am Ende des Fensters) lässt sie Nachrichten
an einen Channel senden oder WeeChat- bzw. IRC-Kommandos ausführen
(siehe <xref linkend="secWeeChatIRCCommands" />).
<!-- TRANSLATION NEEDED -->
WeeChat command line (at the bottom of window) lets you execute commands
or send text to buffer.
</para>
<para>
Kommandos beginnen mit einem "/", gefolgt vom Namen des Kommandos.
Um zum Beispiel einen privaten Chat mit "<literal>toto</literal>" zu
beginnen: <screen><userinput>/query toto</userinput></screen>
<!-- TRANSLATION NEEDED -->
For example, to see list of all options:
<screen><userinput>/set</userinput></screen>
</para>
<para>
Nachrichten an einen Channel sind jeder Text, der nicht mit einem "/"
Nachrichten an einen Puffer sind jeder Text, der nicht mit einem "/"
begint. Um zum Beispiel den Text "<literal>hello</literal>" an den
gegenwärtigen Channel zu senden:
gegenwärtigen Puffer zu senden:
<screen><userinput>hello</userinput></screen>
</para>
<para>
Dennoch ist es möglich, eine Nachricht auch mit einem "/" zu beginnen,
einfach ein weiteres "/" voranstellen. Um zum Beispiel den Text
"<literal>/query toto</literal>" an den gegenwärtigen Channel zu
"<literal>/set</literal>" an den gegenwärtigen Puffer zu
senden:
<screen><userinput>//query toto</userinput></screen>
<screen><userinput>//set</userinput></screen>
</para>
<para>
Wenn die Option IRC-Farben ("<literal>irc_colors_send</literal>")
senden angeschaltet ist, können sie Farbcodierung und Attribute
wiefolgt verwenden
<!-- TRANSLATION NEEDED -->
(press Ctrl-C then following letter, with optional value):
For some plugins like IRC, you can use color codes and attributes, as
follow (press Ctrl-C then following letter, with optional value):
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
@@ -729,53 +676,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secWeeChatIRCCommands">
<title>WeeChat / IRC Kommandos</title>
<section id="secWeeChatCommands">
<title>WeeChat Kommandos</title>
<para>
Dieses Kapitel listet alle WeeChat- und IRC-Kommandos auf.
Dieses Kapitel listet alle WeeChat-Kommandos auf.
</para>
<section id="secWeeChatCommands">
<title>WeeChat Kommandos</title>
<para>
&weechat_commands.xml;
</para>
</section>
<section id="secKeyFunctions">
<title>Funktionen</title>
<para>
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
<row>
<entry>Funktion</entry>
<entry>Beschreibung</entry>
</row>
</thead>
<tbody>
&key_functions.xml;
</tbody>
</tgroup>
</informaltable>
</para>
</section>
<section id="secIRCCommands">
<title>IRC Kommandos</title>
<para>
&irc_commands.xml;
</para>
</section>
<para>
<!-- &weechat_commands.xml; -->
</para>
</section>
@@ -797,7 +707,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</thead>
<tbody>
&config.xml;
<!-- &config.xml; -->
</tbody>
</tgroup>
@@ -882,80 +792,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secFIFOpipe">
<title>Remote-Schnittstelle (FIFO pipe)</title>
<para>
Sie können WeeChat auch extern steuern, indem sie Kommandos oder Text
an eine sogen. pipe übergeben (sie müssen die Option "irc_fifo_pipe"
anschalten, die normalerweise abgeschaltet ist).
</para>
<para>
Diese pipe liegt in "<literal>~/.weechat/</literal>" und hat den Namen
"weechat_fifo_xxxxx" (das xxxxx ist die Prozess-ID (PID) eines
laufenden WeeChat). Wenn mehrere Instanzen von WeeChat laufen, sind
mehrere pipes vorhanden, eine für jede Instanz.
</para>
<para>
Der Syntax für ein pipe-Kommando ist:
<screen>server,channel *Text oder Kommando</screen>
wobei Server und Channel optional sind, aber wenn der Channel
angegeben ist, muss der Server auch angegeben werden.
</para>
<para>
Einige Beispiele:
<itemizedlist>
<listitem>
<para>
Ändern des Nicks auf freenode in "mynick|out" :
<screen><prompt>$ </prompt><userinput>echo 'freenode */nick mynick|out' &gt;~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
<listitem>
<para>
Senden einer Nachricht an #weechat:
<screen><prompt>$ </prompt><userinput>echo 'freenode,#weechat *hello everybody!' >~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
<listitem>
<para>
Senden einer Nachricht an den gegenwärtigen Channel (Puffer, der
in WeeChat angezeigt wird):
<screen><prompt>$ </prompt><userinput>echo '*hello!' >~/.weechat/weechat_fifo_12345</userinput></screen>
<emphasis>Warnung:</emphasis> Das ist gefährlich und sie sollten
das nicht tun, ausgenommen sie wissen was sie tun!
</para>
</listitem>
<listitem>
<para>
Sende zwei Kommandos um (alle) Perl-Skripte abzuschalten/neu zu
laden (getrennt durch ein "\n"):
<screen><prompt>$ </prompt><userinput>echo -e "freenode */perl unload\nfreenode */perl autoload" >~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
</itemizedlist>
</para>
<para>
Sie können ein Skript schreiben, um ein Kommando an alle laufenden WeeChat-Instanzen zu senden,
zum Beispiel:
<screen>
#!/bin/sh
if [ $# -eq 1 ]; then
for fifo in ~/.weechat/weechat_fifo_*
do
echo -e "$1" >$fifo
done
fi
</screen>
Wenn das Skript "auto_weechat_command" heisst, können sie es
folgendermassen aufrufen:
<screen><prompt>$ </prompt><userinput>./auto_weechat_command "freenode,#weechat *hello"</userinput></screen>
</para>
</section>
</chapter>
+7 -8188
View File
File diff suppressed because it is too large Load Diff
+9 -4
View File
@@ -16,11 +16,16 @@
LANGCODE = en
BOOK = weechat.$(LANGCODE)
BOOK_INCLUDE = intro.$(LANGCODE).xml install.$(LANGCODE).xml \
usage.$(LANGCODE).xml plugins.$(LANGCODE).xml \
plugin_api.$(LANGCODE).xml plugin_charset.$(LANGCODE).xml \
BOOK_INCLUDE = intro.$(LANGCODE).xml \
install.$(LANGCODE).xml \
usage.$(LANGCODE).xml \
plugins.$(LANGCODE).xml \
plugin_api.$(LANGCODE).xml \
plugin_irc.$(LANGCODE).xml \
plugin_charset.$(LANGCODE).xml \
plugin_fifo.$(LANGCODE).xml \
plugin_scripts.$(LANGCODE).xml \
weechat_commands.xml irc_commands.xml key_functions.xml \
weechat_commands.xml \
config.xml
QUICKSTART = weechat_quickstart.$(LANGCODE).txt
+18 -18
View File
@@ -73,6 +73,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
czech translation, patches
</para>
</listitem>
<listitem>
<para>
<emphasis>Pavel Shevchuk</emphasis> -
russian translation
</para>
</listitem>
<listitem>
<para>
<emphasis>Frank Zacharias</emphasis> -
german translation
</para>
</listitem>
<listitem>
<para>
<emphasis>voroskoi</emphasis> -
hungarian translation
</para>
</listitem>
<listitem>
<para>
<emphasis>Rudolf Polzer</emphasis> -
@@ -103,24 +121,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
patches
</para>
</listitem>
<listitem>
<para>
<emphasis>voroskoi</emphasis> -
hungarian translation
</para>
</listitem>
<listitem>
<para>
<emphasis>Frank Zacharias</emphasis> -
german translation
</para>
</listitem>
<listitem>
<para>
<emphasis>Pavel Shevchuk</emphasis> -
russian translation
</para>
</listitem>
</itemizedlist>
</para>
+35 -7
View File
@@ -44,7 +44,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<para>
Mandriva/RedHat (or any RPM compatible distribution):
<userinput>
rpm -i /chemin/weechat-x.y.z-1.i386.rpm
rpm -i /path/to/weechat-x.y.z-1.i386.rpm
</userinput>
</para>
</listitem>
@@ -66,16 +66,44 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<title>Source package</title>
<para>
All you have to do is to run in a console or a terminal:
WeeChat can be compiled with autotools or cmake.
</para>
<section id="secCompileWithAutotools">
<title>Compile with Autotools</title>
<para>
In a console or a terminal:
<screen><prompt>$ </prompt><userinput>./configure</userinput>
<prompt>$ </prompt><userinput>make</userinput></screen>
</para>
<para>
Then get root privileges and install WeeChat:
</para>
<para>
Then get root privileges and install WeeChat:
<screen><prompt>$ </prompt><userinput>su</userinput>
(enter root password)
<prompt># </prompt><userinput>make install</userinput></screen>
</para>
</para>
</section>
<section id="secCompileWithCmake">
<title>Compile with Cmake</title>
<para>
In a console or a terminal:
<screen><prompt>$ </prompt><userinput>mkdir build</userinput>
<prompt>$ </prompt><userinput>cd build</userinput>
<prompt>$ </prompt><userinput>cmake ..</userinput>
<prompt>$ </prompt><userinput>make</userinput></screen>
</para>
<para>
Then get root privileges and install WeeChat:
<screen><prompt>$ </prompt><userinput>su</userinput>
(enter root password)
<prompt># </prompt><userinput>make install</userinput></screen>
</para>
</section>
</section>
@@ -93,7 +121,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</para>
<para>
Execute this script:
If you're using Autotools (and not cmake), execute this script:
<userinput>./autogen.sh</userinput>
</para>
+3 -3
View File
@@ -46,7 +46,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</listitem>
<listitem>
<para>
many GUI: Curses, wxWidgets, Gtk and Qt
many GUI: Curses (wxWidgets, Gtk and Qt under development)
</para>
</listitem>
<listitem>
@@ -91,7 +91,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secPreRequis">
<section id="secPreRequisites">
<title>Pre-requisites</title>
<para>
@@ -100,7 +100,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<listitem>
<para>
a running GNU/Linux system (with compiler tools for source
package)
package), or compatible OS (see above)
</para>
</listitem>
<listitem>
+9
View File
@@ -21,6 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<chapter id="chapPluginAPI">
<title>Plugin API</title>
<para>
This chapter describes WeeChat plugins interface (API).
--- will be completed soon! ---
</para>
</chapter>
<section id="secAPIFunctions">
<title>API functions</title>
+96
View File
@@ -0,0 +1,96 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
WeeChat documentation (english version)
Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
This manual is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This manual is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<section id="secPluginFifo">
<title>FIFO plugin</title>
<para>
You can remote control WeeChat, by sending commands or text to a
FIFO pipe (if option "plugins.var.fifo.fifo" is enabled, it is by default).
</para>
<para>
The FIFO pipe is located in "<literal>~/.weechat/</literal>" and is
called "weechat_fifo_xxxxx" (where xxxxx is the process ID (PID) of
running WeeChat).
</para>
<para>
Syntax for the FIFO pipe commands/text is one of following:
<screen>
category,name *text or command here
name *text or command here
*text or command here
</screen>
</para>
<para>
Some examples:
<itemizedlist>
<listitem>
<para>
nick change on freenode to "mynick|out" :
<screen><prompt>$ </prompt><userinput>echo 'freenode,freenode */nick mynick|out' &gt;~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
<listitem>
<para>
display text on #weechat channel:
<screen><prompt>$ </prompt><userinput>echo 'freenode,#weechat *hello everybody!' >~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
<listitem>
<para>
display text on current channel (buffer displayed by WeeChat):
<screen><prompt>$ </prompt><userinput>echo '*hello!' >~/.weechat/weechat_fifo_12345</userinput></screen>
<emphasis>Warning:</emphasis> this is dangerous and you should
not do that except if you know what you do!
</para>
</listitem>
<listitem>
<para>
send two commands to unload/reload Perl scripts (you have to
separate them with "\n"):
<screen><prompt>$ </prompt><userinput>echo -e " weechat,weechat */perl unload\nweechat,weechat */perl autoload" >~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
</itemizedlist>
</para>
<para>
You can write a script to send command to all running WeeChat at same
time, for example:
<screen>
#!/bin/sh
if [ $# -eq 1 ]; then
for fifo in ~/.weechat/weechat_fifo_*
do
echo -e "$1" >$fifo
done
fi
</screen>
If the script is called "auto_weechat_command", you can run it with:
<screen><prompt>$ </prompt><userinput>./auto_weechat_command "freenode,#weechat *hello"</userinput></screen>
</para>
</section>
+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
WeeChat documentation (english version)
Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
This manual is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This manual is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<section id="secPluginIrc">
<title>IRC plugin</title>
</section>
+79 -39
View File
@@ -25,8 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<title>Plugins</title>
<para>
This chapter describes WeeChat plugins interface (API) and
the default scripts plugins (Perl, Python, Ruby, Lua), provided with
This chapter describes WeeChat plugin API and default plugins provided with
WeeChat.
</para>
@@ -64,28 +63,40 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</para>
<para>
The plugin must have some variables and functions (mandatory,
without them the plugin can't load):
The plugin must use some mandatory macros (to define some variables)
and some functions (without them the plugin can't load):
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
<row>
<entry>Variable</entry>
<entry>Macro</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>char plugin_name[]</literal></entry>
<entry><literal>WEECHAT_PLUGIN_NAME</literal></entry>
<entry>plugin name</entry>
</row>
<row>
<entry><literal>char plugin_version[]</literal></entry>
<entry><literal>WEECHAT_PLUGIN_DESCRIPTION</literal></entry>
<entry>short description of plugin</entry>
</row>
<row>
<entry><literal>WEECHAT_PLUGIN_VERSION</literal></entry>
<entry>plugin version</entry>
</row>
<row>
<entry><literal>char plugin_description[]</literal></entry>
<entry>short description of plugin</entry>
<entry><literal>WEECHAT_PLUGIN_WEECHAT_VERSION</literal></entry>
<entry>
target WeeChat version where plugin will run (warning: plugin
will not run on any other WeeChat version!)
</entry>
</row>
<row>
<entry><literal>WEECHAT_PLUGIN_LICENSE</literal></entry>
<entry>plugin license</entry>
</row>
</tbody>
</tgroup>
@@ -101,15 +112,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</thead>
<tbody>
<row>
<entry><literal>int weechat_plugin_init (t_weechat_plugin *plugin)</literal></entry>
<entry><literal>int weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])</literal></entry>
<entry>
function called when plugin is loaded, must return
PLUGIN_RC_OK if successful, PLUGIN_RC_KO if error
(if error, plugin will NOT be loaded)
WEECHAT_RC_OK if successful, WEECHAT_RC_ERROR if error
(if error, plugin will NOT be loaded), argc/argv are arguments
for plugin (given on command line by user)
</entry>
</row>
<row>
<entry><literal>void weechat_plugin_end (t_weechat_plugin *plugin)</literal></entry>
<entry><literal>int weechat_plugin_end (struct t_weechat_plugin *plugin)</literal></entry>
<entry>function called when plugin is unloaded</entry>
</row>
</tbody>
@@ -117,8 +129,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</informaltable>
</para>
&plugin_api.en.xml;
<section id="secCompilePlugin">
<title>Compile plugin</title>
@@ -159,55 +169,85 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<para>
Full example of plugin, which adds a /double command, which displays
two times arguments on current channel (ok that's not very useful,
but that's just an example!):
two times arguments on current buffer, or execute two times a command
(ok that's not very useful, but that's just an example!):
<screen>
#include &lt;stdlib.h&gt;
#include "weechat-plugin.h"
char plugin_name[] = "Double";
char plugin_version[] = "0.1";
char plugin_description[] = "Test plugin for WeeChat";
WEECHAT_PLUGIN_NAME("double");
WEECHAT_PLUGIN_DESCRIPTION("Test plugin for WeeChat");
WEECHAT_PLUGIN_AUTHOR("FlashCode &lt;flashcode@flashtux.org&gt;");
WEECHAT_PLUGIN_VERSION("0.1");
WEECHAT_PLUGIN_WEECHAT_VERSION("0.2.7");
WEECHAT_PLUGIN_LICENSE("GPL3");
struct t_weechat_plugin *weechat_plugin = NULL;
/* "/double" command manager */
int double_cmd (t_weechat_plugin *plugin, int argc, char **argv,
char *handler_args, void *handler_pointer)
int
double_cmd (void *data, struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
if (argv[2] &amp;&amp; (argv[2][0] != '/'))
/* make C compiler happy */
(void) argv;
if (argc &gt; 1)
{
plugin->exec_command (plugin, NULL, NULL, argv[2]);
plugin->exec_command (plugin, NULL, NULL, argv[2]);
weechat_command (NULL, argv_eol[1]);
weechat_command (NULL, argv_eol[1]);
}
return PLUGIN_RC_OK;
return WEECHAT_RC_OK;
}
int weechat_plugin_init (t_weechat_plugin *plugin)
int
weechat_plugin_init (struct t_weechat_plugin *plugin,
int argc, char *argv[])
{
plugin->cmd_handler_add (plugin, "double",
"Display two times a message",
"msg",
"msg: message to display two times",
NULL,
&amp;double_cmd,
NULL, NULL);
return PLUGIN_RC_OK;
weechat_plugin = plugin;
weechat_hook_command ("double",
"Display two times a message",
"msg",
"msg: message to display two times",
NULL,
&amp;double_cmd, NULL);
return WEECHAT_RC_OK;
}
void weechat_plugin_end (t_weechat_plugin *plugin)
int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
/* nothing done here */
(void) plugin;
return WEECHAT_RC_OK;
}
</screen>
</para>
</section>
<!-- &plugin_api.en.xml; -->
</section>
&plugin_charset.en.xml;
&plugin_scripts.en.xml;
<section id="secDefaultPlugins">
<title>Default plugins</title>
&plugin_irc.en.xml;
<!-- &plugin_charset.en.xml; -->
&plugin_fifo.en.xml;
<!-- &plugin_scripts.en.xml; -->
</section>
</chapter>
+22 -185
View File
@@ -29,7 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
used, internal and IRC commands, setup file, and FIFO pipe use.
</para>
<section id="secRunningWeeChat">
<section id="secRunWeeChat">
<title>Running WeeChat</title>
<para>
@@ -49,12 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Disable auto-connect to servers at startup
</entry>
</row>
<row>
<entry><literal>-c, --config</literal></entry>
<entry>
Display config help (list of options)
</entry>
</row>
<row>
<entry><literal>-d, --dir &lt;path&gt;</literal></entry>
<entry>
@@ -64,24 +58,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
is created if not found by WeeChat.
</entry>
</row>
<row>
<entry><literal>-f, --key-functions</literal></entry>
<entry>
Display WeeChat internal functions for keys
</entry>
</row>
<row>
<entry><literal>-h, --help</literal></entry>
<entry>
Display help
</entry>
</row>
<row>
<entry><literal>-i, --irc-commands</literal></entry>
<entry>
Display IRC commands list
</entry>
</row>
<row>
<entry><literal>-k, --keys</literal></entry>
<entry>
@@ -106,12 +88,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Display WeeChat version
</entry>
</row>
<row>
<entry><literal>-w, --weechat-commands</literal></entry>
<entry>
Display WeeChat commands list
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
@@ -157,14 +133,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
When you run WeeChat for the first time, a default configuration
file is created, with default options.
The default configuration file is:
"<literal>~/.weechat/weechat.rc</literal>"
"<literal>~/.weechat/weechat.conf</literal>"
</para>
<para>
You can edit this file at your convenience to configure WeeChat
(ONLY if WeeChat is not running), or you can set parameters with
"<literal>/set</literal>" command in WeeChat
(see <xref linkend="secWeeChatCommands" />)
or you can set parameters with "<literal>/set</literal>" command in
WeeChat (see <xref linkend="secWeeChatCommands" />)
</para>
</section>
@@ -441,12 +416,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Remove last infobar message
</entry>
</row>
<row>
<entry>Alt + J then Alt + D</entry>
<entry>
Display DCC buffer
</entry>
</row>
<row>
<entry>Alt + J then Alt + L</entry>
<entry>
@@ -459,25 +428,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Switch to buffer previously displayed
</entry>
</row>
<row>
<entry>Alt + J then Alt + R</entry>
<entry>
Switch to raw IRC data buffer
</entry>
</row>
<row>
<entry>Alt + J then Alt + S</entry>
<entry>
Switch to server buffer
</entry>
</row>
<row>
<entry>Alt + J then Alt + X</entry>
<entry>
Switch to first channel of next server
(or server buffer if no channel is opened)
</entry>
</row>
<row>
<entry>Alt + digit (0-9)</entry>
<entry>
@@ -544,35 +494,33 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<title>Command line</title>
<para>
WeeChat command line (at the bottom of window) lets you send text on
channels and execute WeeChat or IRC commands (see
<xref linkend="secWeeChatIRCCommands" />).
WeeChat command line (at the bottom of window) lets you execute commands
or send text to buffer.
</para>
<para>
Commands begin with "/" char, followed by name of command.
For example, to initiate a private chat with "<literal>toto</literal>":
<screen><userinput>/query toto</userinput></screen>
For example, to see list of all options:
<screen><userinput>/set</userinput></screen>
</para>
<para>
Text sent to a channel is any text that does not begin with "/" char.
Text sent to a buffer is any text that does not begin with "/" char.
For example, to send text "<literal>hello</literal>" on current
channel:
buffer:
<screen><userinput>hello</userinput></screen>
</para>
<para>
However, it is possible to start with "/" char, by adding another.
For example, to send text "<literal>/query toto</literal>" on current
channel:
<screen><userinput>//query toto</userinput></screen>
For example, to send text "<literal>/set</literal>" on current
buffer:
<screen><userinput>//set</userinput></screen>
</para>
<para>
If option for sending IRC colors ("<literal>irc_colors_send</literal>")
is enabled, you can use color codes and attributes, as follow (press
Ctrl-C then following letter, with optional value):
For some plugins like IRC, you can use color codes and attributes, as
follow (press Ctrl-C then following letter, with optional value):
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
@@ -717,54 +665,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secWeeChatIRCCommands">
<title>WeeChat / IRC commands</title>
<section id="secWeeChatCommands">
<title>WeeChat commands</title>
<para>
This chapter lists all WeeChat and IRC commands.
This chapter lists all WeeChat commands.
</para>
<section id="secWeeChatCommands">
<title>WeeChat commands</title>
<para>
<!-- &weechat_commands.xml; -->
</para>
<para>
&weechat_commands.xml;
</para>
</section>
<section id="secKeyFunctions">
<title>Key functions</title>
<para>
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
<row>
<entry>Function</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
&key_functions.xml;
</tbody>
</tgroup>
</informaltable>
</para>
</section>
<section id="secIRCCommands">
<title>IRC commands</title>
<para>
&irc_commands.xml;
</para>
</section>
</section>
<section id="secConfigurationFile">
@@ -785,7 +696,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</thead>
<tbody>
&config.xml;
<!-- &config.xml; -->
</tbody>
</tgroup>
@@ -870,78 +781,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secFIFOpipe">
<title>FIFO pipe</title>
<para>
You can remote control WeeChat, by sending commands or text to a
FIFO pipe (you have to enable option "irc_fifo_pipe", it is disabled
by default).
</para>
<para>
The FIFO pipe is located in "<literal>~/.weechat/</literal>" and is
called "weechat_fifo_xxxxx" (where xxxxx is the process ID (PID) of
running WeeChat). So if many WeeChat are running, you have many FIFO
pipes, one for each session.
</para>
<para>
The syntax for the FIFO pipe commands/text is:
<screen>server,channel *text or command here</screen>
where server and channel are optional, but if channel is here, server
should be too.
</para>
<para>
Some examples:
<itemizedlist>
<listitem>
<para>
nick change on freenode to "mynick|out" :
<screen><prompt>$ </prompt><userinput>echo 'freenode */nick mynick|out' &gt;~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
<listitem>
<para>
display text on #weechat channel:
<screen><prompt>$ </prompt><userinput>echo 'freenode,#weechat *hello everybody!' >~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
<listitem>
<para>
display text on current channel (buffer displayed by WeeChat):
<screen><prompt>$ </prompt><userinput>echo '*hello!' >~/.weechat/weechat_fifo_12345</userinput></screen>
<emphasis>Warning:</emphasis> this is dangerous and you should
not do that except if you know what you do!
</para>
</listitem>
<listitem>
<para>
send two commands to unload/reload Perl scripts (you have to
separate them with "\n"):
<screen><prompt>$ </prompt><userinput>echo -e "freenode */perl unload\nfreenode */perl autoload" >~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
</itemizedlist>
</para>
<para>
You can write a script to send command to all running WeeChat at same
time, for example:
<screen>
#!/bin/sh
if [ $# -eq 1 ]; then
for fifo in ~/.weechat/weechat_fifo_*
do
echo -e "$1" >$fifo
done
fi
</screen>
If the script is called "auto_weechat_command", you can run it with:
<screen><prompt>$ </prompt><userinput>./auto_weechat_command "freenode,#weechat *hello"</userinput></screen>
</para>
</section>
</chapter>
+2
View File
@@ -37,7 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!ENTITY usage.en.xml SYSTEM "usage.en.xml">
<!ENTITY plugins.en.xml SYSTEM "plugins.en.xml">
<!ENTITY plugin_api.en.xml SYSTEM "plugin_api.en.xml">
<!ENTITY plugin_irc.en.xml SYSTEM "plugin_irc.en.xml">
<!ENTITY plugin_charset.en.xml SYSTEM "plugin_charset.en.xml">
<!ENTITY plugin_fifo.en.xml SYSTEM "plugin_fifo.en.xml">
<!ENTITY plugin_scripts.en.xml SYSTEM "plugin_scripts.en.xml">
<!ENTITY authors.en.xml SYSTEM "authors.en.xml">
]>
+9 -4
View File
@@ -16,11 +16,16 @@
LANGCODE = fr
BOOK = weechat.$(LANGCODE)
BOOK_INCLUDE = intro.$(LANGCODE).xml install.$(LANGCODE).xml \
usage.$(LANGCODE).xml plugins.$(LANGCODE).xml \
plugin_api.$(LANGCODE).xml plugin_charset.$(LANGCODE).xml \
BOOK_INCLUDE = intro.$(LANGCODE).xml \
install.$(LANGCODE).xml \
usage.$(LANGCODE).xml \
plugins.$(LANGCODE).xml \
plugin_api.$(LANGCODE).xml \
plugin_irc.$(LANGCODE).xml \
plugin_charset.$(LANGCODE).xml \
plugin_fifo.$(LANGCODE).xml \
plugin_scripts.$(LANGCODE).xml \
weechat_commands.xml irc_commands.xml key_functions.xml \
weechat_commands.xml \
config.xml
QUICKSTART = weechat_quickstart.$(LANGCODE).txt
+18 -18
View File
@@ -73,6 +73,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
traduction en tchèque, patchs
</para>
</listitem>
<listitem>
<para>
<emphasis>Pavel Shevchuk</emphasis> -
traduction en russe
</para>
</listitem>
<listitem>
<para>
<emphasis>Frank Zacharias</emphasis> -
traduction en allemand
</para>
</listitem>
<listitem>
<para>
<emphasis>voroskoi</emphasis> -
traduction en hongrois
</para>
</listitem>
<listitem>
<para>
<emphasis>Rudolf Polzer</emphasis> -
@@ -103,24 +121,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
patchs
</para>
</listitem>
<listitem>
<para>
<emphasis>voroskoi</emphasis> -
traduction en hongrois
</para>
</listitem>
<listitem>
<para>
<emphasis>Frank Zacharias</emphasis> -
traduction en allemand
</para>
</listitem>
<listitem>
<para>
<emphasis>Pavel Shevchuk</emphasis> -
traduction en russe
</para>
</listitem>
</itemizedlist>
</para>
+36 -12
View File
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Ce chapitre explique comment installer WeeChat.
</para>
<section id="secPaquetsBinaires">
<section id="secBinaryPackages">
<title>Paquets binaires</title>
<para>
@@ -45,7 +45,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<para>
Mandriva/RedHat (ou toute distribution compatible avec les RPM) :
<userinput>
rpm -i /chemin/weechat-x.y.z-1.i386.rpm
rpm -i /chemin/vers/weechat-x.y.z-1.i386.rpm
</userinput>
</para>
</listitem>
@@ -63,24 +63,48 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secPaquetSource">
<section id="secSourcePackage">
<title>Paquet source</title>
<section id="secCompileWithAutotools">
<title>Compiler avec les Autotools</title>
<para>
Tapez simplement dans une console ou un terminal :
<para>
Dans une console ou un terminal :
<screen><prompt>$ </prompt><userinput>./configure</userinput>
<prompt>$ </prompt><userinput>make</userinput></screen>
</para>
<para>
Obtenez les droits root et installez WeeChat :
</para>
<para>
Obtenez les droits root et installez WeeChat :
<screen><prompt>$ </prompt><userinput>su</userinput>
(entrez le mot de passe root)
<prompt># </prompt><userinput>make install</userinput></screen>
</para>
</para>
</section>
<section id="secCompileWithCmake">
<title>Compiler avec Cmake</title>
<para>
Dans une console ou un terminal :
<screen><prompt>$ </prompt><userinput>mkdir build</userinput>
<prompt>$ </prompt><userinput>cd build</userinput>
<prompt>$ </prompt><userinput>cmake ..</userinput>
<prompt>$ </prompt><userinput>make</userinput></screen>
</para>
<para>
Obtenez les droits root et installez WeeChat :
<screen><prompt>$ </prompt><userinput>su</userinput>
(entrez le mot de passe root)
<prompt># </prompt><userinput>make install</userinput></screen>
</para>
</section>
</section>
<section id="secSourcesGIT">
<section id="secGITSources">
<title>Sources GIT</title>
<para>
@@ -95,13 +119,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</para>
<para>
Exécutez ce script :
Si vous utilisez les Autotools (et non cmake), exécutez ce script :
<userinput>./autogen.sh</userinput>
</para>
<para>
Suivez alors les instructions du paquet source
(voir <xref linkend="secPaquetSource" />)
(voir <xref linkend="secSourcePackage" />)
</para>
</section>
+4 -3
View File
@@ -47,7 +47,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</listitem>
<listitem>
<para>
plusieurs interfaces : Curses, wxWidgets, Gtk et Qt
plusieurs interfaces : Curses (wxWidgets, Gtk et Qt en développement)
</para>
</listitem>
<listitem>
@@ -93,7 +93,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secPreRequis">
<section id="secPreRequisites">
<title>Pré-requis</title>
<para>
@@ -102,7 +102,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<listitem>
<para>
un système GNU/Linux (avec le compilateur et les outils
associés pour le paquet des sources)
associés pour le paquet des sources), ou un système compatible
(voir ci-dessus)
</para>
</listitem>
<listitem>
+9
View File
@@ -21,6 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<chapter id="chapPluginAPI">
<title>API extension</title>
<para>
Ce chapitre décrit l'interface des extensions (API).
--- sera complété très prochainement ! ---
</para>
</chapter>
<section id="secFonctionsInterface">
<title>Fonctions de l'interface (API)</title>
+100
View File
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
WeeChat documentation (french version)
Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
This manual is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This manual is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<section id="secFIFOpipe">
<title>Tube FIFO</title>
<para>
Vous pouvez contrôler WeeChat à distance, en envoyant des commandes
ou du texte dans un tube FIFO (si l'option "plugins.var.fifo.fifo" est
activée, elle l'est par défaut).
</para>
<para>
Le tube FIFO est dans le répertoire "<literal>~/.weechat/</literal>"
et s'appelle "weechat_fifo_xxxxx" (où xxxxx est l'ID du processus
(PID) du WeeChat qui tourne).
</para>
<para>
La syntaxe pour envoyer des commandes ou du texte dans le tube FIFO
est une des suivantes :
<screen>
catégorie,nom *texte ou commande ici
nom *texte ou commande ici
*texte ou commande ici
</screen>
</para>
<para>
Quelques exemples :
<itemizedlist>
<listitem>
<para>
changement du pseudo sur freenode en "pseudo|absent" :
<screen><prompt>$ </prompt><userinput>echo 'freenode,freenode */nick pseudo|absent' &gt;~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
<listitem>
<para>
affichage de texte sur le canal #weechat :
<screen><prompt>$ </prompt><userinput>echo 'freenode,#weechat *bonjour tout le monde !' >~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
<listitem>
<para>
affichage de texte sur le canal courant (le tampon affiché
par WeeChat) :
<screen><prompt>$ </prompt><userinput>echo '*bonjour !' >~/.weechat/weechat_fifo_12345</userinput></screen>
<emphasis>Attention :</emphasis> ceci est dangereux et vous ne
devriez pas le faire sauf si vous savez ce que vous faites !
</para>
</listitem>
<listitem>
<para>
envoyer deux commandes pour décharger/recharger les scripts Perl
(vous devez les séparer par "\n") :
<screen><prompt>$ </prompt><userinput>echo -e "weechat,weechat */perl unload\nweechat,weechat */perl autoload" >~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
</itemizedlist>
</para>
<para>
Vous pouvez écrire un script qui envoie les commandes à tous les
WeeChat qui tournent en même temps, par exemple :
<screen>
#!/bin/sh
if [ $# -eq 1 ]; then
for fifo in ~/.weechat/weechat_fifo_*
do
echo -e "$1" >$fifo
done
fi
</screen>
Si le script s'appelle "auto_weechat_command", vous pouvez le lancer
ainsi :
<screen><prompt>$ </prompt><userinput>./auto_weechat_command "freenode,#weechat *bonjour"</userinput></screen>
</para>
</section>
+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
WeeChat documentation (english version)
Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
This manual is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This manual is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<section id="secPluginIrc">
<title>IRC plugin</title>
</section>
+93 -49
View File
@@ -21,15 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<chapter id="chapExtensions">
<chapter id="chapPlugins">
<title>Extensions</title>
<para>
Ce chapitre décrit l'interface des extensions (API) et les extensions
pour scripts (Perl, Python, Ruby, Lua), fournies avec WeeChat.
Ce chapitre décrit l'API extension de WeeChat et les extensions fournies
par défaut avec WeeChat.
</para>
<section id="secLesExtensionsDansWeeChat">
<section id="secPluginsInWeeChat">
<title>Les extensions dans WeeChat</title>
<para>
@@ -52,7 +52,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secEcrireUneExtension">
<section id="secWriteAPlugin">
<title>Ecrire une extension</title>
<para>
@@ -63,28 +63,42 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</para>
<para>
L'extension doit comporter certaines variables et fonctions
obligatoires (sans quoi l'extension ne peut être chargée) :
L'extension doit comporter certaines macros obligatoires (pour définir
des variables) et des fonctions (sans quoi l'extension ne peut être
chargée) :
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
<row>
<entry>Variable</entry>
<entry>Macro</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>char plugin_name[]</literal></entry>
<entry><literal>WEECHAT_PLUGIN_NAME</literal></entry>
<entry>le nom de l'extension</entry>
</row>
<row>
<entry><literal>char plugin_version[]</literal></entry>
<entry><literal>WEECHAT_PLUGIN_DESCRIPTION</literal></entry>
<entry>une courte description de l'extension</entry>
</row>
<row>
<entry><literal>WEECHAT_PLUGIN_VERSION</literal></entry>
<entry>la version de l'extension</entry>
</row>
<row>
<entry><literal>char plugin_description[]</literal></entry>
<entry>une courte description de l'extension</entry>
<entry><literal>WEECHAT_PLUGIN_WEECHAT_VERSION</literal></entry>
<entry>
la version de WeeChat pour laquelle l'extension est destinée
(attention: l'extension ne pourra tourner sur aucune autre
version de WeeChat !)
</entry>
</row>
<row>
<entry><literal>WEECHAT_PLUGIN_LICENSE</literal></entry>
<entry>la licence de l'extension</entry>
</row>
</tbody>
</tgroup>
@@ -100,16 +114,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</thead>
<tbody>
<row>
<entry><literal>int weechat_plugin_init (t_weechat_plugin *plugin)</literal></entry>
<entry><literal>int weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])</literal></entry>
<entry>
fonction appelée au chargement de l'extension
qui doit renvoyer PLUGIN_RC_OK en cas de succès,
PLUGIN_RC_KO en cas d'erreur (si erreur, l'extension
ne sera PAS chargée)
qui doit renvoyer WEECHAT_RC_OK en cas de succès,
WEECHAT_RC_ERROR en cas d'erreur (si erreur, l'extension
ne sera PAS chargée), argv/argv sont les paramètres pour
l'extension (donnés sur la ligne de commande par l'utilisateur)
</entry>
</row>
<row>
<entry><literal>void weechat_plugin_end (t_weechat_plugin *plugin)</literal></entry>
<entry><literal>int weechat_plugin_end (struct t_weechat_plugin *plugin)</literal></entry>
<entry>fonction appelée au déchargement de l'extension</entry>
</row>
</tbody>
@@ -117,9 +132,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</informaltable>
</para>
&plugin_api.fr.xml;
<section id="secCompilerExtension">
<section id="secCompilePlugin">
<title>Compiler l'extension</title>
<para>
@@ -138,7 +151,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secChargerExtension">
<section id="secLoadPlugin">
<title>Charger l'extension dans WeeChat</title>
<para>
@@ -156,60 +169,91 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secExempleExtension">
<section id="secPluginExample">
<title>Exemple d'extension</title>
<para>
Un exemple complet d'extension, qui ajoute une commande /double
affichant deux fois les paramètres passés sur le canal courant
(d'accord ce n'est pas très utile mais ceci est un exemple !) :
affichant deux fois les paramètres passés sur le tampon courant
ou exécutant deux fois une commande (d'accord ce n'est pas très utile
mais ceci est un exemple !) :
<screen>
#include &lt;stdlib.h&gt;
#include "weechat-plugin.h"
char plugin_name[] = "Double";
char plugin_version[] = "0.1";
char plugin_description[] = "Plugin de test pour WeeChat";
WEECHAT_PLUGIN_NAME("double");
WEECHAT_PLUGIN_DESCRIPTION("Test plugin for WeeChat");
WEECHAT_PLUGIN_AUTHOR("FlashCode &lt;flashcode@flashtux.org&gt;");
WEECHAT_PLUGIN_VERSION("0.1");
WEECHAT_PLUGIN_WEECHAT_VERSION("0.2.7");
WEECHAT_PLUGIN_LICENSE("GPL3");
/* gestionnaire de commande "/double" */
struct t_weechat_plugin *weechat_plugin = NULL;
int double_cmd (t_weechat_plugin *plugin, int argc, char **argv,
char *handler_args, void *handler_pointer)
/* "/double" command manager */
int
double_cmd (void *data, struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
if (argv[2] &amp;&amp; (argv[2][0] != '/'))
/* make C compiler happy */
(void) argv;
if (argc &gt; 1)
{
plugin->exec_command (plugin, NULL, NULL, argv[2]);
plugin->exec_command (plugin, NULL, NULL, argv[2]);
weechat_command (NULL, argv_eol[1]);
weechat_command (NULL, argv_eol[1]);
}
return PLUGIN_RC_OK;
return WEECHAT_RC_OK;
}
int weechat_plugin_init (t_weechat_plugin *plugin)
int
weechat_plugin_init (struct t_weechat_plugin *plugin,
int argc, char *argv[])
{
plugin->cmd_handler_add (plugin, "double",
"Affiche deux fois un message",
"msg",
"msg: message a afficher deux fois",
NULL,
&amp;double_cmd,
NULL, NULL);
return PLUGIN_RC_OK;
weechat_plugin = plugin;
weechat_hook_command ("double",
"Display two times a message",
"msg",
"msg: message to display two times",
NULL,
&amp;double_cmd, NULL);
return WEECHAT_RC_OK;
}
void weechat_plugin_end (t_weechat_plugin *plugin)
int
weechat_plugin_end (struct t_weechat_plugin *plugin)
{
/* on ne fait rien ici */
/* nothing done here */
(void) plugin;
return WEECHAT_RC_OK;
}
</screen>
</para>
</section>
<!-- &plugin_api.fr.xml; -->
<section id="secDefaultPlugins">
<title>Default plugins</title>
&plugin_irc.fr.xml;
<!-- &plugin_charset.fr.xml; -->
&plugin_fifo.fr.xml;
<!-- &plugin_scripts.fr.xml; -->
</section>
</section>
&plugin_charset.fr.xml;
&plugin_scripts.fr.xml;
</chapter>
+26 -194
View File
@@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<chapter id="chapUtilisation">
<chapter id="chapUsage">
<title>Utilisation</title>
<para>
@@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
l'utilisation du tube FIFO.
</para>
<section id="secLancerWeeChat">
<section id="secRunWeeChat">
<title>Lancer WeeChat</title>
<para>
@@ -51,12 +51,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
démarrage
</entry>
</row>
<row>
<entry><literal>-c, --config</literal></entry>
<entry>
Afficher l'aide sur le fichier de config (liste des options)
</entry>
</row>
<row>
<entry><literal>-d, --dir &lt;répertoire&gt;</literal></entry>
<entry>
@@ -67,25 +61,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
s'il n'est pas trouvé par WeeChat.
</entry>
</row>
<row>
<entry><literal>-f, --key-functions</literal></entry>
<entry>
Afficher la liste des fonctions internes WeeChat pour les
touches
</entry>
</row>
<row>
<entry><literal>-h, --help</literal></entry>
<entry>
Afficher l'aide
</entry>
</row>
<row>
<entry><literal>-i, --irc-commands</literal></entry>
<entry>
Afficher la liste des commandes IRC
</entry>
</row>
<row>
<entry><literal>-k, --keys</literal></entry>
<entry>
@@ -111,12 +92,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Afficher la version de WeeChat
</entry>
</row>
<row>
<entry><literal>-w, --weechat-commands</literal></entry>
<entry>
Afficher la liste des commandes WeeChat
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
@@ -166,20 +141,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Lorsque vous lancez WeeChat pour la première fois, un fichier de
configuration par défaut est créé, avec les options par défaut.
Le fichier de configuration par défaut est :
"<literal>~/.weechat/weechat.rc</literal>"
"<literal>~/.weechat/weechat.conf</literal>"
</para>
<para>
Vous pouvez éditer ce fichier pour configurer WeeChat à votre
convenance (SEULEMENT si WeeChat ne tourne pas), ou vous pouvez
modifier les paramètres dans WeeChat avec la commande
"<literal>/set</literal>"
(voir <xref linkend="secCommandesWeeChat" />)
convenance ou vous pouvez modifier les paramètres dans WeeChat avec la
commande "<literal>/set</literal>"
(voir <xref linkend="secWeeChatCommands" />)
</para>
</section>
<section id="secRaccourcisClavier">
<section id="secKeyboardShortcuts">
<title>Raccourcis clavier</title>
<para>
@@ -454,12 +428,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Effacer le dernier message de la barre d'informations
</entry>
</row>
<row>
<entry>Alt + J puis Alt + D</entry>
<entry>
Afficher le tampon des DCC
</entry>
</row>
<row>
<entry>Alt + J puis Alt + L</entry>
<entry>
@@ -472,25 +440,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
Sauter au tampon affiché précédemment
</entry>
</row>
<row>
<entry>Alt + J puis Alt + R</entry>
<entry>
Sauter au tampon de données brutes IRC
</entry>
</row>
<row>
<entry>Alt + J puis Alt + S</entry>
<entry>
Sauter au tampon du serveur
</entry>
</row>
<row>
<entry>Alt + J puis Alt + X</entry>
<entry>
Sauter au premier canal du serveur suivant
(ou tampon du serveur si aucun canal n'est ouvert)
</entry>
</row>
<row>
<entry>Alt + chiffre (0-9)</entry>
<entry>
@@ -554,41 +503,38 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secLigneDeCommande">
<section id="secCommandLine">
<title>La ligne de commande</title>
<para>
La ligne de commande WeeChat (située en bas de la fenêtre) permet
d'envoyer du texte sur les canaux et d'exécuter des commandes
WeeChat ou IRC (voir <xref linkend="secCommandesWeeChatIRC" />).
d'exécuter des commandes ou d'envoyer du texte vers le tampon.
</para>
<para>
Les commandes débutent par un caractère "/", suivi du nom de la
commande. Par exemple pour initier une conversation privée avec
"<literal>toto</literal>" :
<screen><userinput>/query toto</userinput></screen>
commande. Par exemple pour afficher la liste de toutes les options :
<screen><userinput>/set</userinput></screen>
</para>
<para>
Le texte envoyé à un canal est tout texte ne commençant pas par le
Le texte envoyé à un tampon est tout texte ne commençant pas par le
caractère "/", par exemple pour envoyer "<literal>bonjour</literal>"
sur le canal courant :
sur le tampon courant :
<screen><userinput>bonjour</userinput></screen>
</para>
<para>
Il est cependant possible de faire débuter un texte par "/" en le
doublant. Par exemple pour envoyer le texte
"<literal>/query toto</literal>" sur le canal courant :
<screen><userinput>//query toto</userinput></screen>
"<literal>/set</literal>" sur le tampon courant :
<screen><userinput>//set</userinput></screen>
</para>
<para>
Si l'option d'envoi des couleurs IRC
("<literal>irc_colors_send</literal>") est activée, il est possible
d'utiliser des codes couleur et attributs comme suit (appuyer sur Ctrl-C
puis la lettre qui suit et éventuellement une valeur) :
Pour certaines extensions comme IRC, il est possible d'utiliser
des codes couleur et attributs cmome suit (appuyer sur Ctrl-C puis sur
la lettre qui suit et éventuellement une valeur) :
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
@@ -733,57 +679,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secCommandesWeeChatIRC">
<title>Commandes WeeChat / IRC</title>
<section id="secWeeChatCommands">
<title>Commandes WeeChat</title>
<para>
Ce chapitre liste toutes les commandes WeeChat et IRC.
Ce chapitre liste toutes les commandes WeeChat.
</para>
<section id="secCommandesWeeChat">
<title>Commandes WeeChat</title>
<para>
&weechat_commands.xml;
</para>
</section>
<section id="secFonctionsTouches">
<title>Fonctions pour les touches</title>
<para>
<informaltable colsep="0" frame="none">
<tgroup cols="2">
<thead>
<row>
<entry>Fonction</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
&key_functions.xml;
</tbody>
</tgroup>
</informaltable>
</para>
</section>
<section id="secCommandesIRC">
<title>Commandes IRC</title>
<para>
&irc_commands.xml;
</para>
</section>
<para>
<!-- &weechat_commands.xml; -->
</para>
</section>
<section id="secFichierConfiguration">
<section id="secConfigurationFile">
<title>Fichier de configuration</title>
<para>
@@ -801,7 +710,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</thead>
<tbody>
&config.xml;
<!-- &config.xml; -->
</tbody>
</tgroup>
@@ -886,81 +795,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</section>
<section id="secTubeFIFO">
<title>Tube FIFO</title>
<para>
Vous pouvez contrôler WeeChat à distance, en envoyant des commandes
ou du texte dans un tube FIFO (l'option "irc_fifo_pipe" doit être
activée, elle est désactivée par défaut).
</para>
<para>
Le tube FIFO est dans le répertoire "<literal>~/.weechat/</literal>"
et s'appelle "weechat_fifo_xxxxx" (où xxxxx est l'ID du processus
(PID) du WeeChat qui tourne). Donc si plusieurs WeeChat tournent, il
y a plusieurs tubes FIFO, un pour chaque session.
</para>
<para>
La syntaxe pour envoyer des commandes ou du texte dans le tube FIFO
est la suivante :
<screen>serveur,canal *texte ou commande ici</screen>
où le serveur et le canal sont facultatifs, mais si le canal est là,
le serveur doit l'être aussi.
</para>
<para>
Quelques exemples :
<itemizedlist>
<listitem>
<para>
changement du pseudo sur freenode en "pseudo|absent" :
<screen><prompt>$ </prompt><userinput>echo 'freenode */nick pseudo|absent' &gt;~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
<listitem>
<para>
affichage de texte sur le canal #weechat :
<screen><prompt>$ </prompt><userinput>echo 'freenode,#weechat *bonjour tout le monde !' >~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
<listitem>
<para>
affichage de texte sur le canal courant (le tampon affiché
par WeeChat) :
<screen><prompt>$ </prompt><userinput>echo '*bonjour !' >~/.weechat/weechat_fifo_12345</userinput></screen>
<emphasis>Attention :</emphasis> ceci est dangereux et vous ne
devriez pas le faire sauf si vous savez ce que vous faites !
</para>
</listitem>
<listitem>
<para>
envoyer deux commandes pour décharger/recharger les scripts Perl
(vous devez les séparer par "\n") :
<screen><prompt>$ </prompt><userinput>echo -e "freenode */perl unload\nfreenode */perl autoload" >~/.weechat/weechat_fifo_12345</userinput></screen>
</para>
</listitem>
</itemizedlist>
</para>
<para>
Vous pouvez écrire un script qui envoie les commandes à tous les
WeeChat qui tournent en même temps, par exemple :
<screen>
#!/bin/sh
if [ $# -eq 1 ]; then
for fifo in ~/.weechat/weechat_fifo_*
do
echo -e "$1" >$fifo
done
fi
</screen>
Si le script s'appelle "auto_weechat_command", vous pouvez le lancer
ainsi :
<screen><prompt>$ </prompt><userinput>./auto_weechat_command "freenode,#weechat *bonjour"</userinput></screen>
</para>
</section>
</chapter>
+3 -1
View File
@@ -37,7 +37,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!ENTITY usage.fr.xml SYSTEM "usage.fr.xml">
<!ENTITY plugins.fr.xml SYSTEM "plugins.fr.xml">
<!ENTITY plugin_api.fr.xml SYSTEM "plugin_api.fr.xml">
<!ENTITY plugin_irc.fr.xml SYSTEM "plugin_irc.fr.xml">
<!ENTITY plugin_charset.fr.xml SYSTEM "plugin_charset.fr.xml">
<!ENTITY plugin_fifo.fr.xml SYSTEM "plugin_fifo.fr.xml">
<!ENTITY plugin_scripts.fr.xml SYSTEM "plugin_scripts.fr.xml">
<!ENTITY authors.fr.xml SYSTEM "authors.fr.xml">
]>
@@ -47,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<bookinfo>
<title>WeeChat 0.2.7-dev - Guide utilisateur</title>
<subtitle>Client de messagerie instantanée, léger et extensible</subtitle>
<subtitle>Client de discussion rapide, léger et extensible</subtitle>
<author>
<firstname>Sébastien</firstname>