]> kaliko git repositories - sid.git/blobdiff - README.rst
Cleanup/modernize distribution
[sid.git] / README.rst
index 15cc8f64364ad879c9fe5997ce657d534bf83e26..1449a963eb5cca35dba863d80ca89a048cb3c3ab 100644 (file)
@@ -7,61 +7,43 @@ Getting sid
 
 Currently unreleased, only a development version is available.
 
-    http://git.kaliko.me/?p=sid.git
+* http: https://kaliko.me/sid/
+* git: http://git.kaliko.me/?p=sid.git
 
-Getting the latest source code
-------------------------------
-
-If you would instead like to use the latest source code, you can grab a copy
-of the development version from git by running the command:
+Get the source with git::
 
   git clone git://git.kaliko.me/sid.git
 
 
-Installing from source
-----------------------
-
-To install sid from source, simply run the command (within a virtualenv preferably)::
-
-  python3 setup.py install
-
-You can use the `--help` switch to `setup.py` for a complete list of commands
-and their options.  See the `Installing Python Modules`_ document for more details.
-
-
 Using the bot
 -------------
 
 Here is a plain example::
 
-        #!/usr/bin/env python3
-        # -*- coding: utf-8 -*-
+   #!/usr/bin/env python3
+   # -*- coding: utf-8 -*-
 
-        import getpass
-        from sid.sid import MUCBot
-        from sid.ping import Ping
+   import getpass
+   from sid.sid import MUCBot
+   from sid.ping import Ping
 
-        JID = 'bot@example.org'
-        NICK = 'sid'
-        PASS = getpass.getpass('Password for "{}": '.format(JID))
-        ROOM = 'room@conf.example.org'
+   JID = 'bot@example.org'
+   NICK = 'sid'
+   PASS = getpass.getpass('Password for "{}": '.format(JID))
+   ROOM = 'room@conf.example.org'
 
-        xmpp = MUCBot(JID, PASS, ROOM, NICK)
-        xmpp.register_bot_plugin(Ping)
-        # Connect to the XMPP server and start processing XMPP stanzas.
-        if xmpp.connect():
-            xmpp.process(block=True)
-            xmpp.shutdown_plugins()
-            xmpp.log.info('Done')
-        else:
-            xmpp.log.info('Unable to connect.')
+   xmpp = MUCBot(JID, PASS, ROOM, NICK)
+   xmpp.register_bot_plugin(Ping)
+   # Connect to the XMPP server and start processing XMPP stanzas.
+   try:
+       xmpp.connect()
+       xmpp.process()
+   except KeyboardInterrupt:
+       xmpp.shutdown_plugins()
 
 
-Contacting authors
-------------------
+Contacting author
+-----------------
 
 The current maintainer can be found on xmpp chat room <kaliko.me⊘conf.azylum.org>
 or you can contact him by email/xmpp <kaliko⊘azylum.org>.
-
- .. _Installing Python Modules: http://docs.python.org/3/install/
-