![]() |
#1 |
Member
![]() ![]() ![]() ![]() ![]() ![]() Posts: 23
Karma: 524
Join Date: Dec 2010
Device: Sony PRS650
|
Import existing .opf's & books
I'm sorry if this is a silly question and I've had a quick search but can't find anything about it, but I've been messing around and managed to make a haimes of things and my backup drive has gone kaput (it's currently resting in the freezer in the ultimate desperate act to try and recover data!)
I'm now left with my main library, and several-dozen subdirs where I'd been playing around with another library. These subdirs contain the books, cover and .opfs. I can import all the files (epubs) from Calibre, but it seems to leave all the metadata from the .opfs behind. Is there any way by which I can import these folders in bulk including the metadata? Right now I'm having to go to each folder in Nautilus (I'm using Linux), select the opf and open it with Calibre, then go to Calibre and manually add the book to the entry. It's a pain to say the least ![]() |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
a recursive add (one book per directory) will read the emtadata from the opfs. click the arrow next to the add books button.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
reader
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,977
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
|
Make a ZIP of the folder containing a single .opf plus the rest of the files for that ebook, then import the .zip file into Calibre.
If the original was an ePub, then you could try renaming the .zip to .epub, but this might not make a legal .epub (and I don't know how much difference it makes to Calibre anyway). |
![]() |
![]() |
![]() |
#4 |
Member
![]() ![]() ![]() ![]() ![]() ![]() Posts: 23
Karma: 524
Join Date: Dec 2010
Device: Sony PRS650
|
That's strange, I could have sworn I'd tried that already (as it's so obvious and basic, which is why I was a bit embarrassed to ask this) and it hadn't worked. Maybe I'd then looked at some entries that I hadn't originally entered data for or something equally daft
![]() ![]() Either way, it has worked, I'm saved ! Many thanks for the very fast replies, you're scholars and gentlemen ![]() |
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 8
Karma: 10
Join Date: May 2012
Location: Netherlands
Device: Kobo Aura H2O
|
![]() |
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
"Why is it doing *that*?"
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 322
Karma: 725344
Join Date: Sep 2011
Device: Black Kobo Touch & Glo, responsible for 2 PaperWhites
|
Quote:
Please, can you explain what you mean by a "recursive add"? I'm assuming I need these files. Thanks!! |
|
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,079
Karma: 14079267
Join Date: Oct 2007
Location: Almere, The Netherlands
Device: Kobo Sage
|
You don't really need them; they are a backup of the data in your Calibre database. You can regenerate them from the GUI with Library -> Library Maintenance -> Library metadata backup status -> Queue all books for backup. Or with the command line 'calibredb backup_metadata'
|
![]() |
![]() |
![]() |
#8 |
"Why is it doing *that*?"
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 322
Karma: 725344
Join Date: Sep 2011
Device: Black Kobo Touch & Glo, responsible for 2 PaperWhites
|
Thanks! I'm trying that now! I couldn't figure out why nothing I imported had the metadata files in the folders, I thought Windows 10 was hiding them despite being told to show hidden files. Then I realised they hadn't been imported when the new files I had created since the import had them.
Again, many thanks!!! |
![]() |
![]() |
![]() |
#9 |
Member
![]() Posts: 12
Karma: 10
Join Date: Jul 2024
Device: Kindle Scribe
|
I've tried everything in this thread - I have a large (older) library (just the files & folders) that I'm trying to add to my shiny new library (docker version of Calibre). When I try ALL the options from 'Add books' - NONE of them pull in the cover.jpg nor the metadata.opf for the epub. I am using calibre 7.24 (again, installed via docker). I've pulled up the opf and it is full of information - and can load the cover.jpg manually - but I've got nearly 1200 of these to do and would much rather have a bulk capability. Can anyone help? Thanks!
|
![]() |
![]() |
![]() |
#10 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Add books -> Add from folders and sub folders -> Assume all files in a folder are the same book in different formats does read metadata from OPF files.
|
![]() |
![]() |
![]() |
#11 |
Member
![]() Posts: 12
Karma: 10
Join Date: Jul 2024
Device: Kindle Scribe
|
So close - but I get 3 rows in my library instead of 1
Thank you for the response. I followed the steps you indicated - and while it does load the metadata and the cover.jpg properly with the epub, I also get two additional rows in my library... '.metadata', and '.Dirge' (the title of the book)... which also contains a copy of the EPUB. Is there a setting I have wrong for the import that is creating those 2 extra files? So close
![]() ![]() |
![]() |
![]() |
![]() |
#12 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
If you are getting extra rows then you have extra folders. Each row will correspond to a folder.
|
![]() |
![]() |
![]() |
#13 |
Member
![]() Posts: 12
Karma: 10
Join Date: Jul 2024
Device: Kindle Scribe
|
sorry, no. There is only one folder...
I'd like to send you images but this forum doesn't allow an image from my pc - I'd have to load it somewhere on the net and link in
![]() I am only clicking on one folder (it won't allow multiple anyway) - and there are no subfolders. There are only the three files in the folder... 'Dirge - Alan Dean Foster.epub', metadata.opf, and cover.jpg. Since the two errant entries begin with '. ' perhaps I can craft a maintenance task that will remove all of these after the mass load. |
![]() |
![]() |
![]() |
#14 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,353
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Nope those folders are there, they are just hidden. Use ls -a to see them.
|
![]() |
![]() |
![]() |
#15 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,473
Karma: 239219543
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Old Thread] import library or export to single file add to existing library | PCreighton | Calibre | 4 | 04-10-2011 01:08 AM |
import my books in my sony | Kardock | Calibre | 3 | 10-14-2010 01:03 PM |
Calibre won't import any books! | sapereaudo | Calibre | 10 | 03-22-2010 08:55 PM |
How the new 0.6.45 Add new formats to existing books option works | Starson17 | Calibre | 8 | 03-14-2010 01:27 PM |
Can I read my existing Connect books on a 2nd Reader? | Leaping Gnome | Sony Reader | 20 | 01-14-2007 02:04 AM |