From 7f405a23ae6a126e4a85a6aa7d8e927d233b283d Mon Sep 17 00:00:00 2001 From: Michael Murtaugh Date: Wed, 4 Oct 2023 18:48:25 +0200 Subject: [PATCH] links --- bootleg_libary_setup.md | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bootleg_libary_setup.md b/bootleg_libary_setup.md index 2b0c36c..0bbdb5c 100644 --- a/bootleg_libary_setup.md +++ b/bootleg_libary_setup.md @@ -40,14 +40,19 @@ I tried this, and Calibre couldn't find a file needed to regenerate the database Restoring with calibre was tricky as the library rebuilding tools (calibredb restore_database) and also using Calibre's graphical interface to restore a library, both only found those books that had an OPF file. Unfortunately, it seems that the OPF file isn't automatically created when books are added (and perhaps not edited) in calibre-web. SO... it's possible to use calibredb's add command to re-add all the books back and rebuild everything. BUT, the downside here is that all the the books will get renumbered and thus break all existing links (which feels like a big pity as someone who likes to link to specific books / pages). SO what I am doing is: - (1) Locally on my laptop, I rebuild a new library with: + +# Locally on my laptop, I rebuild a new library with: + calibredb add -r -1 --library-path=tmp/ Bootleg\ Library/ - where tmp is a new directory... - NB: all the books that are found and added get an OPF file. + +where tmp is a new directory... + +NB: all the books that are found and added get an OPF file. - (2) Copy the OPF file from the newly generated library, into the old library for books that have no OPF file already. In doing this, REWRITE the OPF calibre_id to match the old ID (which is in the folder name). - For this I used the script [add_missing_opf.py](scripts/add_missing_opf.py) - (3) Finally run +# Copy the OPF file from the newly generated library, into the old library for books that have no OPF file already. In doing this, REWRITE the OPF calibre_id to match the old ID (which is in the folder name). +For this I used the script [add_missing_opf.py](scripts/add_missing_opf.py) + +# Finally ran calibredb restore_database Sources / Links