Giter Club home page Giter Club logo

telegram-mopidy-bash's Introduction

Proof of Concept

First of all, this project is a proof of concept that proves usability of Bash scripting language in a modern environment. It works but it still far from being a perfect app.

Features

  • Basic Telegram API - receiving updates (long polling) and sending messages.
  • Basic Mopidy API - adding tracks (Google Music only, so Mopidy-Gmusic is required for mopidy backend), setting play mode and volume.
  • High readability via Bash Infinity (OOP paradigm in Bash)
  • JSON configuration
  • caching via SQLite3

Dependencies

On Debian/Ubuntu you can install both via

sudo apt-get install jq sqlite3

Installation

First, clone this repository

git clone https://github.com/421p/telegram-mopidy-bash.git

Then, edit a config.json by adding your telegram_token and allowed_users. Probably you also want to change mopidy_uri if it's running somewhere else.

And now you are ready to start bot:

./bot.sh

Modifying bot for your own needs

You can modify bot commands by changing only 2 things:

  • bot keyboard (reply_markup in config.json)
  • executed code (src/command/CommandStorage.sh)

Also, you may totally remove mopidy-related code and use this as bash-telegram-bot boilerplate. Or even vice versa.

telegram-mopidy-bash's People

Contributors

421p avatar

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.