Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 01-17-2009, 11:55 PM   #16
darkmonk
Connoisseur
darkmonk began at the beginning.
 
Posts: 58
Karma: 12
Join Date: Jan 2009
Device: none
Quote:
Originally Posted by darkmonk View Post
Hey guys, I got into ebooks a while ago, and have just discovered the wonderful software that is Calibre. I'd like to add my collection, which is sorted in folders with the author's name. The files are named as "author - series # - title" i.e., "Cornelia Funke - Ink 2 - Inkspell.pdf"

However, not all files have a series, and I am not particularly adept at coding, so I am unsure what I should put as the regular expression for metadata guessing.

If anyone could suggest a line, or a way to take the series only when there are more then one dash, please tell me.
I should have know people would have forgotten
darkmonk is offline   Reply With Quote
Old 01-18-2009, 12:21 AM   #17
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,414
Karma: 27757236
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can make part of a regular expression optional by appending a question mark to it
kovidgoyal is offline   Reply With Quote
Advert
Old 01-18-2009, 12:30 AM   #18
darkmonk
Connoisseur
darkmonk began at the beginning.
 
Posts: 58
Karma: 12
Join Date: Jan 2009
Device: none
OK, thanks, but when I make a part optional, when is it used? Is it used when there is more data left after the other parts have been filled?

I try "(?P<author>.+) - (?P<series>.+)? - (?P<title>[^_]+)" but the series part is not bypassed when there are fewer then two dashes in the name. Consequently, the title becomes "Al Sarrantonio - Pumpkin Head", instead of what I want it to be.

Last edited by darkmonk; 01-18-2009 at 12:51 AM.
darkmonk is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
K3 Here, Have any questions? Anarel Amazon Kindle 15 08-26-2010 08:34 PM
PRS-900 Two Questions luqmaninbmore Sony Reader 21 02-21-2010 02:25 PM
could somebody help me with my questions? yingwu Introduce Yourself 1 05-27-2009 05:34 PM
2 questions AJ Starr Which one should I buy? 6 07-03-2008 12:37 PM
Few questions about the V2 AndrewLB HanLin eBook 2 07-10-2006 09:33 AM


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


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