Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 10-16-2021, 10:10 AM   #121
ASLumb
Junior Member
ASLumb began at the beginning.
 
ASLumb's Avatar
 
Posts: 1
Karma: 10
Join Date: Oct 2011
Device: Android phone
Firstly thanks for writing this plugin it's really useful

I use it regularly on my Library that I'm trying to reduce to 17k books!

My only minor bugbears is that when it inserts a new cover image these are inserted with the aspect ratio tag set to none and I'd find it great if we could set it to yes or even have it as a toggle in the plugin.

In fact is there a way to get calibre to go through and reset all the aspect ratio tags to yes for a number of books ??

Thanks and keep up the good work
ASLumb is offline   Reply With Quote
Old 10-16-2021, 11:52 AM   #122
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: 44,515
Karma: 24495784
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
IIRC it uses the preserve aspect ratio setting from the epub output section in Preferences->Output options.
kovidgoyal is online now   Reply With Quote
Old 02-17-2022, 09:57 PM   #123
WalterWalter
Member
WalterWalter began at the beginning.
 
Posts: 13
Karma: 10
Join Date: May 2021
Device: Android Phone
"Polish books" is messing up my series_index

When creating/importing/converting an ebook in .epub format, the metadata for the series in the bookfile for the series is something like:
<meta name="calibre:series" content="TestSeries"/>
<meta name="calibre:series_index" content="124.0"/>
when running "Polish books" this changes to
<meta property="belongs-to-collection" id="id-3">TestSeries</meta>
<meta refines="#id-3" property="collection-type">series</meta>
<meta refines="#id-3" property="group-position">124.0</meta>

This has two consequences/problems:
1) Some e-book readers do not understand this. I use "Calibre Companion" to manage the books I read on my smartphone. When I open a book to read, then Calibre Companion opens the FBReader App, which does not recognize this as series information, and the book info will not contain the series information, so looking up books in FBReader library, the option: sorted by series, does not work. That is a little bit annoying but not so bad, since I decide within Calibre Companion which book to read, and in Calibre Companion the series information is recognized.

2)When updating the information in the book file, via "Embed metadata", "Modify epub", the editor or even using "Polish book" again (after having deleted the original_epub format), the number in the last line is changed to: "1.2e+02" which any e-book reader (also the Calibre build in e-book viewer) interprets as 120. To make it clear: the third line is changed to:
<meta refines="#id-3" property="group-position">1.2e+02</meta>

There seems to be a number type problem here, that exists not in the original series_index number metadata definition.
The only way I found to rectify this, was by converting the book again to epub, then the original two lines are used again and everything is fine.

I would like to suggest a modification to "Polish book": Just leave the series information in the original version.
Should that not be possible, then all the other possible interactions with the bookfile have to be changed to use a correct number format.

Otherwise "Polish books" is wonderful, I run it on all my .epub ebooks that I add to calibre.
WalterWalter is offline   Reply With Quote
Old 02-18-2022, 02:16 PM   #124
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,216
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Perhaps FBReader doesn't understand EPUB3. This is the correct way to set Series metadata in EPUB3:
Code:
<meta property="belongs-to-collection" id="id-3">TestSeries</meta>
<meta refines="#id-3" property="collection-type">series</meta>
<meta refines="#id-3" property="group-position">124.0</meta>
This is the correct way for EPUB2:
Code:
<meta name="calibre:series" content="TestSeries"/>
<meta name="calibre:series_index" content="124.0"/>
I don't know anything about the "1.2e+02" problem, though.

Make sure you haven't enabled "Upgrade book internals" in Polish.
jackie_w is offline   Reply With Quote
Old 02-18-2022, 11:38 PM   #125
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: 44,515
Karma: 24495784
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...0ff0a9bdfac01a
kovidgoyal is online now   Reply With Quote
Old 02-19-2022, 10:12 AM   #126
WalterWalter
Member
WalterWalter began at the beginning.
 
