]> kaliko git repositories - sid.git/blobdiff - README.rst
Bump version
[sid.git] / README.rst
index 1449a963eb5cca35dba863d80ca89a048cb3c3ab..7b5d4920d0ecb3b9d1a52ecd1c15c1058ad5fbcd 100644 (file)
@@ -5,15 +5,18 @@ sid an xmpp bot
 Getting sid
 ------------
 
-Currently unreleased, only a development version is available.
+Currently unreleased on PyPi_.
 
-* http: https://kaliko.me/sid/
-* git: http://git.kaliko.me/?p=sid.git
+`git tagged` version and `master branch` should be stable though.
 
-Get the source with git::
+* Doc:   https://kaliko.gitlab.io/sid/
+* git:   https://gitlab.com/kaliko/sid.git
+* Issue: https://gitlab.com/kaliko/sid/-/issues
 
-  git clone git://git.kaliko.me/sid.git
 
+Install/update master from git::
+
+  pip install -U git+https://gitlab.com/kaliko/sid.git@master#egg=sid
 
 Using the bot
 -------------
@@ -24,16 +27,26 @@ Here is a plain example::
    # -*- coding: utf-8 -*-
 
    import getpass
+   import logging
    from sid.sid import MUCBot
    from sid.ping import Ping
 
+   logging.basicConfig(level=logging.INFO,
+                       format='%(levelname)-8s %(message)s')
+
    JID = 'bot@example.org'
-   NICK = 'sid'
-   PASS = getpass.getpass('Password for "{}": '.format(JID))
    ROOM = 'room@conf.example.org'
+   # Pay attention: if you join the room with the same account/nick,
+   # For instance with a regular interactive client, the bot will
+   # not answer you, it ignores its own messages for obvious reasons.
+   NICK = 'sid'
+   PASS = getpass.getpass(f'Password for "{JID}": ')
 
+   # Instanciate the bot
    xmpp = MUCBot(JID, PASS, ROOM, NICK)
+   # Register a plugin
    xmpp.register_bot_plugin(Ping)
+
    # Connect to the XMPP server and start processing XMPP stanzas.
    try:
        xmpp.connect()
@@ -47,3 +60,5 @@ 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>.
+
+.. _PyPI: https://pypi.org