View Full Version : regular expression - importing vs testing


pbj
01-20-2010, 07:07 PM
My books are on my hard drive in the format:

Author - Series - Title

I would like to import them into calibre like:

author = Author
title = Series - Title

in v0.6.34, in preferences.add/save, i have changed the regular expression to:

(?P<author>[^-]+) - (?P<title>.+)

i test it with my file names, and it works as intended.

so i go back to add books, on the main menus, and choose my directory.

all the books import like:

author = Author
title = Title

i would expect the import engine to produce the same results as the test button did.

have i done this correctly?

thanks

kovidgoyal
01-20-2010, 09:54 PM
You have to check the option to read metadata from filesnames and not theinternal metadata in the file

gwelgoth
01-22-2010, 08:43 AM
Hi kovidgoyal,
I have to import a huge library with almost all books in pdf format. I'm looking for best way now. If this option is on (read metadata from filesnames) then I am not getting covers from pdfs. But it looks very nice with covers therefore I wish to import covers too.
Is there only one way - to update somehow in batch metadata of books and when to import in calibre?

kovidgoyal
01-22-2010, 08:48 AM
There is a batch metadata edit dialog (click the arrow next to the edit meta information button)

gwelgoth
01-22-2010, 12:18 PM
It can't help me really because means much renames of title per book.
Many books don't have metadata, other - only field "title" with content "author - title", some books - instead of title and author - just a trash as for example "unknown".
So after import I have more as 70% books with wrong author/title.

gwelgoth
02-09-2010, 02:02 PM
Hi kovidgoyal,
Is it right that I wrote before - I'll get covers only with option OFF - "read metadata only from file name" ? Would it possible to do the getting of covers separately from metadata? As separate option may be?
Brgds