X-Git-Url: http://git.kaliko.me/?p=sid.git;a=blobdiff_plain;f=README.rst;h=1449a963eb5cca35dba863d80ca89a048cb3c3ab;hp=15cc8f64364ad879c9fe5997ce657d534bf83e26;hb=a6de5443ea8f067023c94b97b405560f92cbd765;hpb=fc1ed37fe65aa46c7dce71c7fe22cd6e47bf5a10 diff --git a/README.rst b/README.rst index 15cc8f6..1449a96 100644 --- a/README.rst +++ b/README.rst @@ -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 or you can contact him by email/xmpp . - - .. _Installing Python Modules: http://docs.python.org/3/install/ -