Posts: 13
Karma: 10
Join Date: May 2021
Device: Android Phone
Thank you Kovid for the fix.
And thank you to jackie_w.
I realize now why Polish books was doing something that seemed strange to me. First of all, I did not realize, how big the differences between Epub2 and Epub3 were.
Also in Polish books I chose the option "Upgrade book internals" the description for that is:" Upgrade the internal structure of the book , if possible. For instance, upgrades EPUB2 books to EPUB3 books". That sounded harmless to me.
FBReader states on its homepage, that it will has no plans to fully support EPUB3.
So my world is right again: I will look for an alternative to FBReader that understands EPUB3 and Kovid fixed the number format issue.

Calibre is not only a great program, but it also has a great support community.
Thanks again.
WalterWalter is offline   Reply With Quote
Old 05-09-2022, 07:08 PM   #127
cami712
Member
cami712 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2019
Device: Ipad 3rd gen
Hey Guys,

First of all I LOVE CALIBRE! I'm an OCD girl who needs her books to be a certain way (capitalized titles, authors sorted by name then last name, genres, cover preferences, etc etc) and I always found it difficult to embed this metadata I spend hours changing (I own about 2000 books and have changed something in ALL of them) so I found this "POLISH BOOKS" option a savior...

But this is my first time using it and I found 2 errors on a couple of books and I would really like some help on fixing them... I'll copy bellow 2 examples:
Spoiler:

1ST ERROR: Failed to find obfuscation key

Polish book 713 of 717 (26 Kisses)
Traceback (most recent call last):
File "runpy.py", line 194, in _run_module_as_main
File "runpy.py", line 87, in _run_code
File "site.py", line 82, in <module>
File "site.py", line 77, in main
File "site.py", line 49, in run_entry_point
File "calibre\utils\ipc\worker.py", line 215, in main
File "calibre\ebooks\oeb\polish\main.py", line 298, in gui_polish
File "calibre\ebooks\oeb\polish\main.py", line 275, in polish
File "calibre\ebooks\oeb\polish\container.py", line 1568, in get_container
File "calibre\ebooks\oeb\polish\container.py", line 1231, in __init__
File "calibre\ebooks\oeb\polish\container.py", line 1348, in process_encryption
calibre.ebooks.oeb.polish.container.ObfuscationKey Missing: Failed to find obfuscation key

