View Single Post
Old 08-27-2014, 10:58 AM   #3
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,465
Karma: 8025600
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
(Building on theducks answer ...)

Calibre can extract some metadata from a book's file name. It uses the last file name, not any folder above that name in the hierarchy. Tags appears not to be one of the metadata fields, but there might be a way around that.

The first thing to do would be to name the PDFs in some regular way so that you can parse the metadata components from the file name. You might consider using a bulk renamer to recover the metadata from parent folder names. The only rules are "be consistent" and "make separators obvious". Something like
Code:
title -!- authors -!- series -!- series index.pdf
would work. It would be best if null fields such as series and series index still had their markers.

You could then extend the scheme by adding the tags and extracting them into the publisher field (for example). Then use global search & replace to move the information from publisher to tags.

Putting it together, your file names might look like
Code:
The Origin of Zound -!- John Doe & Jane Smith -!- Origins -!- 1 -!- parody, non fiction, whatever.pdf
You would build the appropriate regular expression and put it in Preferences / Adding books.

Watch out for max path lengths.
chaley is offline   Reply With Quote