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 06-10-2013, 11:33 AM   #1
shentar
Member
shentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enoughshentar will become famous soon enough
 
Posts: 22
Karma: 510
Join Date: Jul 2011
Device: kindle
Adding books and generating metadata

PLEASE IGNORE - I FOUND THE ANSWER AS A PULLDOWN OPTION IN THE ADDING BOOKS DIALOG.
Unfortunately I can't delete this post

I'm trying to add a mass of .lit files to an existing library. I have two problems.

1. Some of them have metadata but most of it is a mess. However, the filenames are pretty well controleld. It takes the form

<author_name> - [<series> <series_index> - ]<title>

Dealing with the cases without the optional series section is easy but I can't figure out how to do a regular expression which can cope with an optional middle section.

2. Some of the books appear twice, with and without a metadata TOC. AFAICS the version with the TOC is always better formatted but is not always the largest file. Is there any way of determining the presence of a TOC without actually looking? This problem is less pressing as there are probably not too many cases to do it manually if I have to.

Hints, tips, solutions all welcomed!

Last edited by shentar; 06-10-2013 at 11:46 AM. Reason: I'm an idiot
shentar is offline   Reply With Quote
Old 06-10-2013, 11:48 AM   #2
gabby98
Wizard
gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.gabby98 ought to be getting tired of karma fortunes by now.
 
gabby98's Avatar
 
Posts: 1,751
Karma: 2667650
Join Date: Jul 2012
Device: Android, Nook Simple Touch, Nook Color, ..., Glo
I use this as my Adding Books RegEx...may this will work for you as well

PHP Code:
(?P<author>[^_-]+) -?\s*(?P<series>[^_0-9-]*)(?P<series_index>[0-9]*)\s*-\s*(?P<title>[^_].+) ? 
works for me even it f the series info is missing
gabby98 is offline   Reply With Quote
Advert
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Metadata when adding books dc696969 Library Management 0 03-26-2013 04:48 AM
Adding books: getting metadata from path? lbolton Library Management 2 08-05-2012 09:50 PM
Metadata BUG adding books Giuseppe Chillem Calibre 3 10-08-2010 05:13 PM
what calibre does when adding books? (metadata) jomaweb Calibre 1 02-06-2010 12:10 PM
Adding multiple books missed metadata 4.131 Bob Butler Calibre 3 01-27-2009 10:55 PM


All times are GMT -4. The time now is 07:10 AM.


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