10-12-2011, 11:00 AM | #1 |
eBook Junkie
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
Regex Help - Add Book - Insert Filename into Custom Field
Hi All:
I am trying to just rename my ebok files that Amazon's uses in it's Kindle for PC software. I have searched the forum but I cannot see any posts to help me accomplish what I want. All I want to do is when adding the book to calibre to insert the current filename into a custom field so that when I save these same files back to the disk they will be renamed with their original Amazon filename along with the author and title from calibre. Is something like this possible for a regex dummy like me, my custom field name is #filename?? |
10-12-2011, 11:16 AM | #2 | |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
1) You'll have to turn off read metadata from file contents in Preferences Adding Books to get access to the filename (unless it's in the book metadata already). 2) You'll see there a list of standard fields you can send data into. You can't send data from the filename directly into a custom field. 3) You could send the complete filename into one of those standard fields, but that will interfere with sending the correct title/author into their fields 4) If you send the complete filename into a field, you can fix 3) by doing a search and replace to parse out the metadata you need from the field with the filename. While doing that S&R, you can send the filename into your custom field. That's how I'd approach it. Last edited by Starson17; 10-12-2011 at 11:18 AM. |
|
Advert | |
|
10-12-2011, 11:55 AM | #3 |
eBook Junkie
Posts: 1,526
Karma: 1464018
Join Date: May 2010
Location: USA
Device: Kindle Fire 2020, Kindle PW2
|
So there isn't an easy way to send it to a standard field without turning off the read metadata feature? If at all possible I need the author, title and filename, everything else is irrelevant. I am just trying to find an easier way to rename the files so that I can match up my mbp files from my kindle with the books in k4pc. I am ok with using a standard field because I will be using an empty library to accomplish this so it will not be messing up anything in my library.
Nyn |
10-12-2011, 01:14 PM | #4 |
Wizard
Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
You can read metadata from the file, or parse the filename for the metadata. Those are the two options and they are mutually exclusive. If you need the filename, you can't read metadata from inside the file.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regex and Metadata from filename. | asrrin29 | Calibre | 5 | 12-03-2023 04:51 AM |
Add Book Regex to Custom field | adept22 | Library Management | 3 | 10-07-2014 07:33 PM |
Insert new line with regex | deckoff | Sigil | 6 | 08-08-2010 11:24 AM |
Bug? "Insert metadata as page at start of book" doesnt encode Comments field properly | rollercoaster | Calibre | 2 | 04-24-2010 10:40 PM |
Add book regex no longer works | magphil | Calibre | 3 | 03-24-2010 03:40 PM |