Giter Club home page Giter Club logo

mediaserver-twitter-control's Introduction

twitter-control

A vaguely named bot which looks for DMs you send to yourself in order to remotely control Sonarr, CouchPotato, and SABnzbd.

Installation

Dependencies:

  • pip
    • python-requests
    • PyYAML
    • python-twitter
  • supervisord
# cd /opt
# git clone https://github.com/vladionescu/twitter-control.git
# pip install -r requirements.txt
# cd /opt/twitter-control
# cp supervisord.conf /etc/supervisord.conf
# cp config.yml.sample config.yml
# echo "Edit config.yml please"
# systemctl restart supervisord

This script is maintained with supervisord (a sample supervisord.conf is included) which expects the script to live in /opt. The included supervisord.conf attempts to run the script as the plex user.

The included config.yml.sample will fail if you try to run the script as-is. The script expects a config.yml file in the same directory. Please add the relevant API keys and your Twitter user ID (numeric) to config.yml or the script will print an error and exit.

If using supervisord then after installing the .conf do

# supervisorctl start twitter-control

Logs are printed to stdout/stderr. If using the included supervisord.conf they will live in /opt/twitter-control/logs.

Commands

Commands are ingested from a DM where the sender == the receiver. Each DM can be a multiline message. Each line is processed separately.

Lines will only be processed if they begin with the command_start_character specified in config.yml. If you don't want this functionality, leave that option blank.

  • help - prints the available commands in an abbreviated form
  • stats or status - prints SABnzbd server info (load avgs, downloading/paused state, disk space remaining, size left to download, and download speed)
  • show: or series: - searches for in Sonarr and adds the show if found
  • movie: or film: - adds the film denoted by it's IMDB ID to CouchPotato
  • pause or resume - stops and starts SABnzbd **NOT IMPLEMENTED YET

Example DM chat:

Me: ~stats

Me: --- Server Stats ---
    Load: 0.08 | 0.05 | 0.01 | V=2594M R=202M
    Status: Downloading
    Disk Space Remaining: 57.5 G
    Download Size Remaining: 8.5 GB
    Download Speed: 397 K

Me: ~show: seinfeld

Me: Show added to my list (seinfeld)

mediaserver-twitter-control's People

Contributors

vladionescu avatar

Watchers

 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.