07-11-2016, 12:25 PM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jul 2016
Device: ASUS fonepad
|
XML characters in metadata
Hi, this is the first time I'm posting here...sorry if I'm in the wrong place, but I'm not very familiar with how mobile read works (i.e. threads and such).
Anyway I have a problem when editing metadata with Calibre. Actually with showing said metadata in my ebook reader (I use Bookari, a.k.a. Mantano). You see, when I download metadata from, let's say, Amazon, and modify epub, comment (book info) should show in ebook reader, but it doesn't. Eventually, I discovered that the problem is in these xml tags: < and > in content.opf. Mantano won't read description in content.opf that starts with these tags. I have no idea how can I configure calibre not to put these. Books the comments of which Mantano reads have only <dc:description> and </dc:description> at the beginning and the end , respectively, in content.opf. HTML source (in edit metadata window) of books that have their own description (which Mantano reads) and the books the metadata of which Calibre downloaded shows that tags used are the same (<p class="description"> , <div>, etc.) in both cases. When I erase those xml tags from description section in content.opf and leave only bare text and save changes, Calibre just puts them back. When I erase them in Sigil, they stay erased. So, the only thing that's left is that Calibre is forcing these tags in content.opf. Is there anyway around this? Without manually editing content.opf of every book. Something in Calibre configuration? Thanks in advance! And thanks for all the work! |
07-11-2016, 12:33 PM | #2 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
calibre auto-HTMLizes all comments, but you can "cheat" and clean out the tags using bulk search & replace.
See this thread for more details: https://www.mobileread.com/forums/sho...d.php?t=268119 Edit: And this thread has a plugin which should also do the job I think: https://www.mobileread.com/forums/sho...d.php?t=271734 |
Advert | |
|
07-11-2016, 01:11 PM | #3 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jul 2016
Device: ASUS fonepad
|
Thank you so, so much for this!!! I've been searching for a solution on the net for the past three days, but nowhere in the results were those threads...Plug-in you pointed me to worked perfectly!
|
07-11-2016, 01:13 PM | #4 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
To be fair, I found it myself because I remembered the author of the plugin and did an attachment search.
|
07-11-2016, 01:39 PM | #5 |
Grand Sorcerer
Posts: 6,336
Karma: 12117215
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Well, I've removed, at least, the faulty releases
|
Advert | |
|
07-11-2016, 02:45 PM | #6 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jul 2016
Device: ASUS fonepad
|
|
07-11-2016, 03:45 PM | #7 |
Grand Sorcerer
Posts: 6,336
Karma: 12117215
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
You're welcome. I didn't think it could be useful really, that's the reason it's only at that thread.
|
07-11-2016, 04:56 PM | #8 | |
null operator (he/him)
Posts: 20,936
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
They say prevention is better than cure, see ==>> Preferences->Download Metadata->Convert all downloaded comments to plain text.
Quote:
BR Last edited by BetterRed; 07-11-2016 at 05:21 PM. |
|
07-11-2016, 05:00 PM | #9 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Do plaintext downloaded comments lose the
Code:
<p class="description"> |
07-11-2016, 05:08 PM | #10 |
null operator (he/him)
Posts: 20,936
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
@eschwartz - seems so - on the test I did before prior post I didn't see any mark up between <dc:description> and <\dc:description> in content.opf, and I chose a book riddled with bold and italics in its comments.
I only noticed the setting the other day when responding to the issue regarding downloading Authors from B&N. BR |
07-11-2016, 05:15 PM | #11 |
Ex-Helpdesk Junkie
Posts: 19,421
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Nice find, then!
|
07-11-2016, 06:04 PM | #12 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Jul 2016
Device: ASUS fonepad
|
Quote:
|
|
07-11-2016, 06:19 PM | #13 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jul 2016
Device: ASUS fonepad
|
In HTML source of metadata they don't...aside from <p class="description">, they still have for example <div> for paragraphs and <br> for line breaks. The problem was that Calibre translated < and > into < and > respectively in the content.opf which should have no tags at all. With plug-in that doesn't happen - there's no <p class="description">, <div> and <br> tags in the description section of content.opf, you just have bare text but separated in paragraphs following the <div> tag pattern of the HTML source. The same goes for line breaks.
|
07-11-2016, 06:57 PM | #14 | ||
null operator (he/him)
Posts: 20,936
Karma: 27620688
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
Quote:
Quote:
I did a spot check on one book and the result was fine - the dc:description was free of any HTML markup. I don't use the metadata download feature much, what's more I normally have Comments unchecked. BTW - I am not suggesting that the setting obviates the need for Terisa's plugin, in fact I've suggested it be made a registered plugin. BR Last edited by BetterRed; 07-11-2016 at 07:26 PM. |
||
07-11-2016, 08:28 PM | #15 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Jul 2016
Device: ASUS fonepad
|
Quote:
I agree, it would still be good to make this official plug-in, regardless of this being a bug or not . |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help needed - odd characters printing w/custom metadata jacket tags | jecilop | Library Management | 5 | 07-11-2017 06:18 PM |
After merging all the .xml files, how do you divide it back into .xml files? | automa | Sigil | 10 | 08-13-2013 07:43 AM |
¿Convert unicode decomposed characters to unique/normal characters? | JohnQwerty | Calibre | 3 | 04-05-2012 12:08 PM |
[PRS-650] media.xml - Title from Metadata Plugboard is not used | Maniac | Devices | 9 | 10-08-2011 11:01 AM |
Why xml?? | real_yoni | Sony Reader Dev Corner | 1 | 01-20-2009 11:45 AM |