Commits

Grigoriy Petukhov committed 21b9107

Changes

Comments (0)

Files changed (5)

 syntax:glob
 *.pyc
 *.pyo
+*.swp
 .ropeproject
 bot.cfg
 .env
 local_settings.py
+xapy/calc.db
 
 syntax:regexp
 ^dist
     $ .env/bin/pip install -r requirements.txt
     $ cp settings_local.py.template settings_local.py
     $ vim settings_local.py
+    $ mkdir var
     $ ./main.py
+#!.env/bin/python
+from time import sleep
+
+from xapy.bot import Bot
+from grab.tools.lock import assert_lock
+
+def main():
+    assert_lock('var/bot.lock')
+
+    bot = Bot()
+    bot.start()
+    try:
+        while bot.is_alive():
+            sleep(0.5)
+    except BaseException, e:
+        print "Stopping bot"
+        bot.stop()
+
+
+if __name__ == '__main__':
+    main()

main.py

-#!.env/bin/python
-from time import sleep
-
-from xapy.bot import Bot
-from grab.tools.lock import assert_lock
-
-def main():
-    assert_lock('var/bot.lock')
-
-    bot = Bot()
-    bot.start()
-    try:
-        while bot.is_alive():
-            sleep(0.5)
-    except BaseException, e:
-        print "Stopping bot"
-        bot.stop()
-
-
-if __name__ == '__main__':
-    main()

settings_local.py

-# -*- coding: utf-8 -*- 
-PROCESSORS_POOL = 3
-GOOGLE_KEY = ''
-KEEPALIVE_TIMEOUT = 300
-PROTOCOL_CLASSES = ['xapy.protocols.jabber.JabberProtocol']
-PROCESSORS = []
-
-CONNECTIONS = [{
-    'name': 'py_logger',
-    'enabled': True,
-    'protocol': 'jabber',
-    'jid': 'grablab@jabber.ru',
-    'name': 'py_logger',
-    'password': 'TaNpfu9TAF',
-    'confs':  [{
-        'jid': 'grablab@conference.jabber.ru',
-        'password': 'asdf',
-        'name': u'ivanbot',
-    }],
-}]
-
-PROCESSORS = [
-    'xapy.processors.chat_log',
-]
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.