![]() |
#1 |
Junior Member
![]() Posts: 1
Karma: 10
Join Date: Aug 2010
Device: Ipad
|
Using Folder Names as Metadata
All my ebooks are in a pretty basic format, but Calibre is not picking up the naming structure properly which is causing me to have to hand edit a lot of the files (we're talking a very large collection). So here's my setup:
Alphabet Letter as parent folder, Author as sub folder ebooks (with the name structure of <Series> - <# in series> - <Title> =or= <Title> So I want to know if it's possible to pull the Author from the folder name, the Series, # and Title from the filenames (and for those without a series get the Title in the right location, instead of trying to use the title as the series) I know in the end I'm probably going to have to do a lot of handwork, which I'm ok with, but fetching the metadata would be so much easier if it would figure out the Authors, and maybe not use the entire filename as the Title. I search all over the forums, and google, and I don't normally like making posts to bug other people with questions but... I'll be forever grateful to whomever could me ![]() |
![]() |
![]() |
![]() |
#2 | |||
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:
Quote:
Try Quote:
Use the test tool by inserting one of your book names (including the extension .txt) to see if you have what you want. |
|||
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,313
Karma: 7957679
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
Code:
./(?P<author>.*)/((?P<series>.*) - (?P<series_index>.*) - )?(?P<title>.*) Code:
s/john smith/Some Series - 1 - Title.epub Code:
s/john smith/Title.epub |
|
![]() |
![]() |
![]() |
#4 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Quote:
Usually, I would take a look at the code, and put in a print statement to see if the path is there before parsing with the regex, but I'm really short on time. If this is actually working for someone to get metadata from a folder name, I'd appreciate confirmation (and also what OS it is working on.) |
|
![]() |
![]() |
![]() |
#5 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 12,313
Karma: 7957679
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
Quote:
The OP could use the regexp by doing a bulk rename of a/b/c to a/b - c, but that has its own complexities. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,004
Karma: 177841
Join Date: Dec 2009
Device: WinMo: IPAQ; Android: HTC HD2, Archos 7o; Java:Gravity T
|
Somewhere here there was a discussion of a flexible file rename utility that uses regexp in the file rename operation. I haven't had a chance to look at it, but it might do the job. It did look like a nice utility for those who are comfortable using regexp.
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Aug 2010
Device: Android - Personal Ebook App
|
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() Posts: 3
Karma: 10
Join Date: Aug 2010
Device: Android - Personal Ebook App
|
It will probably take a couple of passes (I'm doing the same thing with my collection as I write this)
I'll post the steps and regexes for Bulk Rename Util as I do it. First step, stripping out Series Name/# Match: ([A-Za-zA-Z0-9'\. ]*)(-? ?[0-9\.]* ?- ?)(.*) replace: \3 In the box that says Append Folder name, set prefix, a seperator, and level. Make sure you check the box for subfolders This *should* get most of the items. Last edited by Cryolithic; 08-24-2010 at 02:06 AM. |
![]() |
![]() |
![]() |
Tags |
author, calibre, ebook, folder name, metadata |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with "Guessing metadata from file names" | Justy | Library Management | 22 | 08-15-2011 06:13 AM |
sub-folder support for documents folder? | sark666 | Kobo Reader | 5 | 08-31-2010 05:35 AM |
Help finding Metadata Names and Values? | Sabardeyn | ePub | 3 | 04-02-2010 11:16 PM |
How can I remove spaces from folder and file names? | jusmee | Calibre | 1 | 11-06-2009 10:36 PM |