Giter Site home page Giter Site logo

harababurel / telereads Goto Github PK

View Code? Open in Web Editor NEW
42.0 5.0 5.0 102 KB

Find books on Goodreads and share them quickly in Telegram chats.

Home Page: https://telegram.me/TelereadsBot

License: MIT License

Rust 100.00%
telegram bot rust goodreads goodreads-api books telegram-bot telegram-bot-api

telereads's Introduction

Telereads = Telegram + Goodreads

Telegram MIT License

@TelereadsBot is an inline bot that allows you to search for books and quickly share them in a conversation.

Demo

Search by book title

Search by ISBN

Deploy your own

You can deploy your own instance of this bot. You will need a few things:

  • A Telegram bot token. Contact @BotFather in order to create a new bot and receive a token.
  • A Goodreads API key. Apply for one here.
  • A working installation of Rust.

Once you have both of these keys, you need to store them as environment variables:

$ export TELEGRAM_TOKEN="123456789:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
$ export GOODREADS_TOKEN="XXXXXXXXXXXXXXXXXXXX"

And then install and run TelereadsBot:

From GitHub

$ git clone https://github.com/harababurel/telereads.git
$ cd telereads
$ RUST_LOG=info cargo run --release

Aditionally, this repo includes a systemd service file (telereads.service) which can be used to deploy the bot. After setting the proper variables in the service file:

$ systemctl start telereads

From crates.io

$ cargo install telereads
$ RUST_LOG=info telereads

Contributing

Contributions are welcome. You can also help by reporting or fixing bugs.

telereads's People

Contributors

harababurel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

telereads's Issues

Mismatched links

In some cases the message link + preview point to a different book than the one selected from the dropdown list. Example:

image

This happens because the Goodreads book links guidelines are ambiguous. One possible solution is to create link based on title + author, but this might cause other problems.

unwrap() panic

Sometimes the bot crashes when trying to unwrap() an Option<T>::None. The stack trace didn't provide any insight towards finding the cause/location of this.

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.