]> kaliko git repositories - sid.git/blob - README.rst
Bump version
[sid.git] / README.rst
1 ===============
2 sid an xmpp bot
3 ===============
4
5 Getting sid
6 ------------
7
8 Currently unreleased on PyPi_.
9
10 `git tagged` version and `master branch` should be stable though.
11
12 * Doc:   https://kaliko.gitlab.io/sid/
13 * git:   https://gitlab.com/kaliko/sid.git
14 * Issue: https://gitlab.com/kaliko/sid/-/issues
15
16
17 Get the source with git::
18
19   git clone git://git.kaliko.me/sid.git
20
21 Install/update master from git::
22
23   pip install -U git+https://gitlab.com/kaliko/sid.git@master#egg=sid
24
25 Using the bot
26 -------------
27
28 Here is a plain example::
29
30    #!/usr/bin/env python3
31    # -*- coding: utf-8 -*-
32
33    import getpass
34    from sid.sid import MUCBot
35    from sid.ping import Ping
36
37    JID = 'bot@example.org'
38    ROOM = 'room@conf.example.org'
39    # Pay attention: if you join the room with the same account/nick,
40    # For instance with a regular interactive client, the bot will
41    # not answer you, it ignores its own messages for obvious reasons.
42    NICK = 'sid'
43    PASS = getpass.getpass(f'Password for "{JID}": ')
44
45    # Instanciate the bot
46    xmpp = MUCBot(JID, PASS, ROOM, NICK)
47    # Register a plugin
48    xmpp.register_bot_plugin(Ping)
49
50    # Connect to the XMPP server and start processing XMPP stanzas.
51    try:
52        xmpp.connect()
53        xmpp.process()
54    except KeyboardInterrupt:
55        xmpp.shutdown_plugins()
56
57
58 Contacting author
59 -----------------
60
61 The current maintainer can be found on xmpp chat room <kaliko.me⊘conf.azylum.org>
62 or you can contact him by email/xmpp <kaliko⊘azylum.org>.
63
64 .. _PyPI: https://pypi.org