![]() |
#1 |
Member
![]() Posts: 18
Karma: 10
Join Date: Jun 2012
Location: Spain
Device: Kindle DX, Kindle Paperwhite, and Kindle Scribe
|
Convert comments field to HTML in bulk
Hi!
I have read in these forums that while comments are displayed/edited as HTML they are not always stored internally as HTML code, depending on where they originally come from. Sometimes they are just stored as plain text. After you edit a comment using the calibre metadata editor it is always stored as HTML internally. That said, is there any way to get all the comments in a bunch of books converted to HTML the same way the metadata editor would do? Some template that performs this operation in bulk? |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,168
Karma: 57532198
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
While you may paste plain text, there is always HTML on that tab.
It is just simple. <p>words</p> Same as you would get by 'using the remove formatting (of selected text) |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Member
![]() Posts: 18
Karma: 10
Join Date: Jun 2012
Location: Spain
Device: Kindle DX, Kindle Paperwhite, and Kindle Scribe
|
Quote:
I have lots of e-books in ePub format whose Comments field was filled during the import process and it is stored internally in plain text (in the Comments field in the calibre database). I want to convert the Comments format for those e-books to HTML prior to some regex Search & Replace tweak. To that end, I need that all my e-books have their Comments field stored internally in HTML. |
|
![]() |
![]() |
![]() |
#4 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,316
Karma: 133361584
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
All of your comments are converted to HTML if they are not HTML. So you don't need to convert them. Select a book you think has the comments not in HTML. Press the E key and then under the blurb, click the HTML Source tab. You'll see that it is HTML. |
|
![]() |
![]() |
![]() |
#5 | |
Member
![]() Posts: 18
Karma: 10
Join Date: Jun 2012
Location: Spain
Device: Kindle DX, Kindle Paperwhite, and Kindle Scribe
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,316
Karma: 133361584
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Why is it you need the blurb to be HTML? |
|
![]() |
![]() |
![]() |
#7 | |
Member
![]() Posts: 18
Karma: 10
Join Date: Jun 2012
Location: Spain
Device: Kindle DX, Kindle Paperwhite, and Kindle Scribe
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#8 |
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38,148
Karma: 152037714
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Odd. When I download metadata, it shows bold, italic, underlines, etc. and those seem to survive closing and re-opening calibre. Perhaps what is stored in the database is not HTML code but the HTML code seems to survive that storage.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bulk convert HTML characters for epub | christopher88 | ePub | 13 | 12-02-2013 12:23 PM |
Metadata Comments Field - How to best tweak the html? | Chris_Snow | Library Management | 5 | 08-13-2013 02:58 AM |
Comments field | emeybee | Calibre | 1 | 05-27-2010 02:01 PM |
Comments field | banjomike | Calibre | 7 | 04-08-2010 02:18 PM |
Comments field | hyperact | Calibre | 3 | 12-28-2008 01:38 PM |