Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-24-2013, 01:44 PM   #1
ippopom
Enthusiast
ippopom began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2010
Device: palm tungsten T5
COMMENTS batch formatting - SOLVED

Hi to all

I have a huge library and I added books descriptions inside "comments" by copying and pasting description (synopsis) from web pages.
So the result is an incredible variety of different styles and fonts (formatting).

Is there a way to batch change the comments formatting in order to make them uniform ?

ThX by Ippopom

PS
the "erase formatting" button remove only the fonts attribute... but bakground colors and alignment remain untouched......

Last edited by ippopom; 02-27-2013 at 01:39 PM.
ippopom is offline   Reply With Quote
Old 02-24-2013, 06:48 PM   #2
calvin-c
Guru
calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.
 
Posts: 787
Karma: 1575310
Join Date: Jul 2009
Device: Moon+ Pro
This won't help with the batch formatting but you can avoid the problem in the future by using a text editor (like Windows Notepad) between the web & Calibre. Paste from Web into the text editor then cut from there & paste into Calibre. Running things thru a text editor strips off most attributes like fonts & colors. Alignment depends-it often turns tabs into multiple spaces but will strip most other alignment properties.
calvin-c is offline   Reply With Quote
Old 02-24-2013, 11:33 PM   #3
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,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the search and replace tab in the bulk metadata editor to strip all html tags. Something like

Search: <.*[^>]+>
Replace:

Remember to backup your library before doing bulk search and replace.
kovidgoyal is offline   Reply With Quote
Old 02-25-2013, 03:05 PM   #4
ippopom
Enthusiast
ippopom began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2010
Device: palm tungsten T5
Quote:
Originally Posted by kovidgoyal View Post
Use the search and replace tab in the bulk metadata editor to strip all html tags. Something like

Search: <.*[^>]+>
Replace:

Remember to backup your library before doing bulk search and replace.
kovidgoyal TnX a lot for suggestion

And TnX to Calvin too, I done what you suggested but I have a really massive library so the twice copy paste (to a text editor and inside comments) is a little bit "time wasting".
ippopom is offline   Reply With Quote
Old 02-25-2013, 04:26 PM   #5
ippopom
Enthusiast
ippopom began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2010
Device: palm tungsten T5
mmh tried but doesn't work (it seems)

ippopom is offline   Reply With Quote
Old 02-25-2013, 05:39 PM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,807
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Those are REGEX patterns. Select REGEX match mode
theducks is offline   Reply With Quote
Old 02-25-2013, 06:00 PM   #7
calvin-c
Guru
calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.calvin-c ought to be getting tired of karma fortunes by now.
 
Posts: 787
Karma: 1575310
Join Date: Jul 2009
Device: Moon+ Pro
Quote:
Originally Posted by ippopom View Post
And TnX to Calvin too, I done what you suggested but I have a really massive library so the twice copy paste (to a text editor and inside comments) is a little bit "time wasting".
Yeah, it's really only worthwhile for the initial entry-and maybe only in Windows where you can keep the Notepad window open beside Calibre, and maybe your Web browser. What I do is find the comments I want to keep in Calibre's download metadata screen. If I like how they're formatted I let Calibre download them-but sometimes I like the comments from one source & the other metadata (like publisher/date) from another. So I highlight the comments in the download window, Ctrl+C to copy to the clipboard, mouse-click to the open Notepad window, back to Calibre & finish the metadata download from whichever source. Then back to Notepad, Ctrl+A to select all, Ctrl+C to copy it, then back to Calibre & highlight whatever's in the comments, then Ctrl+C to paste from notepad. Really only takes a second or so if I don't have to edit anything or search out other sources-not much time at all compared to the time it takes Calibre to find the metadata in the 1st place. But you're right about it being a time waster for comments that have already been entered into Calibre. I'm not an expert with Regular Expressions but I have used them and that's a better approach for modifying Comments 'in place'.
calvin-c is offline   Reply With Quote
Old 02-26-2013, 01:23 PM   #8
ippopom
Enthusiast
ippopom began at the beginning.
 
Posts: 25
Karma: 10
Join Date: Mar 2010
Device: palm tungsten T5
Quote:
Originally Posted by theducks View Post
Those are REGEX patterns. Select REGEX match mode
ops..... you totally right .... TnX

It work adjusting the expression in this way: <[^>]+>

Last edited by ippopom; 02-26-2013 at 01:46 PM.
ippopom is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Comments - batch add? mezme Calibre 6 02-22-2015 08:32 PM
[Old Thread] Comments section *formatting* mezme Calibre 5 08-26-2011 06:22 PM
Conversion to Mobi - How to Prevent Formatting marks in Comments nynaevelan Calibre 8 01-03-2011 02:10 PM
[KOBO] Strip existing formatting to apply my own default formatting to all books digital_steve Calibre 2 08-10-2010 06:34 PM


All times are GMT -4. The time now is 05:47 PM.


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