Coder Social home page Coder Social logo

potatobot's Introduction

PotatoBot

๐Ÿฅ”๐Ÿค– A simple Telegram bot for controlling CouchPotato.

Dependencies

Build

Clone this repository and go build:

git clone https://github.com/noam09/potatobot
cd potatobot
go build main.go

Install

Use go install to get and build PotatoBot, making it available in $GOPATH/bin/potatobot:

go get -u github.com/noam09/potatobot
go install github.com/noam09/potatobot

docker-compose

A sample docker-compose.yml is included.

# Pull the latest code
git clone https://github.com/noam09/potatobot
cd potatobot
# Modify YAML according to your setup
nano docker-compose.yml
# Run the container and send to background
docker-compose up -d

The docker-compose.yml is based on the official golang:1.12.7-alpine image:

---
version: "2"

services:
  potatobot:
    image: golang:1.12.7-alpine
    volumes:
      - .:/go/src/potatobot
    working_dir: /go/src/potatobot
    command: >
      sh -c 'go run main.go
      --token=<bot>
      --key=<apikey>
      -w <chatid>
      --host=<host>
      --port=<port>
      --base=<urlbase>
      --ssl'

Modify the command section's parameters based on the help-text below.

Usage

Running the bot:

PotatoBot

Usage:
  potatobot --token=<bot> --user=<username> --pass=<password> -w <chatid>... [--host=<host>] [--port=<port>] [--base=<urlbase>] [--ssl] [-d]
  potatobot --token=<bot> --key=<apikey> -w <chatid>... [--host=<host>] [--port=<port>] [--base=<base>] [--ssl] [-d]
  potatobot -h | --help

Options:
  -h, --help                Show this screen.
  -t, --token=<bot>         Telegram bot token.
  -k, --key=<apikey>        API key.
  -u, --user=<username>     Username for web interface.
  -p, --pass=<password>     Password for web interface.
  -w, --whitelist=<chatid>  Telegram chat ID(s) allowed to communicate with the bot (contact @myidbot).
  -o, --host=<host>         Hostname or address CouchPotato runs on [default: 127.0.0.1].
  -r, --port=<port>         Port CouchPotato runs on [default: 5050].
  -b, --base=<urlbase>      Path which should follow the base URL.
  -s, --ssl                 Use TLS/SSL (HTTPS) [default: false].
  -d, --debug               Debug logging [default: false].

Controlling the bot:

๐Ÿ“บ /q - Movie search

๐Ÿ” /f - Run full search for all wanted movies

โŽ /c - Cancel current operation

๐Ÿ’ก Protip! Sending PotatoBot an IMDB title ID by itself (e.g. tt123456) will add the title to the snatchlist.

Screenshots

Start the bot:

Start Bot

Send /help to show the list of available commands:

List Commands

Send /q QUERY and use the custom keyboard to select a movie result:

Select Movie

TODO

  • Makefile
  • systemd service file
  • Add group command support (/command@bot)
  • Check if exists in library
    • Prompt to re-add
  • On-the-fly user whitelisting?
  • Choose quality profile other than the default

Development

Contributions are always welcome, just create a pull request.

License

This is free software under the GPL v3 open source license. Feel free to do with it what you wish, but any modification must be open sourced. A copy of the license is included.

potatobot's People

Contributors

noam09 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.