Commit 7650591c authored by Maxime Buquet's avatar Maxime Buquet

Merge branch 'integrate-sphinx-manpages' into 'master'

Integrate sphinx manpages

See merge request poezio/poezio!141
parents fe9992e3 887ab279
...@@ -23,6 +23,8 @@ https://dev.louiz.org/projects/poezio/roadmap ...@@ -23,6 +23,8 @@ https://dev.louiz.org/projects/poezio/roadmap
- Fix marquee and dice plugin to use newer Last Message Correction format. - Fix marquee and dice plugin to use newer Last Message Correction format.
- Bookmarks tab properly displays bookmarks method (local/remote) and allows - Bookmarks tab properly displays bookmarks method (local/remote) and allows
to switch between them again. to switch between them again.
- Updated manpages and added manpages built from the doc in the setup process.
Packagers need to run setup.py build_man to have them built.
# Forgotten additions # Forgotten additions
......
.\" Copyright 2010 Le Coz Florent .\" Copyright 2010 Le Coz Florent
.\" This man page is distributed under the GPLv3 license. .\" This man page is distributed under the GPLv3 license.
.\" See COPYING file .\" See COPYING file
.TH "Poezio" "1" "September 26, 2011" "Poezio dev team" "" .TH "Poezio" "1" "May 31, 2020" "Poezio dev team" ""
.SH "NAME" .SH "NAME"
Poezio \- a ncurses jabber client written in python3 Poezio \- a ncurses jabber client written in python
.SH "SYNOPSIS" .SH "SYNOPSIS"
.B poezio [\-f \fICONFIG_FILE\fR] [\-d \fIDEBUG_FILE\fR] [\-h] .B poezio [\-f \fICONFIG_FILE\fR] [\-d \fIDEBUG_FILE\fR] [\-h]
.SH "DESCRIPTION" .SH "DESCRIPTION"
.B Poezio .B Poezio
is a console jabber (XMPP) client written in Python and using ncurses to draw its interface. It aims at being similar to the most famous IRC clients, like weechat or irssi. The keyboard shortcuts are inspired from emacs. For more information on XMPP see http://xmpp.org and on Poezio see https://poez.io is a console jabber (XMPP) client written in Python and using ncurses to draw its interface. It aims at being similar to the most famous IRC clients, like weechat or irssi. Some keyboard shortcuts are inspired from emacs. For more information on XMPP see http://xmpp.org and on Poezio see https://poez.io
.PP .PP
.SH "OPTIONS" .SH "OPTIONS"
.TP .TP
\fB\-f\fR, \fB\-\-file \fICONFIG_FILE\fR \fB\-f\fR, \fB\-\-file \fICONFIG_FILE\fR
Run poezio using \fICONFIG_FILE\fR as the config file instead of ~/.config/poezio/poezio.cfg Run poezio using \fICONFIG_FILE\fR as the config file instead of ~/.config/poezio/poezio.cfg.
.TP .TP
\fB\-d\fR, \fB\-\-debug \fIDEBUG_FILE\fR \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 debugging. Log debug from both poezio and slixmpp in \fIDEBUG_FILE\fR. Debug contains incoming and outgoing stanzas in addition to various message helping poezio's debugging.
.TP .TP
\fB\-h\fR \fB\-c\fR, \fB\-\-check\-config\fR
Display an help message Display the list of modified/unmodified config options, with their changes from the default.
.TP
\fB\-h\fR, \fB\-\-help\fR
Display the poezio help message.
.SH "BASICS"
The following sections will give you a short overview on how to use poezio. Poezio has many more options, commands and key bindings, please refer to \fIpoezio.cfg(7)\fR, \fIpoezio.commands(7)\fR, \fIpoezio.keys(7)\fR or the full documentation which should have been provided alongside the source code, or check it online at https://doc.poez.io/.
.SH "TABS" A \fItab\fR, in Poezio, is the base structure of the interface. A tab may contains one or more \fIwindows\fR, the main types are:
A \fItab\fR, in Poezio, is the base structure of the interface. A tab may contains one or more \fIwindows\fR, and can be of different types:
.RS .RS
.TP 6 .TP 6
.I Roster \fRtab .I Roster \fRtab
It contains a list of your contacts on the left, as well as an info window on the right. It contains a browsable list of your contacts on the left, as well as an info window on the right.
.TP .TP
.I MUC \fRtab .I Chatroom \fRtab
MUC stands for "Multi-User Chat". This tab displays the contents of a multi-user chat.
.TP .TP
.I Conversation \fRtab .I Conversation \fRtab
It is used for one-to-one communication, usually when using a real Jabber account. It is used for one-to-one communication, usually when using a real Jabber account.
.TP
.I Private \fRtab
It is used to privately communicate with someone in a MUC.
.SH "KEY BINDINGS" .SH "KEY BINDINGS"
While most of the keyboard shortcuts are common to all types of tabs, some of them are tab-specific. While most of the keyboard shortcuts are common to all types of tabs, some of them are tab-specific.
.SS Text edition .SS Text edition
These shortcuts work in any kind of tab; most of them are identical to emacs' ones. These shortcuts work in any kind of tab; most of them are identical to emacs' ones.
.RS .RS
.TP 8 .TP 8
...@@ -146,9 +149,6 @@ The opposite of \fI/accept\fR. ...@@ -146,9 +149,6 @@ The opposite of \fI/accept\fR.
.SS MUC-specific commands .SS MUC-specific commands
.RS .RS
.TP 5 .TP 5
.B /recolor
Change the color of the nicknames in the conversation. Useful when a few people are talking and their random color happen to be the same: using this command will let you differentiate them more easily.
.TP
.B /kick <user> .B /kick <user>
Kick the specified user from the room. Kick the specified user from the room.
.TP .TP
...@@ -165,7 +165,7 @@ View or change the topic of the room. ...@@ -165,7 +165,7 @@ View or change the topic of the room.
Talk privately with the specified participant. Talk privately with the specified participant.
.TP .TP
.B /part .B /part
Leave the current room. Leave the current room.
.SH "BUGS" .SH "BUGS"
Sure. Sure.
...@@ -174,8 +174,8 @@ Sure. ...@@ -174,8 +174,8 @@ Sure.
If you're using a terminal multiplexer such as \fIscreen\fR or \fItmux\fR, it may be setting $TERM to "screen", which breaks 256-color support. Consider setting your $TERM to something like "screen-256color". If you're using a terminal multiplexer such as \fIscreen\fR or \fItmux\fR, it may be setting $TERM to "screen", which breaks 256-color support. Consider setting your $TERM to something like "screen-256color".
.SH "FEEDBACK" .SH "FEEDBACK"
You are encouraged to report bugs or feature requests on https://dev.louiz.org/projects/poezio. You are encouraged to report bugs or feature requests on https://lab.louiz.org/poezio/poezio.
You can also find us on the Jabber chatroom poezio@muc.poez.io You can also find us on the Jabber chatroom xmpp:poezio@muc.poez.io?join
.SH "AUTHORS" .SH "AUTHORS"
Written by Florent Le Coz <louiz@louiz.org> Written by Florent Le Coz <louiz@louiz.org>
......
#!/usr/bin/env python3 #!/usr/bin/env python3
import os
import subprocess
import sys
from tempfile import TemporaryFile
try: try:
from setuptools import setup, Extension from setuptools import setup, Extension
except ImportError: except ImportError:
print('\nSetuptools was not found. Install setuptools for python 3.\n') print('\nSetuptools was not found. Install setuptools for python 3.\n')
import sys
sys.exit(1) sys.exit(1)
import os cmdclass = {}
import subprocess try:
from tempfile import TemporaryFile from sphinx.setup_command import BuildDoc
cmdclass = {'build_man': BuildDoc}
except ImportError:
print('\nSphinx not found, the build_man command will be unavailable.\n')
current_dir = os.path.dirname(__file__) current_dir = os.path.dirname(__file__)
...@@ -57,8 +63,30 @@ def check_include(library_name, header): ...@@ -57,8 +63,30 @@ def check_include(library_name, header):
print('%s headers not found.' % library_name) print('%s headers not found.' % library_name)
return False return False
def sphinx_man():
expected_sphinx_files = [
'build/sphinx/man/poezio.cfg.7',
'build/sphinx/man/poezio.keys.7',
'build/sphinx/man/poezio.commands.7'
]
found = []
for item in expected_sphinx_files:
if os.path.exists(item):
found.append(item)
if found:
return [('share/man/man7/', found)]
return []
sphinx_files_found = sphinx_man()
if not sphinx_files_found:
print(
'\nSphinx-built manpages not found. Only the '
'short handwritten manpages will be installed\n'
)
if not check_include('python3', 'Python.h'): if not check_include('python3', 'Python.h'):
import sys
sys.exit(2) sys.exit(2)
module_poopt = Extension('poezio.poopt', module_poopt = Extension('poezio.poopt',
...@@ -88,52 +116,63 @@ else: ...@@ -88,52 +116,63 @@ else:
with open('README.rst', encoding='utf-8') as readme_fd: with open('README.rst', encoding='utf-8') as readme_fd:
LONG_DESCRIPTION = readme_fd.read() LONG_DESCRIPTION = readme_fd.read()
setup(name="poezio", setup(
version="0.14" + version, name="poezio",
description="A console XMPP client", version="0.14" + version,
long_description=LONG_DESCRIPTION, description="A console XMPP client",
ext_modules=[module_poopt], long_description=LONG_DESCRIPTION,
url='https://poez.io/', ext_modules=[module_poopt],
license='zlib', url='https://poez.io/',
download_url='https://dev.louiz.org/projects/poezio/files', license='zlib',
download_url='https://dev.louiz.org/projects/poezio/files',
author='Florent Le Coz',
author_email='louiz@louiz.org', author='Florent Le Coz',
author_email='louiz@louiz.org',
maintainer='Mathieu Pasquet',
maintainer_email='mathieui@mathieui.net', maintainer='Mathieu Pasquet',
maintainer_email='mathieui@mathieui.net',
classifiers=['Development Status :: 5 - Production/Stable',
'Topic :: Communications :: Chat', classifiers=['Development Status :: 5 - Production/Stable',
'Topic :: Internet :: XMPP', 'Topic :: Communications :: Chat',
'Environment :: Console :: Curses', 'Topic :: Internet :: XMPP',
'Intended Audience :: End Users/Desktop', 'Environment :: Console :: Curses',
'License :: OSI Approved :: zlib/libpng License', 'Intended Audience :: End Users/Desktop',
'Natural Language :: English', 'License :: OSI Approved :: zlib/libpng License',
'Operating System :: Unix', 'Natural Language :: English',
'Programming Language :: Python :: 3.8', 'Operating System :: Unix',
'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3 :: Only'], 'Programming Language :: Python :: 3.7',
keywords=['jabber', 'xmpp', 'client', 'chat', 'im', 'console'], 'Programming Language :: Python :: 3 :: Only'],
packages=['poezio', 'poezio.core', 'poezio.tabs', 'poezio.windows', keywords=['jabber', 'xmpp', 'client', 'chat', 'im', 'console'],
'poezio.ui', 'poezio_plugins', 'poezio_themes'], packages=['poezio', 'poezio.core', 'poezio.tabs', 'poezio.windows',
package_dir={'poezio': 'poezio', 'poezio.ui', 'poezio_plugins', 'poezio_themes'],
'poezio_plugins': 'plugins', package_dir={'poezio': 'poezio',
'poezio_themes': 'data/themes'}, 'poezio_plugins': 'plugins',
package_data={'poezio': ['default_config.cfg']}, 'poezio_themes': 'data/themes'},
scripts=['scripts/poezio_logs'], package_data={'poezio': ['default_config.cfg']},
entry_points={'console_scripts': ['poezio = poezio.__main__:run']}, scripts=['scripts/poezio_logs'],
data_files=([('share/man/man1/', ['data/poezio.1', entry_points={'console_scripts': ['poezio = poezio.__main__:run']},
'data/poezio_logs.1']), data_files=([
('share/poezio/', ['README.rst', 'COPYING', 'CHANGELOG']), ('share/man/man1/', ['data/poezio.1', 'data/poezio_logs.1']),
('share/applications/', ['data/io.poez.Poezio.desktop']), ('share/poezio/', ['README.rst', 'COPYING', 'CHANGELOG']),
('share/metainfo/', ['data/io.poez.Poezio.appdata.xml'])] ('share/applications/', ['data/io.poez.Poezio.desktop']),
+ find_doc('share/doc/poezio/source', 'source') ('share/metainfo/', ['data/io.poez.Poezio.appdata.xml'])
+ find_doc('share/doc/poezio/html', 'build/html')), ]
install_requires=['slixmpp>=1.5.2', 'aiodns', 'pyasn1_modules', 'pyasn1'], + find_doc('share/doc/poezio/source', 'source')
extras_require={'OTR plugin': 'python-potr>=1.0', + find_doc('share/doc/poezio/html', 'build/html')
'Screen autoaway plugin': 'pyinotify==0.9.4', + sphinx_files_found
'Avoiding cython': 'cffi'}) ),
install_requires=['slixmpp>=1.5.2', 'aiodns', 'pyasn1_modules', 'pyasn1'],
extras_require={'OTR plugin': 'python-potr>=1.0',
'Screen autoaway plugin': 'pyinotify==0.9.4',
'Avoiding cython': 'cffi'},
cmdclass=cmdclass,
command_options={
'build_man' : {
'builder': ('setup.py', 'man'),
}
},
)
# Remove the link afterwards # Remove the link afterwards
if (os.path.exists(os.path.join(current_dir, 'poezio', 'default_config.cfg')) and if (os.path.exists(os.path.join(current_dir, 'poezio', 'default_config.cfg')) and
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment