View Single Post
Old 02-11-2011, 10:42 PM   #9
Synful
Member
Synful began at the beginning.
 
Synful's Avatar
 
Posts: 18
Karma: 10
Join Date: Feb 2011
Device: Kindle 3
Quote:
Originally Posted by kiwidude View Post
As you say you have a lot of books, if their file naming is consistent like "Author - Series - Title" or "Title - Series - Author" or whatever then it would be worth trying to get a regex to suit. However consistent naming conventions are key. If some books just have the author, others just a title, others with the author and title in different orders etc then quite frankly you have a mess that you have to rename the files on to have any hope of success with regular expressions.

If your filenames are consistent, then first try the ability to test the regular expression(s) included with Calibre on the Preferences->Adding books dialog. Copy a filename in (don't forget the extension) and click the Test button and look below to see what Calibre tried to interpret was the Title/Author etc. If you can give some example names - e.g. those names you gave already on this thread, are they how all your files are named? then someone can help you with a regular expression to suit.

Or plan B is to just try to use metadata stored within the file (only certain formats support this). To enable this you must tick the "Read metadata from file contents rather than filename" option in Preferences->Adding books. It might give you a better starting point than filename if you have no idea on the regular expression to use. As I said above only certain book formats support this to varying extents, and the fallback is to use the filename/regular expression approach where it can't find data inside the file. So you may still be in the situation of having to edit the data yourself (but it might be less "wrong").

There are other ways to add such as if you know the ISBNs for each book but those are your main ones. Check out Kovid's video tutorials, the FAQ and user manual too - this stuff should be well covered in there.

Okay, I'm back...again....and I've been a busy little bee!

1. I've renamed all my books to the following format: Author - Series - Title
(ex: Nora Roberts - Calhoun Woman 01 - Courting Catherine).

2. I've changed the regular expression in Preferences>Adding Books to read:
(?P<author>[^_-]+) -?\s*(?P<series>[^_0-9-]*)\s*-\s*(?P<title>[^_].+) ?

3. I've changed the "save template" in Preferences>Saving Books to Devices to read: {authors} - {title}

4. I've uploaded the books into folders on my K3.

PROBLEM: Now the books have quotation marks before the title of each book. (ex: "" Calhoun Woman 01 - Courting Catherine) Where the hell did those come from???? I was so proud of myself and then I saw those. I think I might have pulled out a chunk of hair after that...I'm not sure....it's a bit blurry. lmao

Thoughts????
Synful is offline   Reply With Quote