Commit d676c2ee authored by mathieui's avatar mathieui

Move the plugins documentation

(use automodule directive & docstrings)
parent e6cb43ee
......@@ -20,7 +20,7 @@ Poezio documentation
dev/index
..
plugins
plugins/index
dev
Indices and tables
......
.. _admin-plugin:
Room administration plugin
==========================
Admin
=====
.. automodule:: admin
.. _alias-plugin:
Alias
=====
.. automodule:: alias
.. _amsg-plugin:
Amsg
====
.. automodule:: amsg
.. _daychange-plugin:
Day change
==========
.. automodule:: day_change
.. _displaycorrections-plugin:
Display corrections
===================
.. automodule:: display_corrections
.. _double-plugin:
Double
======
.. automodule:: double
.. _exec-plugin:
Exec
=====
.. automodule:: exec
.. _figlet-plugin:
Figlet
======
.. automodule:: figlet
.. _gpg-plugin:
GPG
===
.. automodule:: gpg
......@@ -27,6 +27,8 @@ e.g.
plugins_autoload = gpg:tell:exec
.. _plugin-configuration:
Plugin configuration
--------------------
......@@ -50,6 +52,7 @@ Plugin index
------------
.. glossary::
:sorted:
Admin
:ref:`Documentation <admin-plugin>`
......@@ -57,98 +60,167 @@ Plugin index
Creates convenient aliases for MUC administration.
Alias
:ref:`Documentation <alias-plugin>`
Allows you to create your own aliases.
Amsg
:ref:`Documentation <amsg-plugin>`
Allows a message to be broadcasted on all the rooms your are in.
Caution: do not overuse.
Day Change
:ref:`Documentation <daychange-plugin>`
Logs the day change inside the buffers, to keep track of the days when
backlogging.
Display corrections
:ref:`Documentation <displaycorrections-plugin>`
Lists old versions of a corrected message.
Exec
:ref:`Documentation <exec-plugin>`
Runs a system command an optionally sends the output as a message.
Figlet
:ref:`Documentation <figlet-plugin>`
Ascii-art writing (requires the ``figlet`` package on your system).
GPG
:ref:`Documentation <gpg-plugin>`
Allows encrypted exchanges and presence signing using GnuPG.
IQ Show
:ref:`Documentation <iqshow-plugin>`
Shows the received IQs, for debugging purposes.
Link
:ref:`Documentation <link-plugin>`
Opens links in a web browser, locally or remotely using a FIFO and SSH.
MPD Client
:ref:`Documentation <mpdclient-plugin>`
Sends the current song (and optionally the progress inside the song) to
the current (chat) tab.
OTR
:ref:`Documentation <otr-plugin>`
Allows encrypted and deniable exchanges using OTR.
PacoKick
:ref:`Documentation <pacokick-plugin>`
Kicks a random user in the room.
Ping
:ref:`Documentation <ping-plugin>`
Sends a ping probe to an entity (XEP-0199)
Quote
:ref:`Documentation <quote-plugin>`
Adds a /quote command to quote a message at HH:MM:SS and put it in the
input (to prevent painful copy/pastes).
Rainbow
:ref:`Documentation <rainbow-plugin>`
Sends your messages in rainbow colors using XHTML-IM.
Reminder
:ref:`Documentation <reminder-plugin>`
Reminds you to do something every now and then.
Screen Detach
:ref:`Documentation <screendetach-plugin>`
Changes your status to _away_ if the screen poezio is in is detached.
Simple notify
:ref:`Documentation <simplenotify-plugin>`
Sends a notification with a command of your choice on (non-MUC) messages.
Status
:ref:`Documentation <status-plugin>`
Adds convenient aliases to /status (/away, etc).
Tell
:ref:`Documentation <tell-plugin>`
Tells a message to a nick when he connects to a MUC.
Uptime
:ref:`Documentation <uptime-plugin>`
Gets the uptime of a XMPP server or a component.
Replace
:ref:`Documentation <replace-plugin>`
Replace some patterns in your messages.
Time Marker
:ref:`Documentation <timemarker-plugin>`
Display the time between two messages.
Revstr
:ref:`Documentation <revstr-plugin>`
Reverse everything you say.
Shuffle
:ref:`Documentation <shuffle-plugin>`
Shuffle everything you say.
Double
:ref:`Documentation <double-plugin>`
Double the first word of each sentence.
.. toctree::
:hidden:
admin
alias
amsg
day_change
display_corrections
exec
figlet
gpg
link
mpd_client
otr
pacokick
ping
quote
rainbow
reminder
replace
screen_detach
send_delayed
simple_notify
status
tell
time_marker
uptime
revstr
double
shuffle
iq_show
.. _iqshow-plugin:
Iq show
=======
.. automodule:: iq_show
.. _link-plugin:
Link
====
.. automodule:: link
.. _mpdclient-plugin:
Mpd client
==========
.. automodule:: mpd_client
.. _otr-plugin:
OTR
===
.. automodule:: otr
.. _pacokick-plugin:
Pacokick
========
.. automodule:: pacokick
.. _ping-plugin:
Ping
====
.. automodule:: ping
.. _quote-plugin:
Quote
=====
.. automodule:: quote
.. _rainbow-plugin:
Rainbow
=======
.. automodule:: rainbow
.. _reminder-plugin:
Reminder
========
.. automodule:: reminder
.. _replace-plugin:
Replace
=======
.. automodule:: replace
.. _revstr-plugin:
Revstr
======
.. automodule:: revstr
.. _screendetach-plugin:
Screen detach
=============
.. automodule:: screen_detach
.. _senddelayed-plugin:
Send delayed
============
.. automodule:: send_delayed
.. _shuffle-plugin:
Shuffle
=======
.. automodule:: shuffle
.. _simplenotify-plugin:
Simple notify
=============
.. automodule:: simple_notify
.. _status-plugin:
Status
======
.. automodule:: status
.. _tell-plugin:
Tell
====
.. automodule:: tell
.. _timemarker-plugin:
Time marker
===========
.. automodule:: time_marker
.. _uptime-plugin:
Uptime
======
.. automodule:: uptime
class Tab(object): pass
class ChatTab(Tab): pass
class PrivateTab(ChatTab): pass
class MucTab(ChatTab): pass
class ConversationTab(ChatTab): pass
class RosterInfoTab(Tab): pass
class XMLTab(Tab): pass
"""
Alias plugin.
Installation
------------
You only have to load the plugin:
``/load alias``
Usage
-----
This plugin defines two new global commands: :term:`/alias` and :term:`/unalias`.
.. glossary::
/alias
**Usage:** ``/alias <name> <command> [args]``
This command will create a new command, named ``name`` (and callable with
``/name``), that runs ``/command``, with ``[args]`` as fixed args for the command.
When you run the alias, you can also pass parameters to it, that will be fed
to the original command.
Example: ::
/alias toto say "koin "
Will bind ``/say koin `` to ``/toto``, so this alias will work in any
Chat tab. If someone calls it with ::
/toto koin
Poezio will then execute ``/say koin koin``.
/unalias
**Usage:** ``/unalias <name>``
This command removes a defined alias.
Allows the creation and the removal of personal aliases.
"""
from plugin import BasePlugin
......
# A simple broadcast plugin
"""
This plugin broadcasts a message to all your joined rooms.
.. note:: With great power comes great responsability.
Use with moderation.
Installation
------------
You only have to load the plugin.::
/load amsg
Command
-------
.. glossary::
/amsg
**Usage:** ``/amsg <message>``
"""
from plugin import BasePlugin
from tabs import MucTab
......
"""
This plugin adds a message at 00:00 in each of your chat tabs saying that the
date has changed.
Installation
------------
You only have to load the plugin.::
/load day_change
"""
from gettext import gettext as _
from plugin import BasePlugin
import datetime
......
# A plugin that adds the /display_corrections command, to view the previous
# versions of a corrected message.
"""
Lists old versions of a corrected message.
Installation
------------
::
/load display_corrections
Usage
-----
.. glossary::
/display_corrections
**Usage:** ``/display_corrections [number]``
This command lists the old versions of a message.
Without argument, it will list the last corrected message if there
is any. If you give an integer as an argument, ``/display_corrections``
will go back gradually in the buffer to find the message matching
that number (starting from 1, for the last corrected message).
If you are scrolling in the buffer, Poezio will list the corrected messages
starting from the first you can see. (although there are some problems with
multiline messages).
"""
from plugin import BasePlugin
from common import shell_split
import tabs
......
"""
Double the first word of any message you send in a :ref:`muctab`, making you appear retarded.
Installation
------------
You only have to load the plugin:
.. code-block:: none
/load double
"""
from plugin import BasePlugin
class Plugin(BasePlugin):
......
# A plugin that can execute a command and send the result in the conversation
"""
This plugin lets you execute a system command through poezio.
Installation
------------
You only have to load the plugin. ::
/load exec
Usage
-----
.. warning:: Running commands that start a daemon or an interface is not a good
idea.
.. glossary::
/exec
**Usage:** ``/exec [-o|-O] <command>``
Execute a system command.
::
/exec command
Will give you the result in the information buffer.
::
/exec -o command
Will send the result of the command into the current tab, if possible.
::
/exec -O command
Will send the result of the command and the command summary into the current
tab, if possible.
"""
from plugin import BasePlugin
import os
......
"""
This plugin uses figlet to transform every message into a big ascii-art
message.
Installation
------------
You only have to load the plugin (and have :file:`figlet` installed, of course).
::
/load figlet
Usage
-----
Say something in a Chat tab.
.. note:: Can create fun things when used with :ref:`The rainbow plugin <rainbow-plugin>`.
"""
from plugin import BasePlugin
import subprocess
......
"""
This plugin implements the `XEP-0027`_ “Current Jabber OpenPGP Usage”.
This is a plugin used to encrypt one-to-one conversation using the PGP
encryption method. You can use it if you want really good privacy. Without this
encryption, your messages are encrypted **at least** from your client (poezio) to
your server. The message is decrypted by your server and you cannot control the
encryption method of your messages from your server to your contact’s server
(unless you are your own server’s administrator), nor from your contact’s
server to your contact’s client.
This plugin does end-to-end encryption. This means that **only** your contact can
decrypt your messages, and it is fully encrypted during **all** its travel
through the internet.
Note that if you are having an encrypted conversation with a contact, you can
**not** send XHTML-IM messages to him. They will be removed and be replaced by
plain text messages.
Installation and configuration
------------------------------
You should autoload this plugin, as it will send your signed presence directly