Tgbook is telegram bot wrap around Tgbot and it's capable of searching and retrieving books in calibre, adding book in goodreads in lazylibrarian for downloading and much more to come!
- Cpr library for handling http request.
- nlohmann/json for fast JSON parsing.
- Boost library.
- spdlog for logging purposes.
To build tgbot, firstly you need to install some dependencies such as Boost and build tools such as CMake. On Debian-based distibutives you can do it with these commands:
sudo apt-get install g++ make binutils cmake libssl-dev libboost-system-dev zlib1g-dev
If you have Cmake, compile with:
cmake .
make -j4
Set all the necessary environment variables before running the executable.
export GOODREADS_KEY="<goodreads developer key>"
export TG_TOKEN="<telegram token>"
export CALIBRE_IP="<the address of calibre running>"
/book <string>
: searh the calibre library for . This will return the calibre book id and format./book-get <id> <format>
: use the id and format obtain from above to retrive the book.