]> kaliko git repositories - sid.git/blob - README.rst
feeds: use proper http caching
[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     http://git.kaliko.me/?p=sid.git
11
12 Getting the latest source code
13 ------------------------------
14
15 If you would instead like to use the latest source code, you can grab a copy
16 of the development version from git by running the command:
17
18   git clone git://git.kaliko.me/sid.git
19
20
21 Installing from source
22 ----------------------
23
24 To install sid from source, simply run the command (within a virtualenv preferably)::
25
26   python3 setup.py install
27
28 You can use the `--help` switch to `setup.py` for a complete list of commands
29 and their options.  See the `Installing Python Modules`_ document for more details.
30
31
32 Using the bot
33 -------------
34
35 Here is a plain example::
36
37         #!/usr/bin/env python3
38         # -*- coding: utf-8 -*-
39
40         import getpass
41         from sid.sid import MUCBot
42         from sid.ping import Ping
43
44         JID = 'bot@example.org'
45         NICK = 'sid'
46         PASS = getpass.getpass('Password for "{}": '.format(JID))
47         ROOM = 'room@conf.example.org'
48
49         xmpp = MUCBot(JID, PASS, ROOM, NICK)
50         xmpp.register_bot_plugin(Ping)
51         # Connect to the XMPP server and start processing XMPP stanzas.
52         if xmpp.connect():
53             xmpp.process(block=True)
54             xmpp.shutdown_plugins()
55             xmpp.log.info('Done')
56         else:
57             xmpp.log.info('Unable to connect.')
58
59
60 Contacting authors
61 ------------------
62
63 The current maintainer can be found on xmpp chat room <kaliko.me⊘conf.azylum.org>
64 or you can contact him by email/xmpp <kaliko⊘azylum.org>.
65
66  .. _Installing Python Modules: http://docs.python.org/3/install/
67