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 03-21-2023, 10:30 AM   #1
crnirg
Enthusiast
crnirg began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
How to get out of "Title" 1 part of "Author"

Now :
Author : Unknown
Title : Isaac Asimov@Pebble in the Sky

It should be like this :
Author : Isaac Asimov
Title : Pebble in the Sky


How to get out of "Title" 1 part of "Author"
Specifically, I mistakenly put a book into the title, which now looks to me in the title: Author@Title (@ me used to separate) and I would like to transfer the Author to its place now from the Title and to stay the rest in the Title as it should?
English is not the best for me.
crnirg is offline   Reply With Quote
Old 03-21-2023, 12:36 PM   #2
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 7,698
Karma: 212939160
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Um... copy/paste? Or do you mean in bulk for several books?
Sirtel is online now   Reply With Quote
Advert
Old 03-21-2023, 12:54 PM   #3
crnirg
Enthusiast
crnirg began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
Sure for bulk . 350 books.
crnirg is offline   Reply With Quote
Old 03-21-2023, 01:11 PM   #4
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: 28,651
Karma: 50383856
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Bulk mode in the Metadata editor: Search and replace
Assumes all are like this: Title : Isaac Asimov@Pebble in the Sky
Not tested REGEX MODE use the right side to see all is good

2 Passes. The first copies the Author to its proper place

Search Title:
Code:
(.+?)\@(.+)
Destination field AUTHOR:
Replace with: \1

The 2nd cleans up
Same search
Destination field: Title
Replace with: \2
theducks is offline   Reply With Quote
Old 03-21-2023, 01:41 PM   #5
crnirg
Enthusiast
crnirg began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
What to say except many thank you - it works right!
If you could only briefly explain a little

Code:

(.+?) \@(.+)

Replace with: \1 or 2


Yes I don't have to read everything about Regex
crnirg is offline   Reply With Quote
Advert
Old 03-21-2023, 02:32 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: 28,651
Karma: 50383856
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 crnirg View Post
What to say except many thank you - it works right!
If you could only briefly explain a little

Code:

(.+?) \@(.+)

Replace with: \1 or 2


Yes I don't have to read everything about Regex
The ( ) are the captures 1 and 2
.+ is a general wildcard. the ? makes it less greedy

\@ is just the escaped @ (escape eliminates any other meaning)
So Capture pattern #1 matches up to the @ and stops
Capture 2 is all the rest

the \# is what was captured. so you designate which goes where and in the case of part 2, get tossed because you replaced Title with just #2
theducks is offline   Reply With Quote
Old 03-21-2023, 05:40 PM   #7
crnirg
Enthusiast
crnirg began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
Thank you very much.
Given that the best way to learn is through examples, I will probably remember this (and write it down).
crnirg is offline   Reply With Quote
Old 03-21-2023, 06:35 PM   #8
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: 28,651
Karma: 50383856
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 crnirg View Post
Thank you very much.
Given that the best way to learn is through examples, I will probably remember this (and write it down).
Search MR. There are a couple of excellent REGEX tutorials.
What we need can usually be done with simple REGEX.
Also We use the PCRE flavor
theducks is offline   Reply With Quote
Old 03-21-2023, 07:27 PM   #9
Karellen
Guru
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 657
Karma: 2727776
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Try this beginners tutorial. Its where I started a couple of years ago...
https://regexone.com/lesson/introduction_abcs
Karellen is offline   Reply With Quote
Old 03-23-2023, 12:13 PM   #10
crnirg
Enthusiast
crnirg began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
Thank you both for the answers, really.
crnirg is offline   Reply With Quote
Old 03-23-2023, 02:07 PM   #11
crnirg
Enthusiast
crnirg began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
When start
How merge 2 strings to 1 string - like :
Isaac Asimov Pebble Sky.pdf (strings #1 #2 #3 #4)
to
Author : Isaac Asimov (string #1 + #2)
Title : Pebble in the Sky (string #3 + #4)

Don't have separator .
crnirg is offline   Reply With Quote
Old 03-23-2023, 04:20 PM   #12
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: 28,651
Karma: 50383856
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
ASSUMES Authors ONLY have 2 parts. Be sure to use on only those

(.+\s.+?)\s(.+)

Author is \1
Title is \2

No need to treat as 4 parts
\1=Anything space anything
\2=Everything else

If it has a Mi (but full name)
(.+\s*.\.\w\s+?)\s(.+)
the first \s allows for no space
theducks is offline   Reply With Quote
Old 03-23-2023, 07:38 PM   #13
crnirg
Enthusiast
crnirg began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
S field -- > Title
Search : (.+\s.+?)\s(.+)
R with --> \1
TEST:
Isaac Asimov Pebble Sky.pdf ---> Isaac Asimov Pebble

S field -- > Title
Search : (.+\s.+?)\s(.+)
R with --> \2
TEST:
Isaac Asimov Pebble Sky.pdf ---> Sky.pdf
crnirg is offline   Reply With Quote
Old 03-23-2023, 08:21 PM   #14
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: 28,651
Karma: 50383856
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Makes me think the that is not a space in the authors name
Try this for the first capture
(\w\s\w)

Also make sure Case Sensitive is not ticked
theducks is offline   Reply With Quote
Old 03-23-2023, 08:46 PM   #15
crnirg
Enthusiast
crnirg began at the beginning.
 
Posts: 27
Karma: 10
Join Date: Nov 2010
Device: kindle
Test:
Isaac Asimov Steel ---> result is ok :
(\1)
Author : Isaac Asimov
(\2)
Title : Steel

but Isaac Asimov Steel of Iron is not OK
( \1)
Author : Isaac Asimov Steel of
(\2)
Title : Iron
crnirg 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
Deducing "Author sort" and "Title sort" through CLI wladdy Library Management 8 08-04-2020 05:20 AM
Remove "Author" from "Title" field ctop Library Management 0 02-25-2020 10:19 PM
Use "short" instead of "full" title for title sort & renaming? wolpi Library Management 2 08-04-2016 05:25 PM
A warning for Linux users: slow "Add Books", "Unknown" title and Author rolgiati Library Management 8 07-24-2013 04:36 PM


All times are GMT -4. The time now is 09:26 PM.


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