Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 03-11-2015, 11:16 AM   #1
wladdy
Enthusiast
wladdy began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2010
Device: iPad / Kindle DX
Get metadata from parent folders

I have a bunch of ebooks stored in a structure of nested folders all going back up to a root folder.

How can I import the books into Calibre while keeping the information contained in the pathname from the root folder down to the file itself? For instance, is there a way to put the parent folder hierarchy into the Calibre 'Comments' field, just as easily and automatically as I can put the filename in the 'Title' field?

I realize that I could use a bulk renamer or write a shell script (I'm on Mac OS X), but any help to solve my problem without leaving Calibre would be greatly appreciated. Thanks in advance! W.
wladdy is offline   Reply With Quote
Old 03-11-2015, 11:26 AM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Adding Books can only read metadata from the immediate filename, not the fully qualified path.
You will need to rename them.

Also note only certain (builtin) metadata fields can be filled, I don't recall if comments is one of them.
The Preferences dialog shows all of the valid fields.
eschwartz is offline   Reply With Quote
Advert
Old 03-11-2015, 12:31 PM   #3
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,570
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@wladdy - bit of hack - but, perhaps you put the path in a custom column ex post facto.
  • You would use the calibredb set_metadata command in script of some sort.
  • You'd need to devise a way to 'match' the book id with the path, a csv catalog might assist in doing that.
  • And then use Bulk Metadata Edit->Search and Result to extract values out of the custom column into target columns - eg author, series, publisher etc -
  • You might be able to do all of the above in the calibredb set_metadata script - depends on the folder tree, and your scripting proficiency.
An alternative might be use an advanced file renamer to pre/ap-pend the folder path into the format file names and use a suitable template in Add Books to pull it apart into relevant metadata columns.

@eschwartz - seems that the oft discussed 'feature' to inject the original path into a custom column on adding a book would be useful here.

BR
BetterRed is offline   Reply With Quote
Old 03-11-2015, 03:10 PM   #4
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
Yes, it is becoming a more and more common request. Sadly my current solution is hackish and not terribly extendable.

You can use calibredb add and filter the output for book_id, then apply custom path matching with set_metadata.
eschwartz is offline   Reply With Quote
Old 03-11-2015, 04:49 PM   #5
wladdy
Enthusiast
wladdy began at the beginning.
 
Posts: 28
Karma: 10
Join Date: Oct 2010
Device: iPad / Kindle DX
Thank you for your replies.

I ended up using 'A better Finder Rename' to append their paths at the beginning of a few thousand files. The files are now in Calibre, whose 'Search and replace' among other features will help me clean up that mess relatively effortlessly.

However, I do hope that the possibility to involve file paths when importing will be implement in a future version. I any case, many thanks to the people who created and who improve this great software.
wladdy is offline   Reply With Quote
Advert
Reply

Tags
hierarchy, metadata, nested folders, parent folder


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kobo's Parent Company: Guilty of Credit Card Fraud? Prestidigitweeze News 17 08-18-2013 12:27 PM
Library structure series folders vs author folders Eric41 Library Management 2 12-08-2011 01:30 AM
Easiest ereader for older parent to use demingite Which one should I buy? 24 11-27-2010 01:16 PM
Astak Parent Company website Robertb Astak EZReader 29 02-25-2010 09:07 PM
Folders on Kindle, Calibre metadata question jscris Calibre 5 02-25-2009 02:43 PM


All times are GMT -4. The time now is 05:32 AM.


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