2ND ERROR: Not a ZIP file
Convert book 2 of 2 (Smoke And Key)
Conversion options changed from defaults:
read_metadata_from_opf: 'C:\\Users\\CASSUAL\\AppData\\Local\\Temp\\calibre _2zndwsqr\\wd2g2pqv.opf'
cover: 'C:\\Users\\CASSUAL\\AppData\\Local\\Temp\\calibre _2zndwsqr\\4eh3xyux.jpeg'
verbose: 2
epub_version: '3'
output_profile: 'ipad'
Resolved conversion options
calibre version: 5.42.0
{'asciiize': False,
'author_sort': None,
'authors': None,
'base_font_size': 0.0,
'book_producer': None,
'change_justification': 'original',
'chapter': "//*[((name()='h1' or name()='h2') and re:test(., "
"'\\s*((chapter|book|section|part)\\s+)|((prolog|p rologue|epilogue)(\\s+|$))', "
"'i')) or @class = 'chapter']",
'chapter_mark': 'pagebreak',
'comments': None,
'cover': 'C:\\Users\\CASSUAL\\AppData\\Local\\Temp\\calibre _2zndwsqr\\4eh3xyux.jpeg',
'debug_pipeline': None,
'dehyphenate': True,
'delete_blank_paragraphs': True,
'disable_font_rescaling': False,
'dont_split_on_page_breaks': False,
'duplicate_links_in_toc': False,
'embed_all_fonts': False,
'embed_font_family': None,
'enable_heuristics': False,
'epub_flatten': False,
'epub_inline_toc': False,
'epub_toc_at_end': False,
'epub_version': '3',
'expand_css': False,
'extra_css': None,
'extract_to': None,
'filter_css': '',
'fix_indents': True,
'flow_size': 260,
'font_size_mapping': None,
'format_scene_breaks': True,
'html_unwrap_factor': 0.4,
'input_encoding': None,
'input_profile': <calibre.customize.profiles.InputProfile object at 0x070C4808>,
'insert_blank_line': False,
'insert_blank_line_size': 0.5,
'insert_metadata': False,
'isbn': None,
'italicize_common_cases': True,
'keep_ligatures': False,
'language': None,
'level1_toc': None,
'level2_toc': None,
'level3_toc': None,
'line_height': 0.0,
'linearize_tables': False,
'margin_bottom': 5.0,
'margin_left': 5.0,
'margin_right': 5.0,
'margin_top': 5.0,
'markup_chapter_headings': True,
'max_toc_links': 50,
'minimum_line_height': 120.0,
'no_chapters_in_toc': False,
'no_default_epub_cover': False,
'no_inline_navbars': False,
'no_svg_cover': False,
'output_profile': <calibre.customize.profiles.iPadOutput object at 0x070C4A18>,
'page_breaks_before': '/',
'prefer_metadata_cover': False,
'preserve_cover_aspect_ratio': False,
'pretty_print': True,
'pubdate': None,
'publisher': None,
'rating': None,
'read_metadata_from_opf': 'C:\\Users\\CASSUAL\\AppData\\Local\\Temp\\calibre _2zndwsqr\\wd2g2pqv.opf',
'remove_fake_margins': True,
'remove_first_image': False,
'remove_paragraph_spacing': False,
'remove_paragraph_spacing_indent_size': 1.5,
'renumber_headings': True,
'replace_scene_breaks': '',
'search_replace': '[]',
'series': None,
'series_index': None,
'smarten_punctuation': False,
'sr1_replace': None,
'sr1_search': None,
'sr2_replace': None,
'sr2_search': None,
'sr3_replace': None,
'sr3_search': None,
'start_reading_at': None,
'subset_embedded_fonts': False,
'tags': None,
'timestamp': None,
'title': None,
'title_sort': None,
'toc_filter': None,
'toc_threshold': 6,
'toc_title': None,
'transform_css_rules': '[]',
'transform_html_rules': '[]',
'unsmarten_punctuation': False,
'unwrap_lines': True,
'use_auto_toc': False,
'verbose': 2}
InputFormatPlugin: EPUB Input running
on C:\Users\CASSUAL\AppData\Local\Temp\calibre_2zndws qr\qzq6eecf.epub
EPUB appears to be invalid ZIP file, trying a more forgiving ZIP parser
Traceback (most recent call last):
File "calibre\ebooks\conversion\plugins\epub_input. py", line 259, in convert
File "calibre\utils\zipfile.py", line 774, in __init__
File "calibre\utils\zipfile.py", line 809, in _GetContents
File "calibre\utils\zipfile.py", line 824, in _RealGetContents
calibre.utils.zipfile.BadZipfile: File is not a zip file

Traceback (most recent call last):
File "calibre\ebooks\conversion\plugins\epub_input. py", line 259, in convert
File "calibre\utils\zipfile.py", line 774, in __init__
File "calibre\utils\zipfile.py", line 809, in _GetContents
File "calibre\utils\zipfile.py", line 824, in _RealGetContents
calibre.utils.zipfile.BadZipfile: File is not a zip file


During handling of the above exception, another exception occurred:
Spoiler:

