Skip to content
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

Feature Request: allow split for epub and set target (email, web upload) #21

Closed
celogeek opened this issue Dec 23, 2022 · 14 comments · Fixed by #22
Closed

Feature Request: allow split for epub and set target (email, web upload) #21

celogeek opened this issue Dec 23, 2022 · 14 comments · Fixed by #22

Comments

@celogeek
Copy link

Hi,

We can now send epub directly to sendtokindle website or email.
It's extremely convenient, it will convert the epub for the device.

The email is limited to 50MB (but we need to include the b64 which left you with something like 40MB) and the WebSite allow 200mb of files.

It is convenient to split the epub to the maximum size we want (200MB for instance), and may be for splitted part to do a better improvement, like "Part 2" and the same cover as the first part.

@darodi
Copy link
Owner

darodi commented Dec 23, 2022

Is a new option
--targetsize in kcc-c2e in command line enough?
Or would you like the option in the GUI too?

@celogeek
Copy link
Author

Well, for ease to use may be a format like 'EPUB for Sendtokindle WebSite' could be just simple as that ?
I see the outputSplit is disable for epub.
I make a patch like:

diff --git a/kindlecomicconverter/comic2ebook.py b/kindlecomicconverter/comic2ebook.py
index 1069d05..449b4f2 100755
--- a/kindlecomicconverter/comic2ebook.py
+++ b/kindlecomicconverter/comic2ebook.py
@@ -792,7 +792,7 @@ def splitProcess(path, mode):
     if options.webtoon:
         targetSize = 104857600
     else:
-        targetSize = 419430400
+        targetSize = 209715200
     if options.batchsplit == 2 and mode == 2:
         mode = 3
     if mode < 3:
@@ -1001,7 +1001,7 @@ def checkOptions(options):
     if options.black_borders:
         options.bordersColor = 'black'
     # Splitting MOBI is not optional
-    if (options.format == 'MOBI' or options.format == 'KFX') and options.batchsplit != 2:
+    if (options.format == 'MOBI' or options.format == 'KFX' or options.format == 'EPUB') and options.batchsplit != 2:
         options.batchsplit = 1
     # Older Kindle models don't support Panel View.
     if options.profile == 'K1' or options.profile == 'K2' or options.profile == 'K34' or options.profile == 'KDX':

But with a specific format, like EPUB for the sendtokindle website, we can simply set batchsplit to 1 with target size 200MB.
Then it's easy to push it to the website.

@celogeek
Copy link
Author

Also a targetsize customizable on the command line could be great too.

@celogeek
Copy link
Author

About this repo. I see a beta release, and also the original repo have release in 2019.
Any possible way to have the beta release, released one day ?

@darodi
Copy link
Owner

darodi commented Dec 23, 2022

As you said, there is no news from ciromattia in the original repository.
That's why I forked and called it beta release.
Like google products, it may stay in beta indefinitely 😁

All the beta releases are here:
https://github.com/darodi/kcc/releases
in the asset section

and in testpypi
https://github.com/darodi/kcc#pypi

$ pip install --index-url https://test.pypi.org/simple/  KindleComicConverterDarodi

Je vois que tu es de France, on peut aussi basculer en français 😉

@celogeek
Copy link
Author

Sure we can. but if anyone else what to understand what we say ;)

I've try the MacOS version, but it fail to do anything. I have to go back to the original DMG to start working.
I would like to get it for KS profile.
So I finally switch to server side conversion with kcc-c2e.
And I'm trying remote desktop with your package. I make a PKGBUILD for ArchLinux using your beta branch.
I may push that, so other ArchLinux user may get it easily.

@darodi
Copy link
Owner

darodi commented Dec 23, 2022

AppImage doesn't work with ArchLinux?

@celogeek
Copy link
Author

Never used this.
We have AUR repos, which is a user contributed repos.
Here the official: https://aur.archlinux.org/packages/kcc
I will push a kcc-beta-git or kcc-beta I think. using your repos instead.

@darodi
Copy link
Owner

darodi commented Dec 23, 2022

It might be useful to add it to the repository pipelines and have it updated automatically each time a new version is built
https://github.com/darodi/kcc/tree/beta_release/.github/workflows

@darodi
Copy link
Owner

darodi commented Dec 23, 2022

I've try the MacOS version, but it fail to do anything. I have to go back to the original DMG to start working.

Do you have more information about this? It would be better to fix it.
I don't own a mac os, I need to find a way to test this.

@celogeek
Copy link
Author

I don't know how to debug. may be I can launch the app with a debug param.
Also on M1/M2 arch, it's terribly slow to start.

@celogeek
Copy link
Author

It might be useful to add it to the repository pipelines and have it updated automatically each time a new version is built https://github.com/darodi/kcc/tree/beta_release/.github/workflows

On arch, the git version can be updated each time people want to fetch the last version.
Just run a

paru -Syu --devel

and you get every package up to date with user repo and fetch of the last git patch. So we don't push a new git version except if it required a change in the way to build it (patch to apply, new command to run, change of config embedded ...)

@darodi
Copy link
Owner

darodi commented Dec 23, 2022

I added

Usage: kcc-c2e [options] comic_file|comic_folder
Options:
  MAIN:
    --targetsize=TARGETSIZE
                        the maximal size of output file in MB. [Default=100MB
                        for webtoon and 400MB for others]

image

@celogeek
Copy link
Author

Nice !
I would suggest to activate batchsplit only for EPUB-200, I guess normal epub don't need to be splitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants