summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/en/install.txt40
-rw-r--r--doc/en/keys.txt11
-rw-r--r--doc/en/plugins.txt132
-rw-r--r--doc/en/usage.txt310
-rw-r--r--doc/images/conversation.pngbin0 -> 12992 bytes
-rw-r--r--doc/images/data_forms.pngbin0 -> 8624 bytes
-rw-r--r--doc/images/list.pngbin0 -> 7768 bytes
-rw-r--r--doc/images/muc.pngbin0 -> 42090 bytes
-rw-r--r--doc/images/private.pngbin0 -> 9145 bytes
-rw-r--r--doc/images/roster.pngbin0 -> 14736 bytes
-rw-r--r--doc/images/tab_bar.pngbin0 -> 956 bytes
11 files changed, 468 insertions, 25 deletions
diff --git a/doc/en/install.txt b/doc/en/install.txt
index 75cc0ea8..4338afef 100644
--- a/doc/en/install.txt
+++ b/doc/en/install.txt
@@ -5,31 +5,44 @@ Install
Poezio in the GNU/Linux distributions
-------------------------------------
-As far as I know, Poezio is available in the following distributions, you just have to install it by using the package manager of the distribution, if you're using one of these.
-
-* *Archlinux*: A poezio and poezio-git packages are in AUR (use your favourite AUR wrapper to install them)
-* *Frugalware*: Just use pacmang-g2 to install the poezio package. (Thanks to its maintainer, Kooda)
+As far as I know, Poezio is available in the following distributions, you just
+ have to install it by using the package manager of the distribution, if you're
+ using one of these.
+
+* *Archlinux*: A poezio and poezio-git packages are in AUR (use your favourite
+ AUR wrapper to install them)
+* *Frugalware*: Just use pacmang-g2 to install the poezio package. (Thanks to
+ its maintainer, Kooda)
* *Debian*: Use an other distro.
-(If an other distribution provides a poezio package, please tell us and we will add it to the list)
+(If an other distribution provides a poezio package, please tell us and we will
+ add it to the list)
Install poezio from the sources
-------------------------------
-You can download poezio's https://dev.louiz.org/project/poezio/download[stable sources] or fetch the development version (trunk), using git:
+You can download poezio's https://dev.louiz.org/project/poezio/download[stable
+ sources] or fetch the development version (trunk), using git:
============================
git clone https://git.louiz.org/poezio
============================
-In order for poezio to correctly work, you need the libs SleekXMPP and dnspython. You can install them by downloading it from the https://github.com/fritzy/SleekXMPP/[SleekXMPP] page and the http://www.dnspython.org/[dnspython] page , but you'll need the development versions. Alternatively, you can download poezio's sources including SleekXMPP and dnspython, that's the easier way.
+In order for poezio to correctly work, you need the libs SleekXMPP and
+ dnspython. You can install them by downloading it from the
+ https://github.com/fritzy/SleekXMPP/[SleekXMPP] page and the
+ http://www.dnspython.org/[dnspython] page , but you'll need the development
+ versions. Alternatively, you can download poezio's sources including SleekXMPP
+ and dnspython, that's the easier way.
-As for dnspython, you will have to use our python3 fork, or poke them to accept patches.
+As for dnspython, you will have to use our python3 fork, or poke them to accept
+ patches.
=== Dependencies ===
-If you want to install SleekXMPP and dnspython yourself, follow these instructions. Else, go to the next section.
+If you want to install SleekXMPP and dnspython yourself, follow these
+ instructions. Else, go to the next section.
Download SleekXMPP
@@ -51,7 +64,8 @@ python3 setup.py build
su -c "python3 setup.py install"
============================
-Clone the repository at http://hg.louiz.org/dnspython (this is a fork, because upstream is unresponsive and didn’t fix an important bug).
+Clone the repository at http://hg.louiz.org/dnspython (this is a fork, because
+ upstream is unresponsive and didn’t fix an important bug).
============================
hg clone http://hg.louiz.org/dnspython
@@ -68,12 +82,14 @@ su -c "python3 setup.py install"
=== Poezio installation ===
-If you skipped the installation of the dependencies and you only want to test poezio without a system-wide install, do, in the _poezio_ directory:
+If you skipped the installation of the dependencies and you only want to test
+ poezio without a system-wide install, do, in the _poezio_ directory:
============================
sh update.sh
============================
-If you have git and hg installed, it will download and update locally the libraries for you.
+If you have git and hg installed, it will download and update locally the
+ libraries for you.
If you don't want to install poezio but just test it, do:
diff --git a/doc/en/keys.txt b/doc/en/keys.txt
index f4b659f7..109e5df5 100644
--- a/doc/en/keys.txt
+++ b/doc/en/keys.txt
@@ -92,6 +92,17 @@ These keys work only in the MultiUserChat tab.
*tabulation*:: Complete a nick.
+*Ctrl-c*:: Insert xhtml formatting. You have to press Ctrl-c then a character
+ listed below:
+- 1: Red
+- 2: Green
+- 3: Yellow/Orange
+- 4: Blue
+- 5: Pink
+- 6: Turquoise
+- b: Bold
+- o: Stop formatting
+
MultiUserChat List tab input keys
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/doc/en/plugins.txt b/doc/en/plugins.txt
new file mode 100644
index 00000000..47ab7f01
--- /dev/null
+++ b/doc/en/plugins.txt
@@ -0,0 +1,132 @@
+Plugins
+=======
+
+Currently, the plugins are in a plugin branch on the git repo.
+
+Location
+--------
+
+The plugins have to be present in '$XDG_DATA_HOME/poezio/plugins/plugin_name.py'
+(or '~/.local/share' if not defined)
+
+Structure
+---------
+
+A plugin must always be a class named Plugin that inherits the
+plugin.BasePlugin class defined into the *plugin* poezio module.
+
+Methods
+-------
+
+Overridden methods
+~~~~~~~~~~~~~~~~~~
+The *Plugin* class has several method that you can override for your own convenience
+
+[[init]]
+*init*:: +self+ +
+This method is called when the plugin is loaded, this is where you call
+the other methods, for example <<add-command,add_command>>, and initialize
+everything to make your plugin actually do something. <<example-1,ex 1>>, <<example-2,ex 2>>
+
+*cleanup*:: +self+ +
+Called when the plugin is unloaded (or when poezio is exited). Clean everything
+that needs to be cleaned here.
+
+Callable methods
+~~~~~~~~~~~~~~~~
+The BasePlugin has several methods that can be used. Here is a list of
+all its methods that you could use in your plugin, describing what they
+do, their arguments, and giving some example for each of them.
+
+[[add-command]]
+*add_command*:: +self+, +name+, +handler+, +help+, +completion=None+ +
+This method adds a global command to poezio. For example you can add a /foo
+command that the user could call when the plugin is loaded, by calling this
+method with _foo_ as its _name_ argument. <<example-1,ex 1>>
+
+* _name_: (string) the name of the command (for example, if it is 'plugintest', it can
+add a /plugintest command)
+* _handler_: (function) the function to be called when the command is executed.
+the handler takes *args* as a parameter, which is a string of what
+is entered after the command. Split *args* (with _common.shell_split_) to use
+that as command arguments.
+* _help_: (string) the help message available for that command through the _/help_
+command.
+* _completion_: (function) the completion for the args of that command. It takes
+an input object as its only argument. This function should call the
+_auto_completion()_ method on the input object, passing a list of possible strings
+for the completion and returning the value of that call directly.
+Everything else is handled by that _auto_completion()_ method (checking what strings
+match, how to cycle between matches, etc). If you don’t want any special completion
+for that command, just pass None (the default value).
+
+*add_event_handler**: +self+, +event_name+, +handler+ +
+This methods adds a callback that will be called whenever the given event
+occurs. <<example-2,ex 2>>
+
+* _event_name_: (string) The name of the event you want to ``monitor''.
+This can be a sleekxmpp event, or a poezio event. See the list of
+<<events-list,all available events>>.
+* _handler_: The method that will be called whenever the event occurs.
+It must accept the arguments specified for that event in the <<events-list,events list>>.
+
+Attributes
+----------
+
+Config
+~~~~~~
+By default, each plugin has a PluginConfig object accessible with *self.config*.
+
+*PluginConfig.read*:: +self+ +
+Reads the config file from $XDG_CONFIG_HOME/poezio/plugins/plugin_name.cfg, it is called upon initialization, so you should not need it.
+
+*PluginConfig.write*:: +self+ +
+Writes the config to the same file mentioned previously.
+
+Core
+~~~~
+Each plugin has a reference to the Core object accessible with *self.core*, that allows you to do about anything with poezio. Remember to use it only when you need it, and to use the functions described in this documentation only, even if much more is available. If your plugin needs to do something not available with these methods, please do a feature request instead of doing some dirty hacks with some other methods.
+
+Core methods
+^^^^^^^^^^^^
+CAUTION: TODO
+
+
+[[events-list]]
+Events list
+-----------
+CAUTION: TODO
+
+Examples
+--------
+
+[[example-1]]
+.Add a simple command that sends "Hello World!" into the conversation
+=====================================================================
+[source,python]
+---------------
+class Plugin(BasePlugin):
+ def init(self):
+ self.add_command('hello', self.command_hello, "Usage: /hello\nHello: Send 'Hello World!'", None)
+
+ def command_hello(self, args):
+ self.core.send_message('Hello World!')
+---------------
+=====================================================================
+
+[[example-2]]
+
+.Adds an event handler that sends ``tg'' to a groupchat when a message is received from someone named ``Partauch''
+=====================================================================
+[source,python]
+---------------
+class Plugin(BasePlugin):
+ def init(self):
+ self.add_event_handler('groupchat_message', self.on_groupchat_message)
+
+ def on_groupchat_message(self, message):
+ if message['mucnick'] == "Partauche":
+ self.core.send_message('tg', to=message.getMucroom())
+---------------
+=====================================================================
+
diff --git a/doc/en/usage.txt b/doc/en/usage.txt
index be6809ba..f11ab5ed 100644
--- a/doc/en/usage.txt
+++ b/doc/en/usage.txt
@@ -1,22 +1,173 @@
Usage
=====
+This page is the main page of the documentation for poezio, explaining how to
+ use it and describing its interfaces.
+
+Poezio is composed of tabs which can be of various types. Each tab type has
+a distinct interface, list of commands and list of key shortcuts, in addition
+to the global commands and key shortcuts.
+
+Tabs
+----
+On all tabs, you get a line showing the the list of all opened tabs. Each tab
+has a number, each time you open a new tab, it gets the next available number.
+
+
+image::../images/tab_bar.png[title="Example of 5 opened tabs"]
+
+The tab numbered _0_ is always the _roster_ tab, the other tabs can be of any
+type.
+
+
+The status of a tab is represented by its color:
+
+* *[navy]#blue#* (tab _0_): an inactive tab of any type, nothing new to see
+ there.
+* *[purple]#purple#* (tab _1_): a MultiUserChat tab with at least one new
+ unread message.
+* *[green]#green#* (tab _2_): a tab of a private conversation with a new
+ message to read.
+* *[teal]#cyan#* (tab _3_): the current tab.
+* *[red]#red#* (tab _4_): a MultiUserChat tab with at least one new hightlight
+ message.
+
+You can go from one tab to another in many ways:
+
+* Ctrl+n and Ctrl+p
+* <<command-win, win>> command
+* <<command-next, next>> and <<command-prev, prev>> commands
+* Alt+ a number
+* Alt+j followed by a two-digits number
+* Alt+e, this will jump to the next tab with the highest priority. Priority
+ applies in this order: private message > highlight message > normal message.
+
+Roster tab
+~~~~~~~~~~
+This is a unique tab, always numbered _0_. It contains the list of your
+contacts. You can add/remove/edit/search contacts from there, and you can open
+a conversation with one of them.
+
+Use the _arrows_ to browse the list, the _space_ key to fold or unfold a group
+or a contact.
+
+image::../images/roster.png["The roster tab", title="The roster tab"]
+
+* _1_: The area where information messages are displayed.
+* _2_: The actual list of contacts. The first level is group, the second is the
+* contacts and the third is the resources of you online contacts.
+* _3_: More informations about the selected contact.
+
+MultiUserChat tab
+~~~~~~~~~~~~~~~~~
+
+This tab contains a multi-users conversation.
+
+image::../images/muc.png["The MUC tab", title="The MUC tab"]
+
+* _1_: The conversation window, this is where all the messages and events
+ related to the muc will be displayed. It can be scrolled up and down with
+ PageUp and PageDown.
+* _2_: The participant list. Participants are listed by their role first, and
+ then alphabetically.
+ In the default theme, The nick colors mean:
+ - Red: moderator
+ - Blue: participant
+ - gray: visitor +
+ +
+ The status of each participant is symbolized using the _color_ of the
+ character on the left of its nick.
+ That character also shows the chatstate of each participant:
+ - _|_: inactive
+ - _X_: composing
+ - _A_: active
+ - _p_: paused
+* _3_: Your information in that MUC (the name of the room, your nick, your role
+ and affiliation).
+* _4_: The topic of the room.
+
+You can configure the room (if you have the rights to do it) using the
+_/configure_ command, open a private conversation with someone using the
+_/query_ command, change or view the topic using the _/topic_ command…
+
+Private tab
+~~~~~~~~~~~
+This is the tab opened with the _/query_ command, letting you talk in private
+with a participant of a multi-users chat.
+
+image::../images/private.png["The private tab", title="The private tab"]
+
+This is just a simple one to one conversation, with a line showing the status,
+name and chatstate of the participant.
+
+Conversation tab
+~~~~~~~~~~~~~~~~
+A tab opened from the roster, to talk in private with one of your contacts.
+
+image::../images/conversation.png["The conversation tab", title="The conversation tab"]
+
+This is also just a simple one to one conversation, with a line showing the status,
+name and chatstate of the participant, as well as a line at the top showing the
+status message of the contact.
+
+Dataforms tab
+~~~~~~~~~~~~~
+
+This tab lets you view a form receive from a remote entity, edit the values and
+send everything back. It is mostly used to configure MUCs with the _/configure_
+command but can actually be used for almost anything.
+
+image::../images/data_forms.png["The dataform tab", title="The dataform tab"]
+
+Use the _up_ and _down_ keys to go from one field to the other, and edit the
+value using the _space_, _left_ or _right_ keys, or by entering text.
+
+You can then send the completed form using _Ctrl+y_ or cancel using _Ctrl+g_.
+
+List tab
+~~~~~~~~
+
+This tab lists all public rooms on a MUC service. It is currently very limited
+but will be improved in the future. There currently is no way to search a room
+or even to sort them.
+
+image::../images/list.png["The list tab", title="The list tab"]
+
+Use the _up_ and _down_ or _PageUp_ and _PageDown_ keys to browse the list, and
+use _Enter_ or _j_ to join the selected room.
+
Commands
--------
-Command listing
-~~~~~~~~~~~~~~~
+Commands start with the _/_ character and can take a list of any number
+of arguments, separated by spaces. If an argument should contain a space,
+you can use the _"_ character to surround this argument.
-The commands are shown like this:
+The commands described in this page are shown like this:
+===========================================================
/command <mandatory argument> [optional argument]
+===========================================================
+
+You can get the same help as below with the _/help_ command.
+
Global commands
-^^^^^^^^^^^^^^^
+~~~~~~~~~~~~~~~
These commands work in *any* tab.
-*/join [room_name][@server][/nick] [password]*:: Join the specified room. You can specify a nickname after a slash (/). If no nickname is specified, you will use the default_nick in the configuration file. You can omit the room name: you will then join the room you're looking at (useful if you were kicked). You can also provide a room_name without specifying a server, the server of the room you're currently in will be used. You can also provide a password to join the room.
+*/help [command]*:: If called without an argument, this command will list the
+ available commands. If it has a valid command as an argument, this command
+ will show the usage and the help for the given command.
+
+*/join [room_name][@server][/nick] [password]*:: Join the specified room. You
+ can specify a nickname after a slash (/). If no nickname is specified, you
+ will use the default_nick in the configuration file. You can omit the room
+ name: you will then join the room you're looking at (useful if you were
+ kicked). You can also provide a room_name without specifying a server, the
+ server of the room you're currently in will be used. You can also provide a
+ password to join the room.
- Examples:
* /join room@server.tld
@@ -31,29 +182,162 @@ These commands work in *any* tab.
*/quit*:: Like /exit.
+[[command-next]]
*/next*:: Go to the next room.
+[[command-prev]]
*/prev*:: Go to the previous room.
+[[command-win]]
*/win <number>*:: Go to the specified room.
*/w <number>*:: Like /win.
-*/status <availability> [status message]*:: Set your availability and (optionaly) your status message. The <availability> argument is one of "available, chat, away, afk, dnd, busy, xa" and the optional [status] argument will be your status message.'
+*/status <availability> [status message]*:: Set your availability and
+ (optionaly) your status message. The <availability> argument is one of
+ "available, chat, away, afk, dnd, busy, xa" and the optional [status] argument
+ will be your status message.'
-*/bookmark [roomname][/nick]*:: Bookmark the specified room (you will then auto-join it on each poezio start). This commands uses the same syntax as /join. Type /help join for syntax examples. Note that when typing /bookmark on its own, the room will be bookmarked with the nickname you're currently using in this room (instead of default_nick).
+*/bookmark [roomname][/nick]*:: Bookmark the specified room (you will then
+ auto-join it on each poezio start). This commands uses almost the same syntax
+ as /join. Type /help join for syntax examples. Note that when typing /bookmark
+ on its own, the room will be bookmarked with the nickname you're currently
+ using in this room (instead of default_nick).
-*/set <option> [value]*:: Sets the value to the option in your configuration file. You can, for example, change your default nickname by doing "/set default_nick toto" or your resource with "/set resource blabla". You can also set an empty value (nothing) by providing no [value] after <option>.
+*/set <option> [value]*:: Sets the value to the option in your configuration
+ file. You can, for example, change your default nickname by doing "/set
+ default_nick toto" or your resource with "/set resource blabla". You can also
+ set an empty value (nothing) by providing no [value] after <option>.
*/theme*:: Reload the theme defined in the config file.
-*/list [server.tld]*:: Get the list of public chatrooms in the specified server.
+*/list [server.tld]*:: Get the list of public chatrooms in the specified server
+.
+
+*/message <jid> [optional message]*:: Open a conversation with the specified
+ JID (event if it is not in our roster), and send a message to him, if
+ specified.
+
+*/version <jid>*:: Get the software version of the given JID (usually its XMPP
+ client and Operating System).
+
+*/server_cycle [server.tld] [message]*:: Disconnect and reconnect in all the
+ rooms of server.tld.
+
+*/bind <key> <eq>*:: Bind a key to another key or to a "command". For example,
+ "/bind ^H KEY_UP" makes Control + h behave the same way as the Up key. See the
+ link:keys.html[key bindings documentation page] for more details.
+
+NOTE: The following command will work everywhere, except in the Roster tab.
+
+*/close*:: Close the tab.
+
+Chat tab commands
+~~~~~~~~~~~~~~~~~
+
+These commands will work in any conversation tab (MultiUserChat, Private, or
+ Conversation tabs).
+
+*/say <message>*:: Just send the message (only useful it you want your message
+ to begin with a _/_). Note that you can also send message starting with a _/_
+ by starting it with _//_.
+
+MultiUserChat tab commands
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+*/ignore <nickname>*:: Ignore a specified nickname.
+
+*/unignore <nickname>*:: Remove the specified nickname from the ignore list.
+
+*/kick <nick> [reason]*:: Kick the user with the specified nickname. You can
+ also give an optional reason.
+
+*/topic <subject>*:: Change the subject of the room. You might want to knwow
+ that entering "/topic [tab]" will autocomplete the topic.
+
+*/query <nick> [message]*:: Open a private conversation with <nick>. This nick
+ has to be present in the room you’re currently in. If you specified a message
+ after the nickname, it will be sent to this user.
+
+*/part [message]*:: Disconnect you from a room. You can specify an optional
+ message.
+
+*/close [message]*:: Disconnect you from a room (if you are connected) and
+ close the tab. You can specify an optional message if you are still connected.
+
+*/nick <nickname>*:: Change your nickname in the current room.
+
+*/recolor*:: Re-assign a color to all the participants in the current room,
+ based on the last time they talked. Use this if the participants currently
+ talking have too many identical colors.
+
+*/cycle [message]*:: Leave the current room an rejoint it immediatly. You can
+ specify an optional quit message.
+
+*/info <nickname>*:: Display some information about the user in the room:
+ his/her role, affiliation, status, and status message.
+
+*/version <nickname or jid>*:: Get the software version of the given nick in
+ room or the given jid (usually its XMPP client and Operating System).
+
+*/configure*:: Configure the current room through a form.
+
+*/names*:: Get the list of the users in the room, their number, and the list
+ of the people assuming different roles.
+
+*/clear*:: Clear the current buffer.
+
+Private tab commands
+~~~~~~~~~~~~~~~~~~~~
+
+*/info*:: Display some info about this user in the MultiUserChat.
+
+*/unquery*:: Close the tab.
+
+*/version*:: Get the software version of the current interlocutor (usually its
+ XMPP client and Operating System).
+
+Normal Conversation tab commands
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+*/info*:: Display the status of this contact.
+
+*/unquery*:: Close the tab.
+
+*/version*:: Get the software version of the current interlocutor (usually its
+ XMPP client and Operating System).
+
+Roster tab commands
+~~~~~~~~~~~~~~~~~~~
+
+*/accept [jid]*:: Authorize the provided JID (or the selected contact in the
+ roster) to see your presence.
+
+*/deny [jid]*:: Prevent the provided JID (or the selected contact in the
+ roster) from seeing your presence.
+
+*/add <jid>*:: Add the specified JID to your roster and authorize him to see
+ your presence. If he accepts you, the subscription will be mutual (and if he
+ doesn’t, you can still /deny him).
+
+*/name <jid> <name>*:: Set the given JID’s name.
+
+*/groupadd <jid> <group>*:: Add the given JID to the given group (if the group
+ does not exist, it will be created).
+
+*/groupremove <jid> <group>*:: Remove the given JID from the given group (if
+ the group is empty after that, it will get deleted).
-*/message <jid> [optional message]*:: Open a conversation with the specified JID (event if it is not in our roster), and send a message to him, if specified.
+*/remove [jid]*:: Remove the specified JID from your roster. This will
+ unsubscribe you from its presence, cancel its subscription to yours, and
+ remove the item from your roster.
-*/version <jid>*:: Get the software version of the given JID (usually its XMPP client and Operating System).
+NOTE: The following commands do not comply with any XEP or whatever, but they
+ can still prove useful when you are migrating to an other JID.
-*/server_cycle [server.tld] [message]*:: Disconnect and reconnect in all the rooms of server.tld.
+*/export [/path/to/file]*:: Export your contacts into /path/to/file if
+ specified, or $HOME/poezio_contacts if not.
-*/bind <key> <eq>*:: Bind a key to another key or to a "command". For example, "/bind ^H KEY_UP" makes Control + h behave the same way than the Up key.
+*/import [/path/to/file]*:: Import your contacts from /path/to/file if
+ specified, or $HOME/poezio_contacts if not.
diff --git a/doc/images/conversation.png b/doc/images/conversation.png
new file mode 100644
index 00000000..f5347178
--- /dev/null
+++ b/doc/images/conversation.png
Binary files differ
diff --git a/doc/images/data_forms.png b/doc/images/data_forms.png
new file mode 100644
index 00000000..d6e53cd9
--- /dev/null
+++ b/doc/images/data_forms.png
Binary files differ
diff --git a/doc/images/list.png b/doc/images/list.png
new file mode 100644
index 00000000..768ca41f
--- /dev/null
+++ b/doc/images/list.png
Binary files differ
diff --git a/doc/images/muc.png b/doc/images/muc.png
new file mode 100644
index 00000000..1e431e4a
--- /dev/null
+++ b/doc/images/muc.png
Binary files differ
diff --git a/doc/images/private.png b/doc/images/private.png
new file mode 100644
index 00000000..7d604dc2
--- /dev/null
+++ b/doc/images/private.png
Binary files differ
diff --git a/doc/images/roster.png b/doc/images/roster.png
new file mode 100644
index 00000000..d853c1cb
--- /dev/null
+++ b/doc/images/roster.png
Binary files differ
diff --git a/doc/images/tab_bar.png b/doc/images/tab_bar.png
new file mode 100644
index 00000000..fc482ffd
--- /dev/null
+++ b/doc/images/tab_bar.png
Binary files differ