| 1 |
Gitter Backend |
| 2 |
============== |
| 3 |
|
| 4 |
This is a backend for `Gitter <http://gitter.im>`_ for errbot. |
| 5 |
The source code is hosted on `github <https://github.com/errbotio/err-backend-gitter>`_. |
| 6 |
|
| 7 |
.. image:: https://raw.githubusercontent.com/errbotio/err-backend-gitter/master/screenshot.png |
| 8 |
:width: 586px |
| 9 |
:height: 330px |
| 10 |
:scale: 75% |
| 11 |
:alt: Gitter backend screenshot |
| 12 |
|
| 13 |
Requirements |
| 14 |
------------ |
| 15 |
|
| 16 |
- A github account to be used by the bot. |
| 17 |
- The client id and client secret, received when `authorising <https://developer.gitter.im/docs/authentication>`_ the bot as gitter application or a personal access token. |
| 18 |
|
| 19 |
Installation |
| 20 |
------------ |
| 21 |
|
| 22 |
Checkout the backend using git: |
| 23 |
|
| 24 |
.. code:: |
| 25 |
|
| 26 |
git checkout https://github.com/errbotio/err-backend-gitter |
| 27 |
|
| 28 |
Edit errbot's configuration file (`config.py`) and set the backend and backend directory variables: |
| 29 |
|
| 30 |
.. code:: |
| 31 |
|
| 32 |
BACKEND = 'Gitter' |
| 33 |
BOT_EXTRA_BACKEND_DIR = '/path_to/backend' |
| 34 |
|
| 35 |
Authentication |
| 36 |
-------------- |
| 37 |
From there you have can either add an application or use a personal token from a user reserved to the bot. |
| 38 |
|
| 39 |
Adding an application, workflow for auth |
| 40 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 41 |
1. pip install bottle requests |
| 42 |
2. execute the script: `./oauth.py`` and it will guide you |
| 43 |
|
| 44 |
Adding as a real user |
| 45 |
~~~~~~~~~~~~~~~~~~~~~ |
| 46 |
1. authenticate as the bot user (new incognito window helps ;) ) |
| 47 |
2. go visit https://developer.gitter.im/apps |
| 48 |
3. use directly the token like this in you config.py |
| 49 |
|
| 50 |
.. code:: |
| 51 |
|
| 52 |
BOT_IDENTITY = { |
| 53 |
'token' : '54537fa855b9a7bbbbbbbbbc568ea7c069d8c34d' |
| 54 |
} |
| 55 |
|
| 56 |
Contributing |
| 57 |
------------ |
| 58 |
1. Fork it! |
| 59 |
2. Create your feature branch: `git checkout -b my-new-feature`` |
| 60 |
3. Commit your changes: ``git commit -am 'Add some feature'`` |
| 61 |
4. Push to the branch: ``git push origin my-new-feature`` |
| 62 |
5. Submit a pull request :D |