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 07-15-2020, 05:11 PM   #16
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,524
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by droopy View Post
Are you folks sure Regex can't automate this?
Of course it can as long as the transforms are fixed rules and not "do some random thing". theducks gave you one solution in post 9.
chaley is offline   Reply With Quote
Old 07-22-2020, 02:18 AM   #17
droopy
Guru
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
Quote:
Originally Posted by theducks View Post
Me neither stripping dot and or optional spaces

Search <<<Not tested
([A-Z])\.*\s*([A-Z])\.*\s*(.+)

Replace
\1\2 \3
Like this, Ducks?
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2020-07-21 23-17-29.png
Views:	169
Size:	22.6 KB
ID:	180840  
droopy is offline   Reply With Quote
Old 07-22-2020, 02:28 AM   #18
droopy
Guru
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
It doesn't seem to work.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2020-07-21 23-28-03.png
Views:	205
Size:	46.4 KB
ID:	180841  
droopy is offline   Reply With Quote
Old 07-22-2020, 05:38 AM   #19
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,524
Karma: 8065948
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
You must use "matches regex pattern".
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.png
Views:	158
Size:	14.5 KB
ID:	180843  
chaley is offline   Reply With Quote
Old 07-22-2020, 05:51 AM   #20
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 80,472
Karma: 150249619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
In the two examples of C. S. Lewis and John Q. Smith, A single regex cannot fix both as they are too different. You can do regex for names that match C. S. Lewis and another regex that match John Q. Smith. Then you'd just create a new regex for any other name formats that you want to change that do not fit either of these two.
JSWolf is offline   Reply With Quote
Old 07-25-2020, 06:53 PM   #21
droopy
Guru
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
Quote:
Originally Posted by JSWolf View Post
In the two examples of C. S. Lewis and John Q. Smith, A single regex cannot fix both as they are too different. You can do regex for names that match C. S. Lewis and another regex that match John Q. Smith. Then you'd just create a new regex for any other name formats that you want to change that do not fit either of these two.
So what are the other regex codes/rules that I should add?
droopy is offline   Reply With Quote
Old 07-25-2020, 06:55 PM   #22
droopy
Guru
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
Quote:
Originally Posted by chaley View Post
You must use "matches regex pattern".
chaley,
i did use "matches regex pattern", didn't I? I mean, I'm comparing my screenshot with yours and it's the same. Could you run a test with your rule and tell me if it works for you? Coz it doesn't for me.
droopy is offline   Reply With Quote
Old 07-25-2020, 09:12 PM   #23
thiago.eec
Wizard
thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.thiago.eec ought to be getting tired of karma fortunes by now.
 
Posts: 1,276
Karma: 1419583
Join Date: Dec 2016
Location: Goiânia - Brazil
Device: iPad, Kindle Paperwhite, Kindle Oasis
Quote:
Originally Posted by droopy View Post
chaley,
i did use "matches regex pattern", didn't I? I mean, I'm comparing my screenshot with yours and it's the same. Could you run a test with your rule and tell me if it works for you? Coz it doesn't for me.
You first screenshot is correct. The second one, when doing the test, is different. It is not using regex.
thiago.eec is offline   Reply With Quote
Old 07-29-2020, 12:16 PM   #24
droopy
Guru
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
Quote:
Originally Posted by theducks View Post
Me neither stripping dot and or optional spaces

Search <<<Not tested
([A-Z])\.*\s*([A-Z])\.*\s*(.+)

Replace
\1\2 \3
Hi Ducks,
your code works for
C. S. Lew --> CS Lew

But for Charles Q. Smith
it becomes
Ch arles Q. Smith
(space between h and a. And dot after Q. isn't removed).


Bob T. Johnson --> Bo b T. Johnson
Bob A. B. Johnson --> Bo b A. B. Johnson
droopy is offline   Reply With Quote
Old 07-29-2020, 12:58 PM   #25
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: 31,206
Karma: 60406678
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by droopy View Post
Hi Ducks,
your code works for
C. S. Lew --> CS Lew

But for Charles Q. Smith
it becomes
Ch arles Q. Smith
(space between h and a. And dot after Q. isn't removed).


Bob T. Johnson --> Bo b T. Johnson
Bob A. B. Johnson --> Bo b A. B. Johnson
I gave you code for C. S. Lewis ( type case), just what you asked for (I did not even try to develop a general REGEX.

Again:
Why not use the Quality Check Plugin: to detect and FIX (that is where you also set the initials pattern desired)?

I run the detect (Check Authors initials), then run Fix on the reviewed-selected results (there are some cases to NOT fix)
theducks is offline   Reply With Quote
Old 07-29-2020, 01:09 PM   #26
droopy
Guru
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
Quote:
Originally Posted by theducks View Post
I gave you code for C. S. Lewis ( type case), just what you asked for (I did not even try to develop a general REGEX.
I asked for that in the title, for sure. But in the first post, I mentioned others that I couldn't fit into title.

Quote:
Originally Posted by theducks View Post
Again:
Why not use the Quality Check Plugin: to detect and FIX (that is where you also set the initials pattern desired)?
I have done that before. But I'd rather fix it as I download metadata.
droopy is offline   Reply With Quote
Old 08-16-2020, 07:15 PM   #27
droopy
Guru
droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.droopy ought to be getting tired of karma fortunes by now.
 
Posts: 834
Karma: 2912460
Join Date: Apr 2009
Device: Kobo Forma
I discovered a problem with my peculiar standardizing of removing spaces and dots: when it searches for metadata (i.e., "Download Metadata", or Ctrl-D), it sometimes misses the books. I'm now rethinking whether I should continue doing this.
droopy is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hello from e charn lew eric_charn_lew Introduce Yourself 1 03-25-2020 04:40 AM
Other Fiction Tolstoi, Lew: Erzählungen [German] v2; 30.07.2017 Karl May ePub Books 0 03-27-2017 01:28 PM
Other Fiction Tolstoi, Lew: Auferstehung. [German]. 20-Nov-2010 weatherwax Kindle Books 0 11-20-2010 10:07 AM
Other Fiction Tolstoi, Lew: Auferstehung. [German]. 20-Nov-2010 weatherwax ePub Books 0 11-20-2010 10:05 AM
Wallace, Lew: Ben-Hur. v1. 9 May 07 HarryT BBeB/LRF Books 5 05-10-2007 05:20 PM


All times are GMT -4. The time now is 03:53 PM.


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