-
Notifications
You must be signed in to change notification settings - Fork 10
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
Expose the internal/epub package #26
Comments
Hi, I have severals sub package that could be shared by putting it outside the internal. I will see if I can share the ePub api properly, without the risk of breaking stuff later. Keeping it clean. Working on it. |
I've start a branch. |
Sure. I'll dedicate some time to take a look at the diff tomorrow. Thanks! |
@celogeek I've taken a look at the code, and have a couple of suggestions on the API design of the exposed packages. Could you create a draft PR? So we can move this discussion there and I can point out my suggestions. |
here: #27 I was thinking of creating a real interface for epub, with everything to plug hooks like progress, and everything. |
Sure. I create a pr but after a while I close it. I haven't got time to work on it. Please do. I will check. |
Sorry, I deleted my previous message by accident ... |
PR link: #40 |
Well. Internals may move a lot while public api remain stable. I was thinking of a configurable api that can be used by external client or a command line provided like the one we have. Like |
I understand you concerns about making everything public, I will try to have a deeper understanding of how things work in the repo, do you have any idea of what you would like to expose ? If I had to choose from the options provided maybe |
Hi @celogeek.
I want to integrate
go-comic-converter
with one of my projects.I've looked at the codebase and figured out that the core epub conversion logic is nicely decoupled from the CLI and configuration logic on a
github.com/celogeek/go-comic-converter/internal/epub
package.The problem is that this package lies on the
internal
package. As stated on the feature release notes, in this case, no packages outside of the rootgithub.com/celogeek/go-comic-converter
would be able to import what's within theinternal
package.I don't know what's the design decision behind doing that, but it would be good to move the
github.com/celogeek/go-comic-converter/internal/epub
package to something likegithub.com/celogeek/go-comic-converter/pkg/epub
.Although I could integrate with it using something like os/exec, by exposing the package,
go-comic-converter
could also integrate at the code level with other Go packages, which is way better.A good example of what I'm trying to describe here is github.com/golang-migrate/migrate, where the core package has a CLI but also supports being embedded by other packages.
Are there any concerns about doing that? I can spin up a quick PR with it if you wish, as I'll be forking the repo to implement this change anyway.
The text was updated successfully, but these errors were encountered: