Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 03-03-2012, 12:30 PM   #1
geronimo72
Member
geronimo72 began at the beginning.
 
geronimo72's Avatar
 
Posts: 13
Karma: 10
Join Date: May 2011
Device: Kindle Paperwhite
Metadata from filename (regular expressions)

Hi,

sorry for this stupid questions, but I really suck at regular expressions and the default ones in Calibre do not work for me.

I would like to import big collection of books and I would like Calibre to extract the metadata from the filenames. I have following different filenames:
Adams Douglas, Carwardine Mark - Last Chance to See.txt
Adams Douglas - Dirk Gently: The Long Dark Tea Time of the Soul.txt
Adams Douglas - Mostly Harmless.txt

And here are the question:
1. which regular expression do I use to extract both authors from the filename, but it has to work also when there is only one author
2. I would like to have the text which is after "-" as the name of the book and to extract the series and the number of the series from this text also (if there are any)

I was able to change on default Calibre string to extract the second type of filename correctly, but it did not work with the first and the last one. Is there a way to handle these different filenames automatically or do I have to make manual corrections? I can of course change the filenames if it is needed, but it is really a lot of work and I would prefer to solve this by using the regular expression.

I have read also the tutorial for the regular expression, but as already mentioned I suck at it and was unable to use them correctly.

Thank you very much for your help.

Edit: new idea - maybe I can split the books in several groups depending on the filename and use different regular expressions, but I still need help with creating the correct expressions
geronimo72 is offline   Reply With Quote
Old 03-05-2012, 01:10 PM   #2
BookJunkieLI
Addict
BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.BookJunkieLI could sell banana peel slippers to a Deveel.
 
Posts: 241
Karma: 3136
Join Date: Jan 2010
Location: Long Island
Device: Nook, REB 1100, Ebookwise 1500, Jb-Lite, PRS-650, PB302, Asus T-90MT
Have you looked at this thread Regex: File Renaming Pre-Import & Importing by penguinaka? I don't think you can account for all the variables at once, not without some serious regex knowledge which I really don't have either, but it should give you the expressions you want for each type of example. Hope it helps.
BookJunkieLI is offline   Reply With Quote
Old 03-05-2012, 04:14 PM   #3
geronimo72
Member
geronimo72 began at the beginning.
 
geronimo72's Avatar
 
Posts: 13
Karma: 10
Join Date: May 2011
Device: Kindle Paperwhite
This is not exactly what I was looking for, but I might give it a try
geronimo72 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with regular expressions MostlyCarbon Library Management 0 02-04-2012 03:00 PM
Regular Expressions geormes Calibre 4 08-04-2011 07:09 AM
Regular Expressions littleezza Conversion 1 07-15-2011 11:52 AM
Another help with regular expressions encapuchado Library Management 6 06-21-2011 03:14 PM
Help with Regular Expressions ghostyjack Workshop 2 01-08-2010 11:04 AM


All times are GMT -4. The time now is 11:51 AM.


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