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

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 09-06-2020, 05:38 AM   #1
tycho
Member
tycho began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jun 2018
Device: samsung
set_metadata -f comment does mesup my HTML

Hello

Thanks for calibre, great tool.

I use "calibredb set_metadata -f comment" to update the comments (from a CSV, by hundreds in a loop, over linux)

I give a specific valid HTML string in a doublequotes, that I want to go in the "comment" field, but in the end, the HTML is messed-up in the 'comment section.

snipet:

Code:
calibredb --username=xxx --password=xxx --with-library=http://xxx:2525/#bibi set_metadata -f 'comments:0<br><ul><li>a.B</li></ul>' 4991
then I have this STDOUT:

Code:
Title               : 1849-10-20-[FG.corresp.B02-4-litt-12 1849-10-20 comme je vous l'ai promis]
[snip]
Comments            : 0<br><ul><li>a.B</li></ul>
[snip]
which tells the calibredb accepted my HTML string.

But when I open the ebook and look at the description field:

Code:
<div><p class="description">0<br></p><ul><li>a.<p class="description">B</p></li></ul></div>
My string "a.B" is splitted into two paragraphs. WTH?

It was splitted by a <p class="description"> tag.

What can I do to avoid this?
tycho is offline   Reply With Quote
Old 09-06-2020, 10:51 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: 43,839
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Comments are normalized in many places by many different things. They are not a suitable place to store structured data. Use a custom column for that.
kovidgoyal is offline   Reply With Quote
Advert
Old 09-11-2020, 03:07 AM   #3
tycho
Member
tycho began at the beginning.
 
Posts: 23
Karma: 10
Join Date: Jun 2018
Device: samsung
Thanks very much. Your response is greatly appreciated, and your reactivity as well

The issue is limited, I will have to live with it.
tycho is offline   Reply With Quote
Reply

Tags
calibredb, comments, html, set_metadata

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
set_metadata and covers DarkAbsynthe Calibre 12 09-19-2020 02:38 PM
Metadata comment changes in HTML not saved calvin-c Calibre 1 08-10-2020 02:50 AM
Empty comment not identified by comment:false search madeleinelevy Library Management 11 03-22-2019 06:36 PM
command line set_metadata mezme Library Management 1 05-23-2013 11:10 PM
Newbie: set_metadata? OffColour Development 4 06-27-2012 10:52 AM


All times are GMT -4. The time now is 06:11 PM.


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