]> git.0d.be Git - botaradio.git/blob - README.md
Merge pull request #70 from ghost/Buginit-config-channel-1
[botaradio.git] / README.md
1 # botamusique
2
3 Botamusique is a mumble bot who plays music on a mumble channel.
4 Predicted functionalities will be those people would expect from any classic music player.
5
6 botamusique can play:
7 - Radio stations from url
8 - Radio stations from http://www.radio-browser.info API (query from > 24k stations)
9 - Youtube/Soundcloud URL (everything supported by youtube-dl)
10 - Music in local folders (which can be uploaded through a web interface)
11
12 -----
13 ## Menu
14 1. [Web Interface](#web-interface)
15 2. [Installation](#installation)
16 3. [Update](#udpate)
17 4. [Generate a certificate](#optional-generate-a-certificate)
18 5. [Starting the bot](#starting-the-bot)
19 6. [Custom commands](#custom-commands)
20 7. [Known issues](#known-issues)
21 8. [Contributors](#contributors)
22
23
24 ### Web interface
25 **Disabled by default.** You need to enable it in `configuration.ini`.
26 It works, and we are still making it better.
27
28 You need to create a folder for all your songs. Organize your songs by subfolder.
29 The main folder needs to be set in `configuration.ini` (with a '/' at the end).
30
31 ### Installation
32 1. You need python3 with opuslib and protobuf (look at the requirement of pymumble).
33 2. The Bot uses ffmpeg, so you know what you have to do if ffmpeg isn't in your package manager. I personally use [this repository](http://repozytorium.mati75.eu/) on my raspberry.
34
35 To install botamusique (**recommended**, stable and with build-in auto-update support):
36 ```
37 curl -Lo botamusique.tar.gz https://azlux.fr/botamusique/sources.tar.gz
38 tar -xzf botamusique.tar.gz
39 cd botamusique
40 python3 -m venv venv
41 venv/bin/pip install wheel
42 venv/bin/pip install -r requirements.txt
43 ```
44
45 For the version of the master branch, you can use Git installation commands (no build-in auto-update support):
46 ```
47 apt install python3-venv ffmpeg libjpeg-dev zlibc zlib1g zlib1g-dev
48 git clone --recurse-submodules https://github.com/azlux/botamusique.git
49 cd botamusique
50 python3 -m venv venv
51 venv/bin/pip install wheel
52 venv/bin/pip install -r requirements.txt
53 ```
54
55 ### Update
56 If using the recommended install, you can send `!update` to the bot (command by default).
57
58 If using git, you need to update manually:
59 ```
60 git pull --all
61 git submodule update
62 venv/bin/pip install --upgrade -r requirements.txt
63 ```
64
65
66 ### (Optional) Generate a certificate
67 `$ openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout botamusique.pem -out botamusique.pem -subj "/CN=botamusique"`
68
69 ### Starting the bot
70 `$ venv/bin/python mumbleBot.py -s HOST -u BOTNAME -P PASSWORD -p PORT -c CHANNEL -C /path/to/botamusique.pem`
71
72 The bot listens the 8181 port so you should properly set the forwarding rules in you NAT configuration to let other peoples access the web interface. (DISABLED)
73
74 If you want information about autoStart and auto-Restart the bot, [you can have help on the wiki.](https://github.com/azlux/botamusique/wiki/AutoStart---AutoRestart)
75
76 ### Configuration
77 You can copy the file `configuration.default.ini` into `configuration.ini` and customize all variable. Everything can be changed but don't remove the default file.
78
79 Sections explained:
80 - `server`: configuration about the server and bot name. This is overridden by the `./mumbleBot.py` parameters.
81 - `bot`: basic configuration of the bot, eg. comment, folder, default volume, etc.
82 - `webinterface`: basic configuration about the interface (disabled by default)
83 - `command`: you can customize the command you want for each action (if you put `help = helpme` , the bot will respond to `!helpme` )
84 - `radio`: here you can provide a list of default radio ( I can play a jazz radio with the command `!radio jazz`)
85 - `strings`: you can customize all string the bot can say.
86 - `debug`: option to activate ffmpeg or pymumble debug. (Can be very verbose)
87
88 ### Known Issues
89
90 During installation, you may encounter the following error:
91 ```
92 ImportError: libtiff.so.5: cannot open shared object file: No such file or directory
93 ```
94 You need to install a missing library: `apt install libtiff5`
95
96 ---
97
98 In the beginning, you may encounter the following error even if you have installed all requirements:
99 ```
100 Exception: Could not find opus library. Make sure it is installed.
101 ```
102 You need to install the opus codec (not embedded in all system): `apt install libopus0`
103
104 ### Contributors
105 If you want to participate, You're welcome to fork and submit pull requests (fixes and new features).
106
107 The following people joined the collaborators for a faster development, big thanks:
108 - @slipenbois
109 - @mertkutay
110
111 Feel free to ask me if you want to help actively without using pull requests.