![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
![]()
Kindle 3 arriving soon. Home runs on Mac. Calibre, Stanza, Kindle for Mac installed.
A friend passed on to me a disk full of non-DRM e-books he had downloaded over the years from various sites. They are in assorted (non-drm) pdf, rtf, doc, lit formats, and I need to convert to Mobi for the kindle. None of the files appear to have metadata other than the filenames. Stanza can convert one at a time with same file name in Kindle format, but Calibre is preferred as I can batch convert a lot to Mobi at once. But I would like to get the metadata from filenames in the new files, and filenames the same as originals, to ease the task of checking that each title has been successfully converted before deleting the old versions. In the Calibre preferences page, under add/save, there is a field for "Regular Expression" (default appears to be " (?P<author>[^_]+) - (?P<title>.+)") followed by a test panel with field for pasting in filename so that metadata can be read from the filename and inserted into the new converted file. When I just convert it, the title and author is "Unknown" and the filename is different. I tried looking at the "reference" link that allegedly explained it all, and was totally overwhelmed and confused as a result. Nor am I familiar with the Terminal window, and only use it with detailed printed instructions in front of me. I pasted (into the filename test field) filenames in the 3 formats as below and pressed the "TEST" button, but no results appeared in the fields below. These formats represent the various types of filenames in the disk I was given. Examples: Ford, Harry - Lost 6 - Of Starting and Ending The Sittaford Mystery - Christie_ Agatha Anders, Ken J - Scotfree Problem-how to batch convert files with names like the above, resulting in Author/series/title metadata from the filename being inserted into the new file,and also resulting in same filenames so that I can alphabetically sort the old and new together to check that all conversions done before deleting the originals. I will simply be loading batches into Calibre for conversion, copying the results back into original folders, checking that all are done, then deleting all original filetypes once checked, then deleting Calibre Library. Your advice on achieving this would be appreciated, and especially if you could type out the "regular expressions" (so that I could Copy/Paste them into the field) for the three filename formats as above so they will be recognized as metadata. |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,149
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
you need to add extensions to the filenames in the test field
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
OK, that allows the test to be read, but the result of pasting in
Anders, Ken J - Lethal Exposure.pdf resulted in Title Lethal Exposure (correct) and Author Ken J (incorrect) If I used a filename with a series name as well,it read it as being part of Author name, following the Ken J. The resulting filename was Lethal Exposure - Ken J |
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
Perhaps part of my problem is the way the files are named, with Surname, Firstname - series name - Title.extension
Unfortunately there are hundreds of books in the file, so it would be a monumental task o change all filenames first. Looking for a way to make the filename the same as the original, and at same time to insert correct metadata from my flawed filenames. Is this possible. Last edited by nitrogun; 09-13-2010 at 02:37 AM. Reason: left bit out. |
![]() |
![]() |
![]() |
#5 | |
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,888
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
Code:
^((?P<author>([^\-_0-9]+)(?=\s*-\s*)(?!\s*-\s*[0-9.]+)|\b))(\s*-\s*)?((?P<series>[^0-9\-]+)(\s*-\s*)?(?P<series_index>[0-9.]+)\s*-\s*)?(?P<title>[^\-_0-9]+) Again, I didn't write this, but someone on this board did. ![]() |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Sep 2010
Device: Kindle 3
|
@dwanthny your grammatical example solved the main problem for me. Just had to edit/remove last section and it does most of what I wanted. Thank you.
|
![]() |
![]() |
![]() |
Tags |
calibre, convert, filenames, metadata |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
PDF Filenames vs Metadata Title | clintbradford | Calibre | 0 | 07-12-2010 11:50 PM |
batch metadata editing possible from filenames? | caponesan | Reading and Management | 3 | 09-03-2009 12:50 PM |
Converting filenames | gafitz | Calibre | 0 | 05-06-2009 03:20 PM |
editing filenames that have been emailed to you | knives of ice | Amazon Kindle | 1 | 10-08-2008 10:33 AM |
libprs500 metadata from filenames | Dan23 | Calibre | 2 | 06-29-2008 06:04 PM |