![]() |
#1 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
#3 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,390
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
What he is asking for now appears to be similar but for save to disk instead of send to device. |
|
![]() |
![]() |
![]() |
#4 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
![]() |
![]() |
![]() |
#7 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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:
Code:
calibre.ebooks.oeb.polish.kepubify.make_options() Code:
calibre.ebooks.oeb.polish.kepubify.kepubify_path() 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. |
![]() |
![]() |
![]() |
#10 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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) Code:
calibre-debug -e kepub.py full_path_to_directory |
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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! |
![]() |
![]() |
![]() |
#12 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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: |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |