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 02-17-2020, 12:14 AM   #1
halloleo
Groupie
halloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
Tag a book on import with the directories in the source path of the book

Until know I have organised my books in a directory structure in the vein of

.../ebooks/fiction/fantasy/flint/Torch of Freedom.epub

I now would like to move all my ebooks into a Calibre library. I know I can do this with the Add books from directories and sub-directories action. However I would like to write the names of the directories in the path of a book as tags to the book's metadata (overwriting all preset tags coming from the ebook publisher).

So for the example above I would like Torch of Freedom after import to be tagged with fiction, fantasy and flint.

How can I do this to all the books in this directory structure?
halloleo is offline   Reply With Quote
Old 02-17-2020, 12:20 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Write a script that uses calibredb add --tags=whatever book_file

https://manual.calibre-ebook.com/gen...calibredb.html
kovidgoyal is offline   Reply With Quote
Advert
Old 02-17-2020, 12:38 AM   #3
halloleo
Groupie
halloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
Thanks kovidgoyal!

One question though: When I use calibredb add to add a book are the other metadata (author, etc) still taken from the book?
halloleo is offline   Reply With Quote
Old 02-17-2020, 12:45 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
yes .
kovidgoyal is offline   Reply With Quote
Old 02-17-2020, 12:58 AM   #5
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,572
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
FWIW: I use the GetFileName optional plugin, I have it configured to put the path of the file that creates a book into a custom column (#camefrom/Came From), see ==>> Index of plugins

I have a few saved bulk S&R regexes to do some wrangling of the file path into other columns

Its a File Type plugin -- towards the end of the list.

Not sure if the PI gets invoked via calibredb add command.

BR

Last edited by BetterRed; 02-17-2020 at 01:04 AM.
BetterRed is online now   Reply With Quote
Advert
Old 02-17-2020, 02:22 AM   #6
halloleo
Groupie
halloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterhalloleo can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
Quote:
Originally Posted by kovidgoyal View Post
yes .
Cool. Thanks.
halloleo is offline   Reply With Quote
Reply

Tags
calibre, directory structure, tag conversion, tagging


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Import directories of ebooks jnahman Calibre 5 03-12-2019 04:28 PM
Multiple book versions inside directories Gilgeam Calibre 7 06-12-2017 01:34 PM
Import on Filename changes mid import due to book error Vortex Calibre 3 12-05-2014 11:49 AM
Directories and book import JulioQc Library Management 3 05-02-2012 12:36 PM
How do I add a single book but from multiple directories? GoldThreader Calibre 17 12-17-2011 03:04 AM


All times are GMT -4. The time now is 07:30 PM.


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