pinakes-core: improve media management features; various configuration improvements
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I2d1f04f13970d21c36067f30bc04a9176a6a6964
This commit is contained in:
parent
cfdc3d0622
commit
e02c15490e
31 changed files with 1167 additions and 197 deletions
|
|
@ -2,7 +2,7 @@ use pinakes_core::books::{extract_isbn_from_text, normalize_isbn, parse_author_f
|
|||
use pinakes_core::enrichment::books::BookEnricher;
|
||||
use pinakes_core::enrichment::googlebooks::GoogleBooksClient;
|
||||
use pinakes_core::enrichment::openlibrary::OpenLibraryClient;
|
||||
use pinakes_core::thumbnail::{extract_epub_cover, generate_book_covers, CoverSize};
|
||||
use pinakes_core::thumbnail::{CoverSize, extract_epub_cover, generate_book_covers};
|
||||
|
||||
#[test]
|
||||
fn test_isbn_normalization() {
|
||||
|
|
@ -136,9 +136,13 @@ fn test_book_cover_generation() {
|
|||
let mut img_data = Vec::new();
|
||||
{
|
||||
use image::{ImageBuffer, Rgb};
|
||||
let img: ImageBuffer<Rgb<u8>, Vec<u8>> = ImageBuffer::from_fn(100, 100, |_, _| Rgb([255u8, 0u8, 0u8]));
|
||||
img.write_to(&mut std::io::Cursor::new(&mut img_data), image::ImageFormat::Png)
|
||||
.unwrap();
|
||||
let img: ImageBuffer<Rgb<u8>, Vec<u8>> =
|
||||
ImageBuffer::from_fn(100, 100, |_, _| Rgb([255u8, 0u8, 0u8]));
|
||||
img.write_to(
|
||||
&mut std::io::Cursor::new(&mut img_data),
|
||||
image::ImageFormat::Png,
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
let temp_dir = tempdir().unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue