4 releases
| 0.1.3 | Apr 10, 2025 |
|---|---|
| 0.1.2 | Apr 7, 2025 |
| 0.1.1 | Apr 7, 2025 |
| 0.1.0 | Apr 4, 2025 |
#16 in #place
164 downloads per month
24KB
507 lines
Book Lib
This library provides an interface for adding, removing and manging existing PDF files stored on your device.
Requirements
- unix device
- rust
- sqlite
Setup
- clone the project from the git repository or add it using
cargo add book_lib - use the api in your rust project
Usage
- Create a connection to the database:
use book_lib::{db, book};
let connection = book_lib::db::setup();
- Create a new book
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
- Make it favourite
book_lib::update_favourite(&connection, &("book_name".to_string()), true); //true to be favourite, false not to be
- Remove the book
book_lib::remove_book(&connection, &("book_name".to_string()));
Examples of implementation
Contribution
Feel free to open pull requests!
Dependencies
~34MB
~631K SLoC