Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 11-23-2020, 09:48 AM   #1
jjk
Enthusiast
jjk began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
For an even more perfect Calibre editor

Dear Kovid,

To edit my epub files, I use Calibre-editor most of the time, but also Sigil since Calibre-editor still has some gaps.
Here are some of the features I would like to see added to Calibre-editor.

1. General functions :
a) be able to move the current file elsewhere in the EPUB tree
b) see the size of all xhtml files at once (currently I need to position the mouse on each file to see its size)
c) see the size of all images without having to open each image in turn

2. Search functions :
- Stored-searches: have a tree (as in Sigil)

3. Editing functions :
Since recent versions of Calibre-editor one can already open an XHTML file with an external text editor that can offer powerful editing functions. That's very good. But the stylesheet is not opened at the same time by this external editor. And so, even if this text editor allows to preview the xhtml, it is not in line with what it should be since it has lost its styles.
This is why I would like more powerful text editing functions in Calibre-editor.

In another thread, I will detail these text editing functions.
I am sorry if some of these requests have already been made on this forum. I admit I couldn't read everything.
I am well aware that this request would cost an enormous amount of work. Calibre-editor is already wonderful. It didn't get done in a day, so having a few of those features in addition as time goes by would be really great.

Best regards
jjk is offline   Reply With Quote
Old 11-23-2020, 11:06 AM   #2
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: 38,516
Karma: 17011940
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
1. you can already see filesizes at a glance in the reports tool. And I dont know what you mean by move files elsewhere in the tree, simply rename them to whatever folder you want them to be in.

2. Simply add a atga to the names of the searches and use the filter
kovidgoyal is offline   Reply With Quote
Old 11-24-2020, 04:34 PM   #3
jjk
Enthusiast
jjk began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
Quote:
Originally Posted by kovidgoyal View Post
1. you can already see filesizes at a glance in the reports tool. And I dont know what you mean by move files elsewhere in the tree, simply rename them to whatever folder you want them to be in.

2. Simply add a atga to the names of the searches and use the filter
Thanks fo your lights.

1. Yes !! I had totally forgotten the report tools. It is a real treasure trove

2. What is a acta ?

Concerning my point n°3 : open xhtml in external editor in connection with its CSS
I allow myself to suggest you a rather simple solution to be able to preview, in an external editor, some Xhtml file linked to its CSS : you could sent to that editor a copy of the CSS files in addition to the xhtml one. Since this xhtml file is edited in a tmp directory, say TMP, the CSS files should be located in the same directory, relatively to its location in epub.
So the link between xhtml and CSS would not be broken.

Thanks for your attention.
Best regards
jjk is offline   Reply With Quote
Old 11-24-2020, 05:10 PM   #4
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 16,879
Karma: 19721268
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by kovidgoyal View Post
. . .
2. Simply add a atga to the names of the searches and use the filter
Quote:
Originally Posted by jjk View Post

2. What is a acta ?
I think it's a typo, s/b - "Simply add a tag to the…"

BR
BetterRed is online now   Reply With Quote
Old 11-24-2020, 05:14 PM   #5
jjk
Enthusiast
jjk began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
Ah, yes !
Two typos : atga (Kovid) then acta (JJK)
jjk is offline   Reply With Quote
Old 11-24-2020, 11:56 PM   #6
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: 38,516
Karma: 17011940
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
if you want to edit the entire books contents in an external editor, the use the unpack book tool for it, there is no point going through the calibre editor at all. Add the unpack book tool to the calibre toolbar via preferences->toolbars
kovidgoyal is offline   Reply With Quote
Old 11-25-2020, 08:41 AM   #7
jjk
Enthusiast
jjk began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
Ah, I did never try it.
But, sorry, I get next errors, (same on two different epubs) :
Code:
calibre, version 5.5.0
ERREUR : Erreur lors de l'ouverture du livre: Erreur lors de l'ouverture du livre. Cliquer sur le bouton "Afficher les détails" pour plus d'information.

Traceback (most recent call last):
  File "calibre\gui2\tweak_book\job.py", line 34, in run
  File "calibre\gui2\tweak_book\boss.py", line 83, in get_container
  File "calibre\ebooks\oeb\polish\container.py", line 1560, in get_container
  File "calibre\ebooks\oeb\polish\container.py", line 1207, in __init__
calibre.ebooks.oeb.polish.container.InvalidEpub: No META-INF/container.xml in epub
jjk is offline   Reply With Quote
Old 11-25-2020, 10:54 AM   #8
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: 38,516
Karma: 17011940
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You get that error when?
kovidgoyal is offline   Reply With Quote
Old 11-25-2020, 12:03 PM   #9
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 10,176
Karma: 50100907
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Forma, Clara HD, Nexus 7 HD, iPad Pro, Tolino epos
If you are unpacking and repacking the epub file, are you making sure to follow the standard for file names/location/etc. The mimetype file is in the root of the zip container and MUST be stored uncompressed, the container.xml is in the META-INF directory, etc. Do a search on OCF ZIP Container for more information.
DNSB is offline   Reply With Quote
Old 11-25-2020, 04:30 PM   #10
jjk
Enthusiast
jjk began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
First, thanks for your answers

I have the ebook "Quatre-vingt-Treize - Victor Hugo.epub" (but it is same with many other ebooks)

@DNSB :
When I open it as a zip file (with any dezipper) I see among others 'mimetype' file which contents 20 bytes : application/epub+zip
And my zipper (7zip) indicates that 'mimetype' has a 20 bytes lenght, meaning that it is not compressed.
More : If I open the ebook in a hex viewer, I see the "mimetypeapplication/epub+zip" string, so I am sure that this file is not compressed.

