Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 06-16-2025, 01:10 PM   #1
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,409
Karma: 78880114
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Enhancement Request: kepub and Save to disk

With the enhanced support in calibre for kepub format including the on-the-fly conversion to kepub on Send to device, would it be possible to enhance the Save to disk function to
  1. Add the option to select kepub as a format without the book having an existing kepub format, and performing the same on-the-fly conversion as Send to Device and (like with Send to device) not add the kepub to the library.
  2. Allow an option to select whether to name the resulting kepub either bookname.kepub OR bookname.kepub.epub
PeterT is offline   Reply With Quote
Old 06-16-2025, 02:53 PM   #2
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,978
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
don't forget Save To Folder

Maybe that needs a 'Behave Like Device(driver) type' option
theducks is offline   Reply With Quote
Old 06-16-2025, 03:03 PM   #3
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,390
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by theducks View Post
don't forget Save To Folder

Maybe that needs a 'Behave Like Device(driver) type' option
This was discussed and implemented at PeterT's request. See https://www.mobileread.com/forums/sh...87#post4495387

What he is asking for now appears to be similar but for save to disk instead of send to device.
chaley is offline   Reply With Quote
Old 06-16-2025, 08:07 PM   #4
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,409
Karma: 78880114
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
This request was based on realising that while, it's easy to save content to either Google Drive or Dropbox from within calibre, and very easy to load that content onto a Kobo Libra Colour due to it's native cloud support, one was strictly limited to ePub only without doing a manual conversion to kepub in calibre, and then once the book was saved to the cloud, manually renaming it.
PeterT is offline   Reply With Quote
Old 06-16-2025, 10:21 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,271
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Seems like too much UI for something that can simply be implemented y converting to KEPUB.
kovidgoyal is online now   Reply With Quote
Old 06-16-2025, 10:31 PM   #6
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,409
Karma: 78880114
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Yeah apart from the fact that the converted files have the .kepub extension as opposed to the desired .kepub.epub
PeterT is offline   Reply With Quote
Old 06-16-2025, 10:38 PM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,271
Karma: 27111060
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Just stick the kobo device files into your folder and use connect to folder as Kobo device for it.
kovidgoyal is online now   Reply With Quote
Old 06-16-2025, 11:15 PM   #8
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,409
Karma: 78880114
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
The whole idea of trying to use the native cloud support is to selectively load content when away from home.

At times I grow frustrated by the hoops that some software expects one to jump through to use all of a device's features.
PeterT is offline   Reply With Quote
Old 06-17-2025, 06:37 AM   #9
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,390
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
You could do this using a Python code action in action chains. It seems that the steps would be:
  • Send the epub formats to disk. Use a known directory as the destination.
  • Invoke the python action to change the epubs to kepub.epubs in the known directory by scanning the directory for epubs that aren't kepub.epub.
The python action would scan the directory (tree) for .epub without being .kepub.epub. For each file found, convert it by calling
Code:
calibre.ebooks.oeb.polish.kepubify.make_options()
setting the options as you wish, then
Code:
calibre.ebooks.oeb.polish.kepubify.kepubify_path()
setting "outfile" to the basename of the epub + ".kepub.epub". Finally, delete the source epub.

I haven't tried writing and running the code but it seems straight-forward.

EDIT: Of course, you could do the same thing using a python script, which might be a better solution because the script can take arguments more easily than the action.

Last edited by chaley; 06-17-2025 at 08:57 AM.
chaley is offline   Reply With Quote
Old 06-17-2025, 02:50 PM   #10
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,390
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Here is a python script that kepubifies epubs in a directory then removes the underlying epub. It is basic, for example missing setting up options.
Code:
from calibre.ebooks.oeb.polish.kepubify import kepubify_path
import os

books_dir = sys.argv[1]
for root, dirs, files in os.walk(books_dir):
    for f in files:
        base, ext = os.path.splitext(f)
        if ext == '.epub' and not base.endswith('kepub'):
            infile = os.path.join(root, f)
            outfile = os.path.join(root, base+'.kepub'+ext)
            print(infile, outfile)
            kepubify_path(infile, outfile)
            os.remove(infile)
It is called with
Code:
calibre-debug -e kepub.py full_path_to_directory
chaley is offline   Reply With Quote
Old 06-17-2025, 07:55 PM   #11
PeterT
Grand Sorcerer
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
Posts: 13,409
Karma: 78880114
Join Date: Nov 2007
Location: Toronto
Device: Libra H2O, Libra Colour
Works like a charm. Of course I made a few mods.. Handles multiple book directories; add the #! to point to calibre-debug

Thanks!
PeterT is offline   Reply With Quote
Old 06-18-2025, 06:13 AM   #12
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,390
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
If you don't like the default options you can use
Code:
def make_options(
    extra_css: str = '',
    affect_hyphenation: bool = False,
    disable_hyphenation: bool = False,
    hyphenation_min_chars: int = 6,
    hyphenation_min_chars_before: int = 3,
    hyphenation_min_chars_after: int = 3,
    hyphenation_limit_lines: int = 2,
    prefer_justification: bool = False,

    remove_widows_and_orphans: bool | None = None,
    remove_at_page_rules: bool | None = None,
) -> Options:
in the same py file as kepubify_path.
chaley is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature request: "Save to disk / without meta-info" PenguinCEO Library Management 36 03-19-2020 10:54 AM
Safe save feature enhancement? arspr Editor 9 01-04-2014 12:06 PM
Feature / Enhancement Request _reader Recipes 2 05-16-2012 10:24 AM
Enhancement Request tacheson Calibre 7 09-30-2011 12:01 PM
Enhancement Request? emellaich Calibre 2 06-13-2009 12:13 AM


All times are GMT -4. The time now is 07:45 AM.


MobileRead.com is a privately owned, operated and funded community.