![]() |
#1 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2019
Location: Europe
Device: Kobo Aura
|
![]()
Hey guys,
Joined the forum because I have a very specific question I cannot find the answer to: some of the summaries on my Kobo Aura show line breaks and others look perfectly fine. Sometimes there's also an abrupt font change. I use the Calibre 'Comments' field to add the summaries. In Calibre everything looks fine. When I check the metadata html, the summary is coded in seperate lines, rather than one line, which is what's causing the linebreaks: When there's a font change, it's also reflected in the html. I've had this happen with summaries I got via 'download metadata', that I c&p into the box or that were already embedded in the file. The only thing that fixes it is editing the html or manually replacing the space where the line break is in the 'Comments' field. My question is, does anybody have any idea why this happens and how I can fix it in bulk or prevent it from happening in the future? I have 2000+ books in my library, checking and manually changing all of them would be a huge effort. Thanks! |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,211
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Edit metadata in bulk
@agirlnamedfia
Have you tried using Edit metadata in bulk > Search and replace? You could use regular expressions* like this: Code:
Search field: comments Serch for: <p>(.*?)</p> Replace with: \1 Code:
Search for: style="(.*?)" Replace with: - leave it blank Code:
Search for: <span(.*?)>(.*?)</span> Replace with: \2 Is this what you are looking for? *Change the search mode to regular expressions. Last edited by thiago.eec; 05-08-2019 at 05:59 PM. Reason: added info about search mode |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Iirc, there's a Calibre plugin available to strip all formatting from comments. I think it was called Clean Comments or something?
|
![]() |
![]() |
![]() |
#4 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 46,191
Karma: 168983734
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
I think the plugin ilovejedd is referring to is Terisa de morgan's Cleaning Comment plugin.
|
![]() |
![]() |
![]() |
#5 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
I haven't seen any issues with fonts changes. Any strangeness there on the device, I can see in calibre and fix there before resending the books. Also, your image isn't showing. You could post the code within code-tags so that we can see what you have. That might help to prove what the issue is if I am wrong. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |||
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2019
Location: Europe
Device: Kobo Aura
|
Thanks for the suggestions! Here's what I tried.
Quote:
Quote:
![]() Quote:
Anyway, apologies for the image not showing. Should be fixed now? I can't show you the code in tags because it won't show what the problem is, but I took some more screenshots... This is what the code in "Edit Book" looks like. As marked, the line breaks happen when every line gets a new line number, for lack of a better explanation: This is what the "Edit Metadata" comments section looks like in normal view, where no line breaks are visible: This is what the "Edit Metadata" comments section looks like in HTML view, where you can see the line breaks: If I remove the line breaks in the HTML view, then the problem is solved, but like I said before, I'd rather not have to check all the books and manually change them if I can at all help it... |
|||
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2019
Location: Europe
Device: Kobo Aura
|
UPDATE: I came across another book where the font spontaneously changes mid-summary. I tried
None of these got rid of the font code. Here's what it looks like in the HTML view of "Edit Metadata": ![]() And here is what the code looks like in "Edit Book": ![]() Also I haven't a clue what's up with the image hosting (I uploaded them to a public MobileRead album and copied the BBCode, I feel like that should work?) but I hosted these externally so HOPEFULLY you'll be able to see them. If not, see attachments. |
![]() |
![]() |
![]() |
#8 |
hopeless n00b
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,110
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Another thing you can try installing is the Job Spy plugin. It has an option to convert comments into plain text.
P.S. Please note you'll need to run Polish books, Embed metadata, Convert or use the Send to device function to actually update the embedded comments metadata in the ePub file sent to the Kobo. P.P.S. I think the latest version of Calibre gets rid of the line breaks when downloading comments metadata. For existing comments though, you could do a search and replace to convert them to space. Code:
Search field: comments Search for: \n Replace with: (space) P.P.P.S. And for removing <font> tags. Code:
Search field: comments Search for: <font[^>]*>(.*)</font> Replace with: \1 Last edited by ilovejedd; 05-10-2019 at 03:45 PM. |
![]() |
![]() |
![]() |
#9 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,211
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
|
Quote:
Code:
Search field: comments Search for: "([^>])\n" Replace with: "\1 " Well, regex gain: Code:
Search field: comments Search for: <font(.*?)>(.*?)</font> Replace with: \2 Last edited by thiago.eec; 05-10-2019 at 04:15 PM. Reason: correction for the font code |
|
![]() |
![]() |
![]() |
#10 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2019
Location: Europe
Device: Kobo Aura
|
YES.
Hallelujah, I managed to get rid of all of them with the bulk search/replace. Still no clue why this happens sometimes and not others, but I suppose I'll have to check new books in the future. Thanks so much for the help, guys! ![]() |
![]() |
![]() |
![]() |
#11 | ||
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
Quote:
Quote:
To demonstrate this, the attached book has the following in the comments in calibre: Code:
<div><p>This is a comment. There is a linebreak after the word linebreak.</p><p>There are no linebreaks between this comment and the previous one. The p close and open tags are on the same line.</p> <p>But there are two linebreaks before this one. i.e. there are two lines between the close and open tags.</p><p>And in this paragraph, there is a linebreak after each word . With two linebreaks after the four-letter words.</p></div> If this isn't what you are seeing on the device, we need to see screenshots or photos to show what you are seeing. A quick fix for this seems to be using a metadata plugboard for the comments. Apparently the template "{comments}" will remove the linebreaks. |
||
![]() |
![]() |
![]() |
#12 |
Junior Member
![]() Posts: 5
Karma: 10
Join Date: May 2019
Location: Europe
Device: Kobo Aura
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Book summaries on the Kindle? | Uthred | Amazon Kindle | 20 | 03-16-2013 06:34 AM |
Compressed Book Summaries | Tony30 | Deals and Resources (No Self-Promotion or Affiliate Links) | 1 | 02-25-2013 07:57 AM |
Book summaries not fully downloading with v3.0 151 | chilady1 | Related Tools | 7 | 04-11-2012 04:21 PM |
Soundview Executive Book Summaries | pking36330 | Deals and Resources (No Self-Promotion or Affiliate Links) | 4 | 11-11-2009 09:17 PM |
Summaries of books available | RandmTask | Reading Recommendations | 3 | 08-24-2009 09:19 AM |