|
|||||||
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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? |
|
|
|
|
|
#2 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,622
Karma: 28549046
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 |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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? |
|
|
|
|
|
#4 |
|
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,622
Karma: 28549046
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
yes .
|
|
|
|
|
|
#5 |
|
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,034
Karma: 30277960
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 02:04 AM. |
|
|
|
| Advert | |
|
|
|
|
#6 |
|
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
|
|
|
|
![]() |
| Tags |
| calibre, directory structure, tag conversion, tagging |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to Import directories of ebooks | jnahman | Calibre | 5 | 03-12-2019 05:28 PM |
| Multiple book versions inside directories | Gilgeam | Calibre | 7 | 06-12-2017 02:34 PM |
| Import on Filename changes mid import due to book error | Vortex | Calibre | 3 | 12-05-2014 12:49 PM |
| Directories and book import | JulioQc | Library Management | 3 | 05-02-2012 01:36 PM |
| How do I add a single book but from multiple directories? | GoldThreader | Calibre | 17 | 12-17-2011 04:04 AM |