Traceback (most recent call last):
File "runpy.py", line 194, in _run_module_as_main
File "runpy.py", line 87, in _run_code
File "site.py", line 82, in <module>
File "site.py", line 77, in main
File "site.py", line 49, in run_entry_point
File "calibre\utils\ipc\worker.py", line 215, in main
File "calibre\gui2\convert\gui_conversion.py", line 38, in gui_convert_override
File "calibre\gui2\convert\gui_conversion.py", line 25, in gui_convert
File "calibre\ebooks\conversion\plumber.py", line 1108, in run
File "calibre\customize\conversion.py", line 242, in __call__
File "calibre\ebooks\conversion\plugins\epub_input. py", line 266, in convert
File "calibre\utils\localunzip.py", line 252, in extractall
File "calibre\utils\localunzip.py", line 239, in _extractall
ValueError: Not a ZIP file

Last edited by theducks; 05-09-2022 at 07:48 PM. Reason: spoilered
cami712 is offline   Reply With Quote
Old 05-10-2022, 12:12 PM   #128
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: 44,515
Karma: 24495784
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The first error is a book with encryption/obfuscation and no key, you might be able to workarounf it with an epub to epub conversion. The second is a corrupted file.
kovidgoyal is online now   Reply With Quote
Old 05-11-2022, 12:06 PM   #129
cami712
Member
cami712 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2019
Device: Ipad 3rd gen
Thanks, so just converting the epub and loading this new one as the original will fix the polish??
cami712 is offline   Reply With Quote
Old 05-11-2022, 12:31 PM   #130
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: 40,431
Karma: 156982136
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by cami712 View Post
Thanks, so just converting the epub and loading this new one as the original will fix the polish??
Not guaranteed since there are errors that an epub=>epub conversion will not be able to fix but it often works so worth trying.
DNSB is offline   Reply With Quote
Old 05-12-2022, 12:34 AM   #131
cami712
Member
cami712 began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2019
Device: Ipad 3rd gen
Quote:
Originally Posted by DNSB View Post
Not guaranteed since there are errors that an epub=>epub conversion will not be able to fix but it often works so worth trying.
Yeah! It didn't work, any other tip how to fix it?
I did the conversion which worked, but then polish again and the same obfuscation key error

Click image for larger version

Name:	POLISH ERROR.png
Views:	172
Size:	30.7 KB
ID:	193779
cami712 is offline   Reply With Quote
Old 01-29-2023, 05:41 PM   #132
ackomb
Zealot
ackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura aboutackomb has a spectacular aura about
 
Posts: 106
Karma: 4486
Join Date: Mar 2020
Location: Netherlands
Device: i-pad
Need help on Inserting Metadata Jacket using Polish Books

Hey Guys,

I've been working on inserting the meta Data Jacket i.s.o. the Cover/Title page.
And I got quite a ways reading the old posts and stuff on this forum.
But now I'm stumped on 2 things.

1st - I want to have a functioning hyperlink to both the site as well as the authors page (identical to how the title page works)
2nd - I want the items of my pairing to list each on separate lines rather then comma separated.

This is what I've got so far, if there is anyone who can give me an assist, I would be most grateful.

Code:
<html xmlns="{xmlns}">
    <head>
        <title>{title_str}</title>
        <meta name="calibre-content" content="jacket"/>
        <style type="text/css">{css}</style>
    </head>
    <body>
<!-- Header -->
        <div class="cbj_banner">
            <table class="cbj_header">
            	<tr>
            		<td class="cbj_title" colspan="2">{title}</td>
            	</tr>
            	<tr>
				<!-- Change "ids" so it will actually follow the hyperlink to the story -->
					<td class="cbj_title" colspan="2"><a href={ids}>{title}</a></td>
            	</tr>
            	<tr>
				<!-- Change "ids" so it will actually follow the hyperlink to the author -->
				<td class="cbj_author" colspan="2">by: {author}</td>
            	</tr>
             	<tr>
					<td class="cbj_title" colspan="2"><a href={ids}>{author}</a></td>
            	</tr>
               <tr>
                    <td  class="cbj_series" colspan="2">{series.roman}</td>
                </tr>
                <tr>
                	<td class="cbj_pubdata" colspan="2">{publisher}</td>
                </tr>
            	<tr>
            		<td class="cbj_header" colspan="2"><hr class="metadata_divider" /></td>
            	</tr>
                <tr data-calibre-jacket-searchable-tags="1" style="color:white; display:none"><td colspan="2">{searchable_tags}</td></tr>
            </table>

