-
Notifications
You must be signed in to change notification settings - Fork 45
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
add support for ebooks #63
Conversation
…does not leave remaining files in the tmp directory longer than needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Veo muy largo el archivo, quizá valga la pena separarse por responsabilidades o funciones.
if err != nil { | ||
return nil, fmt.Errorf("error reading zip file: %v", err) | ||
} | ||
|
||
return bytes.NewReader(zipFile), nil | ||
case EPUB: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
El case para EPUB es muy largo, ¿por qué no lo metes en un método aparte el cuerpo de ese case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coincido con Sirpyerre aqui. Lo haria en un metodo aparte.
if err != nil { | ||
return nil, fmt.Errorf("error reading zip file: %v", err) | ||
} | ||
|
||
return bytes.NewReader(zipFile), nil | ||
case EPUB: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coincido con Sirpyerre aqui. Lo haria en un metodo aparte.
@ThiagoMowszet @Sirpyerre I'm not done with this one, guys. I appreciate the early review, but I'm far from done adding support for ebooks. When the time to properly review this, I'll move the PR from draft mode to ready for review. A refactor is dramatically needed but I'm more focused on move things along. When I reach a desired stated, I'll go over the code and build a solution off the most common patterns. I'll let you know, guys. |
…inary by creating a new fuctions
Thanks for the update @danvergara! |
Add support for ebooks
Description
This PR adds support for some of the most common e-books. To do this I had to embed the ebook-convert binary from the Calibre project. The tool is installed on the Container image.
Fixes #60
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Added more tests and QA'd the new conversions.
Checklist: