aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: e23af58cebf4f5347137e8f8a35e132e3158363e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# radiodiodibot

### Description
A Telegram bot to forward messages in a specified Telegram channel to a shoutbox API and vice versa.

### Dependencies
* requests
* telepot

### Installation
1) _radiodiodibot_ is built on Python 3. You can install the dependencies using pip:  
```
$ pip install -r requirements.txt
```

2) Configure `bot.config` like so:
```
[GENERAL]
TelegramBotToken=<YOUR_BOT_TOKEN>
ShoutboxApiUrl=<YOUR_API_URL>
TelegramChatID=<TELEGRAM_CHAT_ID>
ApiCallInterval=<UPDATE_INTERVAL_IN_SECONDS>
ApiAuthToken=<SHOUTBOX_API_AUTH_TOKEN>

[UPTIME]
Port=<UPTIME_SERVICE_PORT>
```

3) Done!

### Usage  
Run _radiodiodibot_ like so:  
`./radiodiodibot` or `python radiodiodibot`  
Use the _-v_ flag for verbose output.
_radiodiodibot_ logs all its output both to the console and the file _output.log_.

### Specification
_radiodiodibot_ communicates with the shoutbox with the following json format:
```
[
  {
    "id": "unique message id",
    "user": "user name",
    "text": "message body",
    "timestamp": "time when message was received",
    "ip": "IP address of the shoutbox user for moderation purposes"
  }
]
```

Copyright: Jan Tuomi 2016