-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extract covers from .cbz and .cbr #2
Comments
This seems to be for the browser, what I'm trying to do is: extract the first file from the Is there a way to ensure that the files in the archive maintain the sort order after extraction? Do you have any pointers on how I solve it? This is my code so far: |
i can't found any info for how to get cover from cbr meta but u can use ebook-meta is form Calibre
|
What uncompression libraries do you use in your projects for |
i only use jszip for zip i didn't use rar in js and ebook-meta can handle all comic book cover |
Is it an |
when u install https://calibre-ebook.com/ u will have ebook-meta, this exists in calibre install path |
Is it available as part of |
Alright, found So the correct flow for me is:
|
Think I got a little further, using the following: export const getCoversFromFile = async () => {
try {
const calibre = new Calibre({
library: path.resolve("userdata/calibre-lib"),
});
let result: string;
result = await calibre.run("ebook-meta", [
`--get-cover=${path.resolve(
"comics/A Hypothetical Lizard (2004)/Hypothetical_Lizard_T01.cbr"
)}`,
path.resolve("userdata/covers/shoo/"),
]);
console.log("AJSDASDLASDASDASLK!@#!@#!@#!#@#!@#!@", result);
} catch (error) {
console.log(error);
}
}; I get:
|
Finally got it! This is how: let result: string;
result = await calibre.run(
"ebook-meta",
[path.resolve("comics/Aliens - Salvation (1993) Mignola.cbz")],
{
getCover: path.resolve("userdata/covers/shoo/p.jpg"),
}
); Per usual, thanks so much for your help! |
Hello,
Do you have a module that you use to
unrar
orunzip
.cbr
and.cbz
files to extract the covers from the archives?I think I saw a demo of your application, where you are displaying thumbnails and was wondering where in the code that resides?
The text was updated successfully, but these errors were encountered: