README.md (2507B)
1 # TG-Slack-Syncbot 2 3 This Bot is aiming to replace th hangoutbot in terms of Sync between Telegram and Slack. It also aims to be as modifyable as the hangoutsbot. 4 Currently it is still Work in Progress 5 6 # How to Install 7 8 ## Docker 9 10 ``` 11 git clone <repository url> 12 cd <repository name> 13 docker build -t tg_sync/tg_sync . 14 docker run -it -d -v $(pwd):/app tg_sync/tg_sync 15 ``` 16 17 ## Preparing your Environment 18 19 **install python 3.4 from source** 20 ``` 21 wget https://www.python.org/ftp/python/3.4.2/Python-3.4.2.tgz 22 tar xvf Python-3.4.2.tgz 23 cd Python-3.4.2 24 ./configure 25 make 26 make test 27 sudo make install 28 ``` 29 30 **git clone the repository** 31 ``` 32 git clone <repository url> 33 ``` 34 35 **install dependencies** 36 ``` 37 pip3 install -r requirements.txt 38 ``` 39 40 ## First-Run 41 42 You need to **run the bot for the first time**. You will need at least 43 a TG Bot API Key and a Slack Bot API Key. 44 45 The basic syntax for running the bot (assuming you are in the root 46 of the cloned repository) is: 47 ``` 48 python3 bot.py 49 ``` 50 51 If you are having problems starting the bot, appending a `-d` at the 52 end will dump more details into the bot logs e.g. 53 `python3 bot.py -d` - more configuration 54 directives can be found at the end of the README file. 55 56 To quit the bot from the console, press CTRL-C <--- BROKEN just kill it 57 58 ## Initial Configuration 59 60 DO NOT EDIT the `config.json` supplied with the bot. It is the 61 reference file used to generate the actual config file, which 62 is located elsewhere. Please see the next section on 63 **Additional Configuration** to get the location of the 64 actual configuration file if you need to edit it manually. 65 66 You will need to add your actual Telegram and Slack User as a bot administrator. 67 68 This will be accomplished using the supplied **starter** plugin with 69 the default supplied configuration. 70 71 WORK IN PROGRESS 72 73 ## Additional Configuration 74 75 After the first successful run of the bot, it should generate a 76 `config.json` inside the `config` directory. 77 78 You can edit this file and restart the bot to load any new configs. 79 80 For further information, please see the wiki. 81 82 ## Troubleshooting 83 84 * For console output when the bot is starting, errors messages always 85 start in ALLCAPS e.g. "EXCEPTION in ..." 86 * Additional logs can be found in: 87 `config/TG-SL_bot.log` - 88 note: this file is more useful for developers and may be quite verbose 89 * You can verify the location of your active `config.json` by sending 90 the following command to the bot via hangouts: `/bot files` (with 91 the **starter** plugin active)