GithubHelp home page GithubHelp logo

sshaddicts / mophpidy Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 2.0 229 KB

Telegram bot for controlling Mopidy music server written in reactive PHP.

Home Page: https://hub.docker.com/r/421p/mophpidy/

PHP 97.24% Makefile 1.41% Dockerfile 1.36%
mopidy telegram bot music server react-php asynchronous docker

mophpidy's Introduction

Mophpidy

Telegram bot for controlling Mopidy music server written in reactive PHP.

Build Status Join the chat at https://gitter.im/Mophpidy/Lobby

Features

  • Browsing collection
  • Volume control
  • Playback control
  • Search (currently only gmusic and soundcloud)
  • Favorites (all playlists that match /favou?rites/i in playlist name will be merged into one)

Installation

Docker

docker pull 421p/mophpidy

ARM is also supported (Raspberry PI and such)

docker pull 421p/mophpidy:arm32v7

Docker Compose example:

# docker-compose.yml
version: '3'

services:
  bot:
    image: 421p/mophpidy
    restart: always
    volumes:
      - './data:/app/data' # for data persistence
    environment:
      MOPIDY_URI: 'ws://mopidyhost:6680/mopidy/ws/'
      TELEGRAM_TOKEN: 'TELEGRAM_BOT_TOKEN'
      BOT_USERNAME: '@TELEGRAM_BOT_USERNAME'
      ADMIN: '11223344' # partially supports multiple users '111222333, 14224124'

As you can see you have to provide 4 environment variables:

  • MOPIDY_URI - uri to mopidy websocket endpoint
  • TELEGRAM_TOKEN - bot token
  • BOT_USERNAME - bot username
  • ADMIN - one or more (partial support) telegram user id

For the first installation you have to create a database by running doctrine command.

docker-compose run bot doctrine orm:sc:cr

Non-docker

  1. Create .env file with 4 required environment variables
# .env
MOPIDY_URI='ws://mopidyhost:6680/mopidy/ws/'
TELEGRAM_TOKEN='TELEGRAM_BOT_TOKEN'
BOT_USERNAME='@TELEGRAM_BOT_USERNAME'
ADMIN='11223344'
  1. Install dependencies:
composer install
  1. Create database (for a fresh installation only)
./doctrine orm:sc:cr
  1. Run bot
php bot.php

It's highly recommended to install event pecl extension for running bot but not required.

mophpidy's People

Contributors

421p avatar

Watchers

 avatar  avatar  avatar

Forkers

angyvolin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.