]> kaliko git repositories - sid.git/blob - README.rst
doc: Update README
[sid.git] / README.rst
1 ===============
2 sid an xmpp bot
3 ===============
4
5 Getting sid
6 ------------
7
8 Currently unreleased, only a development version is available.
9
10 * doc: https://kaliko.gitlab.io/sid/
11 * git: https://gitlab.com/kaliko/sid.git
12 * issue: https://gitlab.com/kaliko/sid/-/issues
13
14 Get the source with git::
15
16   git clone git://git.kaliko.me/sid.git
17
18
19 Using the bot
20 -------------
21
22 Here is a plain example::
23
24    #!/usr/bin/env python3
25    # -*- coding: utf-8 -*-
26
27    import getpass
28    from sid.sid import MUCBot
29    from sid.ping import Ping
30
31    JID = 'bot@example.org'
32    NICK = 'sid'
33    PASS = getpass.getpass(f'Password for "{JID}": ')
34    ROOM = 'room@conf.example.org'
35
36    # Instanciate the bot
37    xmpp = MUCBot(JID, PASS, ROOM, NICK)
38    # Register a plugin
39    xmpp.register_bot_plugin(Ping)
40
41    # Connect to the XMPP server and start processing XMPP stanzas.
42    try:
43        xmpp.connect()
44        xmpp.process()
45    except KeyboardInterrupt:
46        xmpp.shutdown_plugins()
47
48
49 Contacting author
50 -----------------
51
52 The current maintainer can be found on xmpp chat room <kaliko.me⊘conf.azylum.org>
53 or you can contact him by email/xmpp <kaliko⊘azylum.org>.