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 01-14-2018, 06: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: 2,382
Karma: 5761678
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PRS-350, Nexus S, Galaxy S, Nook Color, iPhone4, iPT4, iPad 2012
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
Advert
Old 01-14-2018, 12:30 PM   #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: 21,339
Karma: 20890066
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab 2(RIP)
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
Old 01-14-2018, 12:42 PM   #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: 1,318
Karma: 5400084
Join Date: Jun 2010
Device: Windows 10 tablet,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, 08: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: 2,382
Karma: 5761678
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PRS-350, Nexus S, Galaxy S, Nook Color, iPhone4, iPT4, iPad 2012
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


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


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