Language fixes and improvements

This commit is contained in:
Lartza 2018-06-18 13:22:43 +03:00
parent 995d5f52e4
commit cf9d56ada7
4 changed files with 15 additions and 15 deletions

View File

@ -3,7 +3,7 @@
====== ======
Botamusique is a mumble bot which goal is to allow users to listen music together with its audio output. Botamusique is a mumble bot which goal is to allow users to listen music together with its audio output.
Predicted functionnalities will be the one you could expect from any classic music player. Predicted functionalities will be ones you could expect from any classic music player.
Bot the can play : Bot the can play :
- Radio url - Radio url
@ -14,11 +14,11 @@ Bot the can play :
* Disable * I need to work on it. Since I use this bot for radio, youtube/soundcloud and folder music, the web interace isn't ready. * Disable * I need to work on it. Since I use this bot for radio, youtube/soundcloud and folder music, the web interace isn't ready.
You need to create a folder for all your music. Organize your music by subfolder. You need to create a folder for all your music. Organize your music by subfolder.
The main folder need to be declare into the config (with a '/' at the end) The main folder needs to be declared in the config (with a '/' at the end)
#### Installation #### Installation
1. You need python 3 with opuslib and protobuf (look at the requirement of pymumble) 1. You need python 3 with opuslib and protobuf (look at the requirement of pymumble)
2. The Bot use ffmpeg, so you know what you have to do if ffmpeg aren't in your package manager. I personally use [this repository](http://repozytorium.mati75.eu/) on my raspberry. 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.
commands (don't forget the sudo mode): commands (don't forget the sudo mode):
``` ```
@ -41,7 +41,7 @@ You can copy the file `configuration.default.ini` to `configuration.ini` and cus
you have the section : you have the section :
- bot : basic configuration of the bot : comment, folder, volume at start .... - bot : basic configuration of the bot : comment, folder, volume at start ....
- command : you can customize the command you want for each action (if you put `help = helpme` , the bot will response to `!helpme` ) - command : you can customize the command you want for each action (if you put `help = helpme` , the bot will response to `!helpme` )
- readio : here you can have a list of default radio ( I can play a jazz radio with the command `!radio jazz`) - radio : here you can have a list of default radio ( I can play a jazz radio with the command `!radio jazz`)
- strings : you can customize all string the bot can say. - strings : you can customize all string the bot can say.

View File

@ -5,7 +5,7 @@ admin = User1;User2; # Allow user to kill the bot
music_folder = /home/azlux/botamusique/music_folder/ music_folder = /home/azlux/botamusique/music_folder/
tmp_folder = /tmp/ tmp_folder = /tmp/
# in Mo, 0 for no cache, -1 for illimited size # in MB, 0 for no cache, -1 for unlimited size
tmp_folder_max_size = 10 tmp_folder_max_size = 10
ignored_folders = tmp ignored_folders = tmp
@ -46,9 +46,9 @@ change_volume = volume : %d%% by %s
bad_command = Incorrect command bad_command = Incorrect command
not_admin = You are not an admin ! not_admin = You are not an admin !
not_playing = No music right now not_playing = No music right now
bad_file = Bad file asked bad_file = Bad file requested
no_file = Not file here no_file = File not found
bad_url = Bad URL asked bad_url = Bad URL requested
multiple_matches = Track not found! Possible candidates: multiple_matches = Track not found! Possible candidates:
queue_contents = The next items in the queue are: queue_contents = The next items in the queue are:
queue_empty = No more music in the playlist! queue_empty = No more music in the playlist!

View File

@ -65,7 +65,7 @@ def get_radio_title(url):
return title.decode() return title.decode()
except (urllib.error.URLError, urllib.error.HTTPError): except (urllib.error.URLError, urllib.error.HTTPError):
pass pass
return 'Impossible to get the music title' return 'Unable to get the music title'
def get_url(string): def get_url(string):

View File

@ -87,7 +87,7 @@ class MumbleBot:
self.loop() self.loop()
def ctrl_caught(self, signal, frame): def ctrl_caught(self, signal, frame):
logging.info("\ndeconnection asked") logging.info("\nSIGINT caught, quitting")
self.exit = True self.exit = True
self.stop() self.stop()
if self.nb_exit > 1: if self.nb_exit > 1:
@ -371,11 +371,11 @@ if __name__ == '__main__':
parser.add_argument("-q", "--quiet", dest="quiet", action="store_true", help="Only Error logs") parser.add_argument("-q", "--quiet", dest="quiet", action="store_true", help="Only Error logs")
# Mumble arguments # Mumble arguments
parser.add_argument("-s", "--server", dest="host", type=str, required=True, help="The server's hostame of a mumble server") parser.add_argument("-s", "--server", dest="host", type=str, required=True, help="Hostname of the Mumble server")
parser.add_argument("-u", "--user", dest="user", type=str, required=True, help="Username you wish, Default=abot") parser.add_argument("-u", "--user", dest="user", type=str, required=True, help="Username for the bot, Default=abot")
parser.add_argument("-P", "--password", dest="password", type=str, default="", help="Password if server requires one") parser.add_argument("-P", "--password", dest="password", type=str, default="", help="Server password, if required")
parser.add_argument("-p", "--port", dest="port", type=int, default=64738, help="Port for the mumble server") parser.add_argument("-p", "--port", dest="port", type=int, default=64738, help="Port for the Mumble server")
parser.add_argument("-c", "--channel", dest="channel", type=str, default="", help="Default chanel for the bot") parser.add_argument("-c", "--channel", dest="channel", type=str, default="", help="Default channel for the bot")
args = parser.parse_args() args = parser.parse_args()
config = configparser.ConfigParser(interpolation=None) config = configparser.ConfigParser(interpolation=None)