<!-- Footer -->
            <div class="cbj_footer">{footer}</div>
		
        </div>

<!-- Banner -->

        <hr class="cbj_kindle_banner_hr" />
<!-- Change behaviour of tag items to continue on next time i.s.o. comma seperated -->
		<div style="display: display._show"><b>{_show_label}:</b> {_show}</div>
		<div style="display: display._crossover"><b>{_crossover_label}:</b> {_crossover}</div>		
		<div style="display: display._m_char"><b>{_m_char_label}:</b> {_m_char}</div>
		<div style="display: display._m_pair"><b>{_m_pair_label}:</b> {_m_pair}</div>		
        <div style="display: display._genre"><b>{_genre_label}:</b> {_genre}</div>
		<br>
		<div style="display: display.pubdate"><b>{pubdate_label}:</b> {pubdate}  -  <b>{_last_update_label}:</b> {_last_update}</div>
        <div style="display: display._status"><b>{_status_label}:</b> {_status}</div>
            	<tr>
            		<td class="cbj_header" colspan="2"><hr class="metadata_divider" /></td>
            	</tr>
        <div class="cbj_comments"><b>Summery:</b> {comments}</div>
            	<tr>
            		<td class="cbj_header" colspan="2"><hr class="metadata_divider" /></td>
            	</tr>
		<div style="display: display.rating"><b>{rating_label}:</b> {rating}</div>		
        <div class="cbj_comments">{_review}</div>

    </body>
</html>
ackomb is offline   Reply With Quote
Old 07-09-2024, 12:53 PM   #133
madhatter10
Junior Member
madhatter10 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2023
Device: Kindle Oasis
Changing font of book jackets of epub files after using Polish tool

Good day! I was wondering if there was a way to change the font of the embedded book jacket for epub files after using the Polish tool?

It currently appears like this but I'm not really a fan of the font.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2024-07-09 at 11.47.53 PM.png
Views:	87
Size:	273.2 KB
ID:	209480  
madhatter10 is offline   Reply With Quote
Old 07-09-2024, 08:00 PM   #134
BetterRed
null operator (he/him)
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: 20,989
Karma: 27620706
Join Date: Mar 2012
Location: Sydney Australia
Device: none
See ==>> Overriding icons, templates, et cetera

You need to copy the 'app/resources/jacket' folder from where you installed calibre to your configuration folder and edit the stylesheet and template. There's a button in Preferences->Miscellaneous to open the configuration folder. Close calibre before doing the edits.

BR
BetterRed is offline   Reply With Quote
Old 10-12-2024, 04:02 AM   #135
booksies
Member
booksies began at the beginning.
 
Posts: 10
Karma: 10
Join Date: Sep 2024
Device: iOS, Kindle PWSE
Hello!

While successful in using Calibre and deDRM, when I side load my books onto my Kindle - it does not show the titles as I have edited in metadata? I have attempted to reconvert and polish and am at a loss what to do next.

TYIA!
booksies is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
New polish sources fenuks Recipes 0 10-02-2011 10:18 AM
Google unveils new tool for searching its digitized books DMcCunney News 4 12-19-2010 07:58 PM
Google uses anti-fraud tool to help digitize books Wetdogeared News 14 09-18-2009 09:51 PM
eLibPro 1.3 - Windows tool to organize your e-books Alexander Turcic Deals and Resources (No Self-Promotion or Affiliate Links) 1 02-06-2005 10:44 PM


All times are GMT -4. The time now is 12:21 PM.


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