View Single Post
Old 11-25-2010, 07:19 AM   #2
DoctorOhh
US Navy, Retired
DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.DoctorOhh ought to be getting tired of karma fortunes by now.
 
DoctorOhh's Avatar
 
Posts: 9,897
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
Quote:
Originally Posted by alophind View Post
Hi ,
In all the books I import , calibre put the author as book title and book title as author .
You can select all the books you wish to swap and choose Edit Metadata, check swap title and author box then click ok and all titles and authors for the books selected will be swapped.

Alternatively you can try to get the info correct to begin with. Calibre tries to get the info from metadata but if that fails it uses the regular expression under Preferences - Adding books to extract info from the file name.

Try this regex
Code:
^((?P<title>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)\s*-\s*)?(?P<author>[^\-_0-9]+)
or this one

Code:
^((?P<author>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)\s*-\s*)?(?P<title>[^\-_0-9]+)
After entering either put a file you would like to add including the epub or mobi extension in the test window and test it to see what is populated. I didn't write either but one or the other usually works for me.

Last edited by DoctorOhh; 11-25-2010 at 07:21 AM.
DoctorOhh is offline   Reply With Quote