This commit is contained in:
dbroqua 2019-12-24 10:18:46 +01:00
parent 51a600056d
commit aa0619b124
7 changed files with 2067 additions and 0 deletions

19
.eslintrc.js Normal file
View file

@ -0,0 +1,19 @@
module.exports = {
env: {
commonjs: true,
es6: true,
node: true
},
extends: [
'standard'
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: {
ecmaVersion: 2018
},
rules: {
}
}

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
run.sh
node_modules

21
LICENCE.txt Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2019 Damien Broqua and contributors (https://framagit.org/dbroqua/irc-radio-bot/-/graphs/master)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

54
README.md Normal file
View file

@ -0,0 +1,54 @@
# IRC Radio Bot
**Ré écriture complète**
IRC Radio Bot est un bot permettant de publier sur un canal IRC le morceau en cours de diffusion sur une radio de votre choix.
## Prérequis
* NodeJS
* MongoDB
* Yarn (ou npm)
## Configuration
Pour fonctionner ce bot a besoin d'un ensemble de variable d'environnement, en voici là liste :
```bash
# L'url du flux radion
export STREAM_URL="";
# L'alias de la radio (pour la sauvegarde en base)
export RADIO_ALIAS="ma-radio";
# L'adresse du serveur IRC
export IRC_SERVER="irc.freenode.net";
# Le pseudo du bot
export IRC_NICKNAME="IrcRadioBot";
# Le canal sur lequel le bot apparait
export IRC_CHANNEL="#foo";
# Le nom du bot
export IRC_USER_NAME="nodebot";
# Le nom réel du bot
export IRC_REAL_NAME="IRC RADIO BOT";
# L'adresse du serveur mongo et de la base associée
export MONGO_URL="mongodb://localhost/irc-radio-bot";
```
Ne pas oublier d'installer les modules nodejs :
```bash
yarn install
```
## Lancement
```bash
yarn start
```
## Crédits
Développé par [DarKou](https://mamot.fr/@DarKou).
## Licence
IRC Radio Bot est distribué sous [licence MIT](LICENCE.txt)

10
TODO.md Normal file
View file

@ -0,0 +1,10 @@
# IRC Radio Bot
## Les commandes
* !artist <add/del> {nom de l'artiste}
* !song <add/del> {nom du morceau}
* !stats <day/week/lastweek/month/lastmonth/year/lastyear> <artist/song>
* !when <day/week/lastweek/month/lastmonth/year/lastyear> <artist/song>
* !help {artist/song/stats/when}
* !notifications <on/off/state>

26
package.json Normal file
View file

@ -0,0 +1,26 @@
{
"name": "irc-radio-bot",
"version": "0.0.1",
"description": "Publish current played sound on webradio to IRC channel",
"main": "index.js",
"scripts": {
"start": "./node_modules/.bin/nodemon",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Damien Broqua <contact@darkou.fr>",
"license": "ISC",
"dependencies": {
"irc-upd": "^0.10.0",
"mongoose": "^5.8.3",
"radio-stream": "^0.0.1"
},
"devDependencies": {
"eslint": "^6.8.0",
"eslint-config-standard": "^14.1.0",
"eslint-plugin-import": "^2.19.1",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"nodemon": "^2.0.2"
}
}

1935
yarn.lock Normal file

File diff suppressed because it is too large Load diff