When I open the ebook in Calibre-editor I get next tree (in left panel) :
Texte : titlepage.xhtml, hugo1.xhtml,.., hugo5.xhmtl, all in root
Styles : stylesheet.css, in root
Images : cover.jpg, in root
Polices : (none)
Divers : content.opf, toc.ncx both in root, and container.xml in META-INF\

@Kovid
Scenario of the crash :
For information
When I click on container.xml, I see its content :
Code:
<?xml version="1.0"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
   <rootfiles>
      <rootfile full-path="content.opf" media-type="application/oebps-package+xml"/>
   </rootfiles>
</container>
Now, I click on the unpack book tool in the toolbar.
Editor asks me to choose a directory. I click on an empty directory (of any drive), then on the 'Select a dir' button. That is the crash. I get a dialog box intituled ERROR : Error when opening the book. I click on the button to display details :
calibre, version 5.5.0
ERREUR : Erreur lors de l'ouverture du livre: Erreur lors de l'ouverture du livre. Cliquer sur le bouton "Afficher les détails" pour plus d'information.
Code:
Traceback (most recent call last):
  File "calibre\gui2\tweak_book\job.py", line 34, in run
  File "calibre\gui2\tweak_book\boss.py", line 83, in get_container
  File "calibre\ebooks\oeb\polish\container.py", line 1560, in get_container
  File "calibre\ebooks\oeb\polish\container.py", line 1207, in __init__
calibre.ebooks.oeb.polish.container.InvalidEpub: No META-INF/container.xml in epub
BTW, just after clicking OK on the error message, I try to open any file in the left panel. I get then another error :
Code:
calibre, version 5.5.0
ERREUR : Exception non gérée: <b>FileNotFoundError</b>:[Errno 2] No such file or directory: 'C:\\Users\\xyz\\AppData\\Local\\calibre-cache\\ee\\tmpgxor4ucf\\a\\00001-rx2mbj5l\\META-INF\\container.xml'

calibre 5.5 [64bit]  embedded-python: True is64bit: True
Windows-10-10.0.19041 Windows ('64bit', 'WindowsPE')
('Windows', '10', '10.0.19041')
Python 3.8.5
Windows: ('10', '10.0.19041', '', 'Multiprocessor Free')
Interface language: fr
Successfully initialized third party plugins: CalibreSpy (1, 0, 83) && Diaps Editing Toolbag (0, 3, 7) && Ex Libris (1, 0, 19) && Job Spy (1, 0, 188) && KindleUnpack - The Plugin (0, 82, 3) && Kobo Utilities (2, 11, 8) && Open With (1, 5, 13) && Prettify Cover (1, 5, 0)
Traceback (most recent call last):
  File "calibre\gui2\tweak_book\boss.py", line 1619, in edit_file_requested
  File "calibre\gui2\tweak_book\boss.py", line 1588, in edit_file
  File "calibre\ebooks\oeb\polish\container.py", line 614, in raw_data
  File "calibre\ebooks\oeb\polish\container.py", line 1070, in open
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\xyz\\AppData\\Local\\calibre-cache\\ee\\tmpgxor4ucf\\a\\00001-rx2mbj5l\\META-INF\\container.xml'
As you can see, I have some plugins installed...
And, indeed, file is corrupted in memory.

[EDIT] After having uninstalled all those plugings, I have still the same errors.[/EDIT]

Last edited by jjk; 11-25-2020 at 05:34 PM.
jjk is offline   Reply With Quote
Old 11-25-2020, 06:26 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.
 
PeterT's Avatar
 
Posts: 11,153
Karma: 61896205
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
For tools to help with the recreation of the ePub see if https://ebookflightdeck.com/handbook/zipping helps
PeterT is offline   Reply With Quote
Old 11-25-2020, 06:44 PM   #12
jjk
Enthusiast
jjk began at the beginning.
 
Posts: 32
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
Thanks to all for your help.
But I'm very very confused. I had not understood what Kovid said, and, instead of use the good tool (unpack book tool), I used another one (Open Epub dir as a book, or so, because not rather familiarized with english language).
Once more, I am very very sorry.

Best regards
jjk is offline   Reply With Quote
Old 11-25-2020, 06:52 PM   #13
BetterRed
null operator
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 16,879
Karma: 19721268
Join Date: Mar 2012
Location: Sydney Australia
Device: none
I've used the calibre-debug --explode-ebook and calibre-debug --implode-ebook command line tools to un-zip and re-zip EPUBs - see ==>> calibre-debug command

BR
BetterRed is online now   Reply With Quote
Old 11-25-2020, 06:53 PM   #14
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.
 
PeterT's Avatar
 
Posts: 11,153
Karma: 61896205
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
Quote:
Originally Posted by BetterRed View Post
I use the calibre-debug --explode-ebook and calibre-debug --implode-ebook command line tools to un-zip and re-zip EPUBs - see ==>> calibre-debug command



BR
I'd forgotten that option!
PeterT is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Calibre editor in Calibre v4.9 Capricorn Calibre 13 01-24-2020 06:20 AM
Help with Calibre editor G2B Editor 11 04-06-2018 10:39 AM
Bug Calibre editor Stevex Calibre 0 06-21-2017 08:56 AM
regex in calibre editor mrmikel Editor 2 02-01-2014 11:39 AM
iPhone 101: iPhone+Stanza+Calibre (the almost-perfect solution) ChrisZA Apple Devices 236 04-25-2011 05:19 AM


All times are GMT -4. The time now is 04:09 PM.


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