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 01-14-2018, 05:03 AM   #1
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
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
Bulk Editing Comments

Help! My (limited) regex-fu is failing me.

I managed to extract summaries from within books using the MCS plugin into a custom column (#comments, type: long text).

I'm trying to transfer #comments to comments via bulk search and replace while at the same time replacing vertical whitespace with <br />. It doesn't seem to accept \v, though?

I've got around 4000 books (fanfics) to edit else I'd just fix it manually.

Thanks!
ilovejedd is offline   Reply With Quote
Old 01-14-2018, 11:30 AM   #2
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,901
Karma: 55267620
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Without seeing the actual code. \s+ will wipe out multiple spaces or EOL's in a row,
Just remember to replace it with either a EOL, or a <BR />
theducks is offline   Reply With Quote
Advert
Old 01-14-2018, 11:42 AM   #3
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,087
Karma: 8796704
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
link to the calibre Quick reference for regexp syntax.

bernie
Quote:
Originally Posted by ilovejedd View Post
Help! My (limited) regex-fu is failing me.

I managed to extract summaries from within books using the MCS plugin into a custom column (#comments, type: long text).

I'm trying to transfer #comments to comments via bulk search and replace while at the same time replacing vertical whitespace with <br />. It doesn't seem to accept \v, though?

I've got around 4000 books (fanfics) to edit else I'd just fix it manually.

Thanks!
gbm is offline   Reply With Quote
Old 01-14-2018, 07:23 PM   #4
ilovejedd
hopeless n00b
ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.ilovejedd ought to be getting tired of karma fortunes by now.
 
ilovejedd's Avatar
 
Posts: 5,111
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
Thanks!

The code I was using was simply:

Search:
Code:
\v
Replace:
Code:
<br />
I didn't want to simply wipe multiple whitespaces and do blanket replace with <br>, just the whitespace that are EOL. Using \n instead of \v worked. I guess Calibre discards \r in metadata?
ilovejedd is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editing metadata comments in bulk phossler Calibre 14 10-15-2018 02:19 PM
Bulk Add Comments haino Library Management 21 02-24-2015 05:36 PM
Bulk Edit - Justify Metadata Comments lazorbeam Library Management 8 01-25-2015 05:48 PM
Bulk Edit of comments using regex PeterT Library Management 2 07-25-2012 08:10 AM
Bulk Edit Comments column Jade Aislin Library Management 0 10-27-2011 03:18 AM


All times are GMT -4. The time now is 05:20 AM.


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