| Crates.io | book_lib |
| lib.rs | book_lib |
| version | 0.1.3 |
| created_at | 2025-04-04 14:29:22.654066+00 |
| updated_at | 2025-04-10 13:13:05.710128+00 |
| description | A library that provides an API for managing PDFs on your mac device in one place |
| homepage | https://github.com/DobbiKov/book-lib |
| repository | https://github.com/DobbiKov/book-lib |
| max_upload_size | |
| id | 1620140 |
| size | 23,997 |
This library provides an interface for adding, removing and manging existing PDF files stored on your device.
clone the project from the git repository or add it using cargo add book_lib
use the api in your rust project
use book_lib::{db, book};
let connection = book_lib::db::setup();
let new_book = book::Book::init("book_name".to_string(), "path_to/your/file.pdf".to_string(), None, false);
book_lib::create_book(&connection, &new_book); //creating new book in the DB
book_lib::update_favourite(&connection, &("book_name".to_string()), true); //true to be favourite, false not to be
book_lib::remove_book(&connection, &("book_name".to_string()));
Feel free to open pull requests!