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, 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: 2,800
Karma: 7279194
Join Date: Jan 2009
Location: in the middle of nowhere
Device: Paperwhite 3, iPad 9.7, 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: 21,858
Karma: 22086630
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, 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: 1,406
Karma: 5434962
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, 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: 2,800
Karma: 7279194
Join Date: Jan 2009
Location: in the middle of nowhere
Device: Paperwhite 3, iPad 9.7, 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

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 03:34 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 04:26 AM.


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