summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile17
-rw-r--r--README.rst11
-rw-r--r--data/default_config.cfg2
-rw-r--r--data/poezio.12
-rw-r--r--data/poezio_80.pngbin6739 -> 6211 bytes
-rw-r--r--data/poezio_gpg_export.160
-rw-r--r--data/poezio_logs.174
-rw-r--r--data/scripts-manpages.xml155
-rw-r--r--doc/source/commands.rst7
-rw-r--r--doc/source/configuration.rst2
-rw-r--r--doc/source/dev/xep.rst37
-rw-r--r--doc/source/images/correct.pngbin632 -> 313 bytes
-rw-r--r--doc/source/images/muc.pngbin17818 -> 15709 bytes
-rw-r--r--doc/source/images/pep.pngbin1276 -> 1113 bytes
-rw-r--r--doc/source/images/pep_infos.pngbin4363 -> 3714 bytes
-rw-r--r--doc/source/images/roster.pngbin11280 -> 10142 bytes
-rw-r--r--doc/source/images/theme_256_colors.pngbin37316 -> 37242 bytes
-rw-r--r--doc/source/images/vert_tabs.pngbin2890 -> 1901 bytes
-rw-r--r--doc/source/install.rst26
-rw-r--r--doc/source/keys.rst2
-rw-r--r--doc/source/theme/static/poezio.pngbin4820 -> 4431 bytes
-rw-r--r--doc/stub/potr/context.py1
-rw-r--r--plugins/link.py2
-rw-r--r--plugins/reorder.py8
-rw-r--r--plugins/send_delayed.py6
-rw-r--r--poezio/core/commands.py5
-rw-r--r--poezio/core/core.py2
-rw-r--r--poezio/core/handlers.py1
-rw-r--r--poezio/plugin_manager.py16
-rw-r--r--poezio/poezio.py3
-rw-r--r--poezio/roster.py2
-rw-r--r--poezio/tabs/__init__.py6
-rw-r--r--poezio/tabs/muctab.py4
-rw-r--r--poezio/tabs/rostertab.py4
-rw-r--r--poezio/tabs/xmltab.py14
-rw-r--r--poezio/windows/__init__.py8
-rwxr-xr-xsetup.py6
37 files changed, 435 insertions, 48 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..0283483f
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,17 @@
+FROM alpine:latest
+MAINTAINER Mathieu Pasquet <mathieui@mathieui.net>
+RUN apk add --update build-base git python3 python3-dev libidn-dev && python3 -m ensurepip && pip3 install --upgrade pip && pip3 install cython pyasn1 pyasn1-modules
+WORKDIR /tmp/
+ARG version=HEAD
+# Don’t ADD local files in order to keep layers at a minimal size
+RUN git clone https://git.poez.io/poezio.git poezio-git-dir && \
+ cd poezio-git-dir && \
+ git archive --prefix="poezio-archive-${version}/" -o /tmp/poezio-archive.tar "${version}" && \
+ cd /tmp/ && tar xvf poezio-archive.tar && \
+ cd "poezio-archive-${version}" && \
+ python3 setup.py install && \
+ cd .. && rm -rf /tmp/poezio-* ~/.cache ~/.pip
+RUN adduser -D poezio-user
+USER poezio-user
+WORKDIR /home/poezio-user/
+ENTRYPOINT ["poezio"]
diff --git a/README.rst b/README.rst
index 17f539a6..01536b68 100644
--- a/README.rst
+++ b/README.rst
@@ -152,6 +152,17 @@ we merge it to “master” as well, of course).
- Todd Eisenberger - Plugin system and OTR support
- Jérôme Parment (Manfraid) - Code, testing
- Link Mauve - Code, testing
+ - Akim Sadaoui - Code
+ - Florian Duraffourg - Code
+ - Frédéric Meynadier - Code
+ - Georg Lukas - Code
+ - Johannes Krude - Code
+ - Łabędź - Code
+ - Lasse Aagren - Code
+ - Lancelot SIX - Code
+ - Luke Marlin - Code
+ - Maxim Buquet - Code
+ - Nicolas Braud-Santoni - Code
- Perdu - Code
- Eijebong - Code
- Gaëtan Ribémont - Logo design
diff --git a/data/default_config.cfg b/data/default_config.cfg
index 689fd4a6..96472f49 100644
--- a/data/default_config.cfg
+++ b/data/default_config.cfg
@@ -34,7 +34,7 @@ certfile =
keyfile =
# the nick you will use when joining a room with no associated nick
-# If this is empty, the $USER environnement variable will be used
+# If this is empty, the $USER environment variable will be used
default_nick =
# the rooms you will join automatically on startup, with associated nickname or not
diff --git a/data/poezio.1 b/data/poezio.1
index 539db39e..d54e991c 100644
--- a/data/poezio.1
+++ b/data/poezio.1
@@ -16,7 +16,7 @@ is a console jabber (XMPP) client written in Python and using ncurses to draw it
Run poezio using \fICONFIG_FILE\fR as the config file instead of ~/.config/poezio/poezio.cfg
.TP
\fB\-d\fR, \fB\-\-debug \fIDEBUG_FILE\fR
-Log debug from both poezio and SleekXMPP in \fIDEBUG_FILE\fR. Debug contains incoming and outgoing stanzas in addition to various message helping poezio's debuging.
+Log debug from both poezio and SleekXMPP in \fIDEBUG_FILE\fR. Debug contains incoming and outgoing stanzas in addition to various message helping poezio's debugging.
.TP
\fB\-h\fR
Display an help message
diff --git a/data/poezio_80.png b/data/poezio_80.png
index e56c6128..f5d7f12c 100644
--- a/data/poezio_80.png
+++ b/data/poezio_80.png
Binary files differ
diff --git a/data/poezio_gpg_export.1 b/data/poezio_gpg_export.1
new file mode 100644
index 00000000..0d163440
--- /dev/null
+++ b/data/poezio_gpg_export.1
@@ -0,0 +1,60 @@
+'\" t
+.\" Title: POEZIO_GPG_EXPORT
+.\" Author: Tanguy Ortolo <tanguy+debian@ortolo.eu>
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 10/28/2016
+.\" Manual: User commands
+.\" Source: Poezio
+.\" Language: English
+.\"
+.TH "POEZIO_GPG_EXPORT" "1" "10/28/2016" "Poezio" "User commands"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+poezio_gpg_export \- Print a key list for the Poezio GPG plugin
+.SH "SYNOPSIS"
+.HP \w'\fBpoezio_gpg_export\fR\ 'u
+\fBpoezio_gpg_export\fR
+.SH "DESCRIPTION"
+.PP
+Poezio
+is a console\-based XMPP client\&.
+.PP
+\fBpoezio_gpg_export\fR
+uses
+\fBgpg\fR
+to build a list suitable for the Poezio GPG plugin\&. Double\-check the output and use at your own risk\&.
+.SH "SEE ALSO"
+\fBpoezio\fR(1), \fBgpg\fR(1)
+.SH "AUTHOR"
+.PP
+\fBTanguy Ortolo\fR <\&tanguy+debian@ortolo.eu\&>
+.RS 4
+Wrote this manpage for the Debian system.
+.RE
+.SH "COPYRIGHT"
+.br
+Copyright \(co 2016 Tanguy Ortolo
+.br
+.PP
+This manual page was written for the Debian system (and may be used by others).
+.PP
+Permission is granted to copy, distribute and/or modify this document under the terms of the Zlib License.
+.sp
diff --git a/data/poezio_logs.1 b/data/poezio_logs.1
new file mode 100644
index 00000000..0be422aa
--- /dev/null
+++ b/data/poezio_logs.1
@@ -0,0 +1,74 @@
+'\" t
+.\" Title: POEZIO_LOGS
+.\" Author: Tanguy Ortolo <tanguy+debian@ortolo.eu>
+.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
+.\" Date: 10/28/2016
+.\" Manual: User commands
+.\" Source: Poezio
+.\" Language: English
+.\"
+.TH "POEZIO_LOGS" "1" "10/28/2016" "Poezio" "User commands"
+.\" -----------------------------------------------------------------
+.\" * Define some portability stuff
+.\" -----------------------------------------------------------------
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.\" http://bugs.debian.org/507673
+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+.ie \n(.g .ds Aq \(aq
+.el .ds Aq '
+.\" -----------------------------------------------------------------
+.\" * set default formatting
+.\" -----------------------------------------------------------------
+.\" disable hyphenation
+.nh
+.\" disable justification (adjust text to left margin only)
+.ad l
+.\" -----------------------------------------------------------------
+.\" * MAIN CONTENT STARTS HERE *
+.\" -----------------------------------------------------------------
+.SH "NAME"
+poezio_logs \- Display a Poezio log in a human\-readable format
+.SH "SYNOPSIS"
+.HP \w'\fBpoezio_logs\fR\ 'u
+\fBpoezio_logs\fR [\fIoptions\fR] {\fILOG_FILE\fR}
+.SH "DESCRIPTION"
+.PP
+Poezio
+is a console\-based XMPP client\&.
+.PP
+\fBpoezio_logs\fR
+displays a log stored in Poezio format in a more human\-readable way\&.
+.SH "OPTIONS"
+.PP
+\fB\-i\fR, \fB\-\-hide\-info\fR
+.RS 4
+Hide info lines
+.RE
+.PP
+\fB\-t\fR, \fB\-\-hide\-time\fR
+.RS 4
+Hide timestamps
+.RE
+.PP
+\fB\-c\fR, \fB\-\-no\-color\fR
+.RS 4
+Remove color
+.RE
+.SH "SEE ALSO"
+\fBpoezio\fR(1)
+.SH "AUTHOR"
+.PP
+\fBTanguy Ortolo\fR <\&tanguy+debian@ortolo.eu\&>
+.RS 4
+Wrote this manpage for the Debian system.
+.RE
+.SH "COPYRIGHT"
+.br
+Copyright \(co 2016 Tanguy Ortolo
+.br
+.PP
+This manual page was written for the Debian system (and may be used by others).
+.PP
+Permission is granted to copy, distribute and/or modify this document under the terms of the Zlib License.
+.sp
diff --git a/data/scripts-manpages.xml b/data/scripts-manpages.xml
new file mode 100644
index 00000000..241ba6ea
--- /dev/null
+++ b/data/scripts-manpages.xml
@@ -0,0 +1,155 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook V5.0//EN" "http://docbook.org/xml/5.0/dtd/docbook.dtd" [
+
+<!--
+
+`xsltproc /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/manpages/docbook.xsl \
+ scripts.xml'
+
+A manual page <package>.<section> will be generated. You may view the
+manual page with: man -l <package>.<section>'. A typical entry in a Makefile or
+Makefile.am is:
+
+DB2MAN = /usr/share/xml/docbook/stylesheet/docbook-xsl-ns/manpages/docbook.xsl
+XP = xsltproc
+
+poezio_gpg_export.1 poezio_logs.1: scripts.xml
+ $(XP) $(DB2MAN) $<
+
+The xsltproc binary is found in the xsltproc package. The XSL files are in
+docbook-xsl-ns. A description of the parameters you can use can be found in the
+docbook-xsl-doc-* packages.
+
+Validation can be done using: `xmllint -''-noout -''-valid manpage.xml`
+
+General documentation about man-pages and man-page-formatting:
+man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/
+
+-->
+
+ <!ENTITY authorfirstname "Tanguy">
+ <!ENTITY authorsurname "Ortolo">
+ <!ENTITY authorfullname "&authorfirstname; &authorsurname;">
+ <!ENTITY authoremail "tanguy+debian@ortolo.eu">
+ <!ENTITY mansection "1">
+ <!ENTITY mansectitle "User Commands">
+ <!ENTITY upcommand1 "POEZIO_GPG_EXPORT">
+ <!ENTITY command1 "poezio_gpg_export">
+ <!ENTITY upcommand2 "POEZIO_LOGS">
+ <!ENTITY command2 "poezio_logs">
+ <!ENTITY program "Poezio">
+]>
+
+<article xmlns="http://docbook.org/ns/docbook" version="5.0" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="en">
+<title>User commands</title>
+<info>
+<productname>&program;</productname>
+
+<authorgroup>
+ <author>
+ <personname><firstname>&authorfirstname;</firstname><surname>&authorsurname;</surname></personname>
+ <contrib>Wrote this manpage for the Debian system.</contrib>
+ <address><email>&authoremail;</email></address>
+ </author>
+</authorgroup>
+
+<copyright>
+ <year>2016</year>
+ <holder>&authorfullname;</holder>
+</copyright>
+
+<legalnotice>
+ <para>This manual page was written for the Debian system
+ (and may be used by others).</para>
+ <para>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the Zlib License.</para>
+</legalnotice>
+</info>
+
+<refentry xml:id="&command1;">
+ <refmeta>
+ <refentrytitle>&upcommand1;</refentrytitle>
+ <manvolnum>&mansection;</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>&command1;</refname>
+ <refpurpose>Print a key list for the &program; GPG plugin</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>&command1;</command>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsection xml:id="poezio_gpg_export-description"><info><title>DESCRIPTION</title></info>
+ <para><application>&program;</application> is a console-based XMPP
+ client.</para>
+ <para><command>&command1;</command> uses <command>gpg</command> to build
+ a list suitable for the &program; GPG plugin. Double-check the output
+ and use at your own risk.</para>
+ </refsection>
+
+ <refsection xml:id="poezio_gpg_export-see"><info><title>SEE ALSO</title></info>
+ <simplelist type="inline">
+ <member><citerefentry><refentrytitle>poezio</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
+ <member><citerefentry><refentrytitle>gpg</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
+ </simplelist>
+ </refsection>
+</refentry>
+
+<refentry xml:id="&command2;">
+ <refmeta>
+ <refentrytitle>&upcommand2;</refentrytitle>
+ <manvolnum>&mansection;</manvolnum>
+ </refmeta>
+
+ <refnamediv>
+ <refname>&command2;</refname>
+ <refpurpose>Display a Poezio log in a human-readable format</refpurpose>
+ </refnamediv>
+
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>&command2;</command>
+ <arg choice="opt"><replaceable>options</replaceable></arg>
+ <arg choice="req"><replaceable>LOG_FILE</replaceable></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+
+ <refsection xml:id="poezio_logs-description"><info><title>DESCRIPTION</title></info>
+ <para><application>&program;</application> is a console-based XMPP
+ client.</para>
+ <para><command>&command2;</command> displays a log stored in Poezio format
+ in a more human-readable way.</para>
+ </refsection>
+
+ <refsection xml:id="poezio_logs-options"><info><title>OPTIONS</title></info>
+ <variablelist>
+ <varlistentry>
+ <term><option>-i</option></term>
+ <term><option>--hide-info</option></term>
+ <listitem><para>Hide info lines</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-t</option></term>
+ <term><option>--hide-time</option></term>
+ <listitem><para>Hide timestamps</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-c</option></term>
+ <term><option>--no-color</option></term>
+ <listitem><para>Remove color</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </refsection>
+
+ <refsection xml:id="poezio_logs-see"><info><title>SEE ALSO</title></info>
+ <simplelist type="inline">
+ <member><citerefentry><refentrytitle>poezio</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
+ </simplelist>
+ </refsection>
+</refentry>
+
+</article>
diff --git a/doc/source/commands.rst b/doc/source/commands.rst
index 64a2f033..83884a6a 100644
--- a/doc/source/commands.rst
+++ b/doc/source/commands.rst
@@ -88,9 +88,10 @@ These commands work in *any* tab.
/win
/w
- **Usage:** ``/win <number>``
+ **Usage:** ``/win <number or string>``
- Go to the specified room.
+ Go to the matching tab. If the argument is a number, it goes to the tab with that number.
+ Otherwise, it goes to the next tab whose name contains the given string.
/status
**Usage:** ``/status <availability> [status message]``
@@ -624,7 +625,7 @@ XML tab commands
Write the content of the XML buffer into a file.
- /reset
+ /filter_reset
Reset the stanza filters.
/filter_id
diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst
index 3f9cd094..8d88a071 100644
--- a/doc/source/configuration.rst
+++ b/doc/source/configuration.rst
@@ -133,7 +133,7 @@ Options related to account configuration, nickname…
**Default value:** ``[empty]``
the nick you will use when joining a room with no associated nick
- If this is empty, the $USER environnement variable will be used
+ If this is empty, the $USER environment variable will be used
server
diff --git a/doc/source/dev/xep.rst b/doc/source/dev/xep.rst
index cb06d2c8..4f9ab31d 100644
--- a/doc/source/dev/xep.rst
+++ b/doc/source/dev/xep.rst
@@ -19,12 +19,20 @@ Table of all XEPs implemented in poezio.
+----------+-------------------------+---------------------+
|0048 |Bookmarks |90% |
+----------+-------------------------+---------------------+
+|0049 |Private XML Storage |100% |
++----------+-------------------------+---------------------+
+|0050 |Ad-Hoc Commands |70% |
++----------+-------------------------+---------------------+
|0054 |vcard-temp |30% |
+----------+-------------------------+---------------------+
+|0060 |Publish-Subscribe |10% |
++----------+-------------------------+---------------------+
|0070 |HTTP Request Verification|~100% |
+----------+-------------------------+---------------------+
|0071 |XHTML-IM |~70% |
+----------+-------------------------+---------------------+
+|0077 |In-Band Registration |50% |
++----------+-------------------------+---------------------+
|0085 |Chat State Notifications |100% |
+----------+-------------------------+---------------------+
|0092 |Software Version |100% |
@@ -37,12 +45,21 @@ Table of all XEPs implemented in poezio.
+----------+-------------------------+---------------------+
|0118 |User Tune |90% |
+----------+-------------------------+---------------------+
+|0163 |Personal Eventing |100% |
+| |Protocol | |
++----------+-------------------------+---------------------+
|0172 |User Nickname |100% |
+----------+-------------------------+---------------------+
+|0175 |Best Practices for Use of|100% |
+| |SASL ANONYMOUS | |
++----------+-------------------------+---------------------+
+|0178 |Best Practices for Use of|100% |
+| |SASL EXTERNAL with | |
+| |Certificates | |
++----------+-------------------------+---------------------+
|0184 |Message Delivery Receipts|100% |
+----------+-------------------------+---------------------+
-|0191 |Simple Communication |95% |
-| |Blocking | |
+|0191 |Blocking Command |95% |
+----------+-------------------------+---------------------+
|0196 |User Gaming |70% |
+----------+-------------------------+---------------------+
@@ -52,6 +69,8 @@ Table of all XEPs implemented in poezio.
+----------+-------------------------+---------------------+
|0202 |Entity time |100% |
+----------+-------------------------+---------------------+
+|0203 |Delayed Delivery |100% |
++----------+-------------------------+---------------------+
|0224 |Attention |100% |
+----------+-------------------------+---------------------+
|0231 |Bits of Binary |30% |
@@ -60,6 +79,10 @@ Table of all XEPs implemented in poezio.
+----------+-------------------------+---------------------+
|0249 |Direct MUC Invitations |90% |
+----------+-------------------------+---------------------+
+|0257 |Client Certificate |100% |
+| |Management for SASL | |
+| |EXTERNAL | |
++----------+-------------------------+---------------------+
|0270 |Compliance Suites 2010 |Advanced Client |
+----------+-------------------------+---------------------+
|0280 |Messsage Carbons |100% |
@@ -67,13 +90,23 @@ Table of all XEPs implemented in poezio.
|0296 |Best Practices for |100% |
| |Resource Locking | |
+----------+-------------------------+---------------------+
+|0297 |Stanza Forwarding |100% |
++----------+-------------------------+---------------------+
|0302 |Compliance Suites 2012 |Advanced Client |
+----------+-------------------------+---------------------+
|0308 |Last Message Correction |100% |
+----------+-------------------------+---------------------+
+|0319 |Last User Interaction In |100% |
+| |Presence | |
++----------+-------------------------+---------------------+
+|0334 |Message Processing Hints |100% |
++----------+-------------------------+---------------------+
|0352 |Client State Indication |100% |
+----------+-------------------------+---------------------+
|0364 |Current OTR Usage |100% |
+----------+-------------------------+---------------------+
+|0375 |Compliance Suites 2016 |Advanced Client + |
+| | |Core Mobile |
++----------+-------------------------+---------------------+
|0378 |OTR Discovery |100% |
+----------+-------------------------+---------------------+
diff --git a/doc/source/images/correct.png b/doc/source/images/correct.png
index ed2ad450..39d9ef87 100644
--- a/doc/source/images/correct.png
+++ b/doc/source/images/correct.png
Binary files differ
diff --git a/doc/source/images/muc.png b/doc/source/images/muc.png
index 8ddfff10..a79e4ac0 100644
--- a/doc/source/images/muc.png
+++ b/doc/source/images/muc.png
Binary files differ
diff --git a/doc/source/images/pep.png b/doc/source/images/pep.png
index 96f5118d..b6444911 100644
--- a/doc/source/images/pep.png
+++ b/doc/source/images/pep.png
Binary files differ
diff --git a/doc/source/images/pep_infos.png b/doc/source/images/pep_infos.png
index df7211d6..170ff910 100644
--- a/doc/source/images/pep_infos.png
+++ b/doc/source/images/pep_infos.png
Binary files differ
diff --git a/doc/source/images/roster.png b/doc/source/images/roster.png
index d1a8f9f4..e599c46d 100644
--- a/doc/source/images/roster.png
+++ b/doc/source/images/roster.png
Binary files differ
diff --git a/doc/source/images/theme_256_colors.png b/doc/source/images/theme_256_colors.png
index 395f3d39..16a4511c 100644
--- a/doc/source/images/theme_256_colors.png
+++ b/doc/source/images/theme_256_colors.png
Binary files differ
diff --git a/doc/source/images/vert_tabs.png b/doc/source/images/vert_tabs.png
index a48a8051..c3b3f06b 100644
--- a/doc/source/images/vert_tabs.png
+++ b/doc/source/images/vert_tabs.png
Binary files differ
diff --git a/doc/source/install.rst b/doc/source/install.rst
index 1f3836ab..cf74b08e 100644
--- a/doc/source/install.rst
+++ b/doc/source/install.rst
@@ -195,6 +195,31 @@ If you did, it should be in the ``$PATH`` as ``poezio``, so run:
poezio
+Docker images
+-------------
+
+poezio is available on the docker hub in the `poezio/poezio`_ repository
+in which ``poezio/poezio:latest`` is the latest built git version, and
+stable versions are tagged with their numbers. The image is based off
+alpine linux and we tried to keep the image size to a minimum (<100MiB).
+
+You can therefore just fetch the images with docker pull:
+
+.. code-block:: bash
+
+ docker pull poezio/poezio
+
+In order to run poezio with non-temporary config and logs, and to have
+the right colors, you have to share the ``TERM`` env var and some directories:
+
+.. code-block:: bash
+
+ docker run -it -e TERM -v ~/.config/poezio:/home/poezio-user/.config/poezio -v ~/.local/share/poezio:/home/poezio-user/.local/share/poezio poezio/poezio
+
+
+If you don’t trust images distributed on the docker hub, you can rebuild the
+image from the Dockerfile at the root of the git repository.
+
.. _stable sources: https://dev.louiz.org/project/poezio/download
.. _slixmpp: https://dev.louiz.org/projects/slixmpp
.. _aiodns: https://github.com/saghul/aiodns
@@ -206,3 +231,4 @@ If you did, it should be in the ``$PATH`` as ``poezio``, so run:
.. _cython: http://cython.org
.. _bgo-overlay: https://bgo.zugaina.org/
.. _port: http://ports.su/net/poezio
+.. _poezio/poezio: https://hub.docker.com/r/poezio/poezio/
diff --git a/doc/source/keys.rst b/doc/source/keys.rst
index 57b8c22e..ae641c26 100644
--- a/doc/source/keys.rst
+++ b/doc/source/keys.rst
@@ -69,7 +69,7 @@ and save it to the clipboard.
**Ctrl-y**: Insert the content of the clipboard at the cursor position.
-**Ctrl-Enter**: Insert a line break. Since the input is only one line,
+**Ctrl-Enter** or **Ctrl-j**: Insert a line break. Since the input is only one line,
the line break is represented by the character ``|`` in it but will be
sent as the real ``\n`` character.
diff --git a/doc/source/theme/static/poezio.png b/doc/source/theme/static/poezio.png
index 6ab506c1..02a7c5eb 100644
--- a/doc/source/theme/static/poezio.png
+++ b/doc/source/theme/static/poezio.png
Binary files differ
diff --git a/doc/stub/potr/context.py b/doc/stub/potr/context.py
index 23ce6efa..65f7826f 100644
--- a/doc/stub/potr/context.py
+++ b/doc/stub/potr/context.py
@@ -2,7 +2,6 @@
class NotEncryptedError: pass
class UnencryptedMessage: pass
class ErrorReceived: pass
-class NotEncryptedError: pass
class NotOTRMessage: pass
STATE_ENCRYPTED, STATE_PLAINTEXT, STATE_FINISHED = 1, 1, 1
class Context: pass
diff --git a/plugins/link.py b/plugins/link.py
index 2c34232c..c8c75918 100644
--- a/plugins/link.py
+++ b/plugins/link.py
@@ -87,7 +87,7 @@ from poezio.xhtml import clean_text
from poezio import common
from poezio import tabs
-url_pattern = re.compile(r'\b(http[s]?://(?:\S+))\b', re.I|re.U)
+url_pattern = re.compile(r'\b(?:http[s]?://(?:\S+))|(?:magnet:\?(?:\S+))\b', re.I|re.U)
app_mapping = {
'Linux': 'xdg-open',
'Darwin': 'open',
diff --git a/plugins/reorder.py b/plugins/reorder.py
index ecab457e..87e87ee6 100644
--- a/plugins/reorder.py
+++ b/plugins/reorder.py
@@ -62,6 +62,7 @@ And finally, the ``[tab name]`` must be:
from poezio import tabs
from poezio.decorators import command_args_parser
from poezio.plugin import BasePlugin
+from poezio.config import config
TEXT_TO_TAB = {
'muc': tabs.MucTab,
@@ -141,10 +142,12 @@ class Plugin(BasePlugin):
old_tabs = self.core.tabs[1:]
roster = self.core.tabs[0]
+ create_gaps = config.get('create_gaps')
+
new_tabs = []
last = 0
for pos in sorted(tabs_spec):
- if pos > last + 1:
+ if create_gaps and pos > last + 1:
new_tabs += [tabs.GapTab(self.core) for i in range(pos - last)]
cls, name = tabs_spec[pos]
tab = self.core.get_tab_by_name(name, typ=cls)
@@ -153,7 +156,8 @@ class Plugin(BasePlugin):
old_tabs.remove(tab)
else:
self.api.information('Tab %s not found' % name, 'Warning')
- new_tabs.append(tabs.GapTab(self.core))
+ if create_gaps:
+ new_tabs.append(tabs.GapTab(self.core))
last = pos
for tab in old_tabs:
diff --git a/plugins/send_delayed.py b/plugins/send_delayed.py
index 299de6e2..7a3ddc60 100644
--- a/plugins/send_delayed.py
+++ b/plugins/send_delayed.py
@@ -38,15 +38,19 @@ class Plugin(BasePlugin):
@command_args_parser.quoted(2)
def command_delayed(self, args):
if args is None:
+ self.core.command.help('send_delayed')
return
delay_str, txt = args
delay = common.parse_str_to_secs(delay_str)
- if not delay_str:
+ if not delay:
+ self.api.information('Failed to parse %s.' % delay_str, 'Error')
return
tab = self.api.current_tab()
timed_event = timed_events.DelayedEvent(delay, self.say, (tab, txt))
self.api.add_timed_event(timed_event)
+ self.api.information('Delayed message will be sent in %ds (%s).'
+ % (delay, delay_str), 'Info')
def completion_delay(self, the_input):
txt = the_input.get_text()
diff --git a/poezio/core/commands.py b/poezio/core/commands.py
index d44a401e..838e08fa 100644
--- a/poezio/core/commands.py
+++ b/poezio/core/commands.py
@@ -7,7 +7,6 @@ import logging
log = logging.getLogger(__name__)
import os
-from datetime import datetime
from xml.etree import cElementTree as ET
from slixmpp.xmlstream.stanzabase import StanzaBase
@@ -198,6 +197,7 @@ class CommandCore:
number = int(name)
except ValueError:
number = -1
+ name = name.lower()
if number != -1 and self.core.current_tab_nb == number:
return
prev_nb = self.core.previous_tab_nb
@@ -212,9 +212,10 @@ class CommandCore:
matchs = []
for tab in self.core.tabs:
for tab_name in tab.matching_names():
- if tab_name[1] and name.lower() in tab_name[1].lower():
+ if tab_name[1] and name in tab_name[1].lower():
matchs.append((tab_name[0], tab))
if not matchs:
+ self.core.previous_tab_nb = prev_nb
return
tab = min(matchs, key=lambda m: m[0])[1]
self.core.current_tab_nb = tab.nb
diff --git a/poezio/core/core.py b/poezio/core/core.py
index d14130c6..35d50b65 100644
--- a/poezio/core/core.py
+++ b/poezio/core/core.py
@@ -1136,7 +1136,7 @@ class Core(object):
"""
def read_next_digit(digit):
try:
- nb = int(digit)
+ int(digit)
except ValueError:
# If it is not a number, we do nothing. If it was the first
# one, we do not wait for a second one by re-setting the
diff --git a/poezio/core/handlers.py b/poezio/core/handlers.py
index 62fc0731..e79e4232 100644
--- a/poezio/core/handlers.py
+++ b/poezio/core/handlers.py
@@ -23,7 +23,6 @@ from poezio import common
from poezio import fixes
from poezio import pep
from poezio import tabs
-from poezio import windows
from poezio import xhtml
from poezio import multiuserchat as muc
from poezio.common import safeJID
diff --git a/poezio/plugin_manager.py b/poezio/plugin_manager.py
index 11584b23..bebf2133 100644
--- a/poezio/plugin_manager.py
+++ b/poezio/plugin_manager.py
@@ -271,9 +271,9 @@ class PluginManager(object):
"""
try:
names = set()
- for path in self.load_path:
+ for path_ in self.load_path:
try:
- add = set(os.listdir(path))
+ add = set(os.listdir(path_))
names |= add
except:
pass
@@ -312,9 +312,9 @@ class PluginManager(object):
if not plugins_conf_dir:
config_home = os.environ.get('XDG_CONFIG_HOME')
if not config_home:
- config_home = os.path.join(os.environ.get('HOME'), '.config')
- plugins_conf_dir = os.path.join(config_home, 'poezio', 'plugins')
- self.plugins_conf_dir = os.path.expanduser(plugins_conf_dir)
+ config_home = path.join(os.environ.get('HOME'), '.config')
+ plugins_conf_dir = path.join(config_home, 'poezio', 'plugins')
+ self.plugins_conf_dir = path.expanduser(plugins_conf_dir)
self.check_create_plugins_conf_dir()
def check_create_plugins_conf_dir(self):
@@ -337,11 +337,11 @@ class PluginManager(object):
"""
plugins_dir = config.get('plugins_dir')
plugins_dir = plugins_dir or\
- os.path.join(os.environ.get('XDG_DATA_HOME') or\
- os.path.join(os.environ.get('HOME'),
+ path.join(os.environ.get('XDG_DATA_HOME') or\
+ path.join(os.environ.get('HOME'),
'.local', 'share'),
'poezio', 'plugins')
- self.plugins_dir = os.path.expanduser(plugins_dir)
+ self.plugins_dir = path.expanduser(plugins_dir)
self.check_create_plugins_dir()
def check_create_plugins_dir(self):
diff --git a/poezio/poezio.py b/poezio/poezio.py
index 784f0553..f841b672 100644
--- a/poezio/poezio.py
+++ b/poezio/poezio.py
@@ -13,7 +13,6 @@ Starting point of poezio. Launches both the Connection and Gui
import sys
import os
import signal
-import logging
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
@@ -75,8 +74,6 @@ def main():
from poezio import core
- log = logging.getLogger('')
-
signal.signal(signal.SIGINT, signal.SIG_IGN) # ignore ctrl-c
cocore = core.Core()
signal.signal(signal.SIGUSR1, cocore.sigusr_handler) # reload the config
diff --git a/poezio/roster.py b/poezio/roster.py
index ac8012cb..89925e07 100644
--- a/poezio/roster.py
+++ b/poezio/roster.py
@@ -244,8 +244,6 @@ class Roster(object):
f.writelines([str(i) + "\n" for i in self.contacts if self[i] and (self[i].subscription == "both" or self[i].ask)])
f.close()
return True
- except IOError:
- return False
except OSError:
return False
diff --git a/poezio/tabs/__init__.py b/poezio/tabs/__init__.py
index e6756088..01f65aa3 100644
--- a/poezio/tabs/__init__.py
+++ b/poezio/tabs/__init__.py
@@ -12,3 +12,9 @@ from poezio.tabs.muclisttab import MucListTab
from poezio.tabs.adhoc_commands_list import AdhocCommandsListTab
from poezio.tabs.data_forms import DataFormsTab
from poezio.tabs.bookmarkstab import BookmarksTab
+
+__all__ = ['Tab', 'ChatTab', 'GapTab', 'OneToOneTab', 'STATE_PRIORITY',
+ 'SHOW_NAME', 'RosterInfoTab', 'MucTab', 'NS_MUC_USER', 'PrivateTab',
+ 'ConfirmTab', 'ConversationTab', 'StaticConversationTab',
+ 'DynamicConversationTab', 'XMLTab', 'ListTab', 'MucListTab',
+ 'AdhocCommandsListTab', 'DataFormsTab', 'BookmarksTab']
diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py
index f6965a75..54b7cabf 100644
--- a/poezio/tabs/muctab.py
+++ b/poezio/tabs/muctab.py
@@ -915,18 +915,14 @@ class MucTab(ChatTab):
"""
self.need_resize = False
if config.get('hide_user_list') or self.size.tab_degrade_x:
- display_user_list = False
text_width = self.width
else:
- display_user_list = True
text_width = (self.width // 10) * 9
if self.size.tab_degrade_y:
- display_info_win = False
tab_win_height = 0
info_win_height = 0
else:
- display_info_win = True
tab_win_height = Tab.tab_win_height()
info_win_height = self.core.information_win_size
diff --git a/poezio/tabs/rostertab.py b/poezio/tabs/rostertab.py
index 7ec9f408..2d311012 100644
--- a/poezio/tabs/rostertab.py
+++ b/poezio/tabs/rostertab.py
@@ -269,8 +269,6 @@ class RosterInfoTab(Tab):
"""
completion for /cert_add <name> <path> [management]
"""
- text = the_input.get_text()
- args = common.shell_split(text)
n = the_input.get_argument_position()
log.debug('%s %s %s', the_input.text, n, the_input.pos)
if n == 1:
@@ -352,8 +350,6 @@ class RosterInfoTab(Tab):
"""
completion for /cert_fetch <name> <path>
"""
- text = the_input.get_text()
- args = common.shell_split(text)
n = the_input.get_argument_position()
log.debug('%s %s %s', the_input.text, n, the_input.pos)
if n == 1:
diff --git a/poezio/tabs/xmltab.py b/poezio/tabs/xmltab.py
index 3fdaffc7..e92df03a 100644
--- a/poezio/tabs/xmltab.py
+++ b/poezio/tabs/xmltab.py
@@ -72,7 +72,7 @@ class XMLTab(Tab):
shortdesc="Close this tab.")
self.register_command('clear', self.command_clear,
shortdesc='Clear the current buffer.')
- self.register_command('reset', self.command_reset,
+ self.register_command('filter_reset', self.command_filter_reset,
shortdesc='Reset the stanza filter.')
self.register_command('filter_id', self.command_filter_id,
usage='<id>',
@@ -154,8 +154,8 @@ class XMLTab(Tab):
self.refresh()
def match_stanza(self, stanza):
- for matcher in self.filters:
- if not matcher.match(stanza):
+ for matcher_ in self.filters:
+ if not matcher_.match(stanza):
return False
return True
@@ -167,7 +167,7 @@ class XMLTab(Tab):
self.refresh()
except Exception as e:
self.core.information('Invalid XML Mask: %s' % e, 'Error')
- self.command_reset('')
+ self.command_filter_reset('')
@command_args_parser.raw
def command_filter_to(self, jid):
@@ -216,11 +216,11 @@ class XMLTab(Tab):
self.refresh()
except:
self.core.information('Invalid XML Path', 'Error')
- self.command_reset('')
+ self.command_filter_reset('')
@command_args_parser.ignored
- def command_reset(self):
- """/reset"""
+ def command_filter_reset(self):
+ """/filter_reset"""
if self.filters:
self.filters = []
self.filtered_buffer.del_window(self.text_win)
diff --git a/poezio/windows/__init__.py b/poezio/windows/__init__.py
index 4b52d803..373349f4 100644
--- a/poezio/windows/__init__.py
+++ b/poezio/windows/__init__.py
@@ -19,3 +19,11 @@ from poezio.windows.muc import UserList, Topic
from poezio.windows.roster_win import RosterWin, ContactInfoWin
from poezio.windows.text_win import TextWin, XMLTextWin
+__all__ = ['Win', 'FormWin', 'BookmarksWin', 'Dialog', 'GlobalInfoBar',
+ 'VerticalGlobalInfoBar', 'InfoWin', 'PrivateInfoWin', 'XMLInfoWin',
+ 'MucListInfoWin', 'ConversationInfoWin', 'MucInfoWin',
+ 'DynamicConversationInfoWin', 'ConversationStatusMessageWin',
+ 'BookmarksInfoWin', 'ConfirmStatusWin', 'HelpText', 'Input',
+ 'HistoryInput', 'MessageInput', 'CommandInput', 'ListWin',
+ 'ColumnHeaderWin', 'VerticalSeparator', 'UserList', 'Topic',
+ 'RosterWin', 'ContactInfoWin', 'TextWin', 'XMLTextWin']
diff --git a/setup.py b/setup.py
index 525436e7..207ec1d3 100755
--- a/setup.py
+++ b/setup.py
@@ -65,7 +65,7 @@ with open('README.rst', encoding='utf-8') as readme_fd:
LONG_DESCRIPTION = readme_fd.read()
setup(name="poezio",
- version="1.0",
+ version="1.0" + version,
description="A console XMPP client",
long_description=LONG_DESCRIPTION,
ext_modules=[module_poopt],
@@ -98,7 +98,9 @@ setup(name="poezio",
package_data={'poezio': ['default_config.cfg']},
scripts=['scripts/poezio_gpg_export', 'scripts/poezio_logs'],
entry_points={'console_scripts': ['poezio = poezio.__main__:run']},
- data_files=([('share/man/man1/', ['data/poezio.1']),
+ data_files=([('share/man/man1/', ['data/poezio.1',
+ 'data/poezio_gpg_export.1',
+ 'data/poezio_logs.1']),
('share/poezio/', ['README.rst', 'COPYING', 'CHANGELOG'])]
+ find_doc('share/doc/poezio/source', 'source')
+ find_doc('share/doc/poezio/html', 'build/html')),