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 11-01-2017, 12:31 AM   #1
Timboli
Sharpest Tool On Shelf
Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.
 
Timboli's Avatar
 
Posts: 661
Karma: 2587836
Join Date: Feb 2009
Location: Downunda
Device: Kindles, Kobo & Samsung Tablet
Question Adding individual titles (multiple PCs)

(my apologies if this has been covered before, but I could not find it)

BACKGROUND
I have written a script (now an executable) that allows for easy import on one PC of individual titles copied from another PC. It does that via association of an OPF (.opf) metadata file, with calibre on that PC.

I have found that to set things up right, you must first import the OPF file, then add any ebook formats to that entry. I used to do it all manually, so a lot of browsing if a few formats for a title. My script, simplifies all that, by allowing full importation of all, by either double-clicking the OPF file or using a right-click "Add to calibre" entry. If calibre is not running, you get queried about adding.

My script works pretty well, but even though all the formats have been added for the title, none are displayed for that visible title, until either I restart calibre, or I manually perform a Quick Switch to Blank Database and then back to Calibre Database, then followed by use of the right arrow key, to jump to that title (the database having been sorted during the process, so the title is no longer at top).

QUESTION
Is there a way to do the final quick switch element of the process, using the command-line?

Or .... Just getting the added formats to show for the title, after adding via command-line.

SUGGESTION
It would be nice, if calibre gave quick easy access to importing ALL via the OPF file (via a prompt), and dispense with my script altogether.

Last edited by Timboli; 11-01-2017 at 12:36 AM.
Timboli is offline   Reply With Quote
Old 11-01-2017, 12:54 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: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Simply put all your files including the OPF in a folder and right click the add books button and choose add books from folders, one book per folder.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-01-2017, 02:30 AM   #3
Timboli
Sharpest Tool On Shelf
Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.
 
Timboli's Avatar
 
Posts: 661
Karma: 2587836
Join Date: Feb 2009
Location: Downunda
Device: Kindles, Kobo & Samsung Tablet
Thanks for that, but it is my recollection it is not so simple, especially where the metadata is concerned. Unless something has been improved since I last updated calibre.

I will give it another go, as I cannot recall the precise issue with that method, and report back later. Perhaps it is to do with the occasional truncated title, something calibre likes to do?

All my titles are in individual folders, always have been ... copied straight from the calibre library on first PC to older (Win XP) offline PC.
Timboli is offline   Reply With Quote
Old 11-01-2017, 07:38 AM   #4
Timboli
Sharpest Tool On Shelf
Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.
 
Timboli's Avatar
 
Posts: 661
Karma: 2587836
Join Date: Feb 2009
Location: Downunda
Device: Kindles, Kobo & Samsung Tablet
Mmmmm ... the plot thickens.

I tried your suggestion, and it appeared to work flawless for the titles I tested (one had a truncated name). At least, it did so on this machine (Win 7 Netbook) with its current version of calibre.

I know I checked out all the available options at one point, and certainly did not want to create a script unless I felt I had to.

So either I have forgotten the reason or it is something relevant to my other PC (Win XP Laptop), which I don't have access to right now. Could be as simple as an old version of calibre ... if so then I am truly embarrassed, and I should have checked some aspect of that first before posting, though I just took advantage of a spare moment that popped up, to do my query. Pretty sure I downloaded an update for calibre to transfer to that PC a while back, but maybe I forgot to install it.
Timboli is offline   Reply With Quote
Old 11-01-2017, 07:44 AM   #5
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,627
Karma: 12595249
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by Timboli View Post
So either I have forgotten the reason or it is something relevant to my other PC (Win XP Laptop), which I don't have access to right now. Could be as simple as an old version of calibre ...
It can be. At XP, the last version you can get for calibre is 1.48.
Terisa de morgan is offline   Reply With Quote
Advert
Old 11-01-2017, 07:44 AM   #6
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: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
As far as I know this bit of functionality has worked since time immemorial. It was the primary way to recover your calibre library if the metadata.db file got ocrrupted back before the recover database tool existed.
kovidgoyal is offline   Reply With Quote
Old 11-01-2017, 12:01 PM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
I have used Copy To Library to a Network shared Windows computer with success. (Push to the target)

Do be sure that the TARGET calibre (Library) is not running
theducks is offline   Reply With Quote
Old 11-02-2017, 06:13 AM   #8
Timboli
Sharpest Tool On Shelf
Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.
 
Timboli's Avatar
 
Posts: 661
Karma: 2587836
Join Date: Feb 2009
Location: Downunda
Device: Kindles, Kobo & Samsung Tablet
Thank you all, for your responses.

kovidgoyal seems to be entirely correct (not surprising), and so I am boggled at how I came to this pass, as I know for sure I checked all the ADD options on many occasions, before developing my script some months ago.

My old laptop is running the exact same version of calibre, as my Netbook, and adding using the single folder method, worked flawless yet again. Something is missing or I had a hugely dumb moment (can't rule that out at my age).

So I have adjusted my script (but not had time to fully test yet), to still work using the OPF file, but then grab the parent folder to add the ebook title and all formats. It uses the OPF metadata content to check for an existing entry, and fails to add if one found.

My apologies Kovid Goyal for interrupting your good work ... or whatever it is you do in your downtime. Much appreciated.

P.S. Waiting for darkness to fall so I can sneak back unnoticed to my hermit cave.
Timboli is offline   Reply With Quote
Old 11-02-2017, 10:03 AM   #9
Timboli
Sharpest Tool On Shelf
Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.
 
Timboli's Avatar
 
Posts: 661
Karma: 2587836
Join Date: Feb 2009
Location: Downunda
Device: Kindles, Kobo & Samsung Tablet
SUPPLEMENTARY QUESTION

Actually, it is kind of the same question.

I can now more easily add an ebook via the command-line using its folder, but whereas with my previous method, I could see a resulting entry, just not the formats, now I don't even see that.

So I still need to do the Quick Switch database thing, if calibre is running.

So is there some method to do that via command-line code? Or to somehow have the ebook title & formats show?

P.S. This is not a big issue for me, as I could just make sure calibre is not running and start it after I have added all I want, but it would be nice if it were possible to have new additions show while calibre is running, so you can more easily see/check the result after each addition, without browsing (I have a very long ebook list/catalog in calibre).

Failing a solution though, I might just create a Dropbox method, that starts calibre when the Dropbox is closed.

Normally with AutoIt, I can interact with a program window, but calibre resists that ... probably because the GUI is not created using Windows API.

REQUEST or SUGGESTION
Have a HOTKEY for the Quick Switch menu item. My script can then use that.

Last edited by Timboli; 11-02-2017 at 10:46 AM.
Timboli is offline   Reply With Quote
Old 11-02-2017, 11:15 AM   #10
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: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I'm somewhat confused. WHat is your script using to add books to calibre?
kovidgoyal is offline   Reply With Quote
Old 11-02-2017, 11:49 AM   #11
Timboli
Sharpest Tool On Shelf
Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.
 
Timboli's Avatar
 
Posts: 661
Karma: 2587836
Join Date: Feb 2009
Location: Downunda
Device: Kindles, Kobo & Samsung Tablet
C:\Program Files\Calibre2\calibredb.exe add --one-book-per-directory "D:\Temp\Rafael Sabatini\Captain Blood (25)"

In which resides an OPF file plus MOBI, EPUB, PDF files and a cover JPG file.

So all ebook folders similar to that.

So the files get added ok, but if calibre is already running, the title is not shown, until I either restart calibre or Quick Switch the Databases.

If calibre isn't running, then after adding all the titles I can start calibre, but then I need to recall the Author+Title of every ebook I added, and then browse to each location, to check that they were all added ok.

Last edited by Timboli; 11-02-2017 at 11:56 AM.
Timboli is offline   Reply With Quote
Old 11-02-2017, 12:07 PM   #12
Timboli
Sharpest Tool On Shelf
Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.
 
Timboli's Avatar
 
Posts: 661
Karma: 2587836
Join Date: Feb 2009
Location: Downunda
Device: Kindles, Kobo & Samsung Tablet
Actually, what would be good, is if calibre had a REFRESH or RELOAD button, and set to a hotkey too.
Timboli is offline   Reply With Quote
Old 11-02-2017, 11:02 PM   #13
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: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Umm as of calibre 3.x you cannot run calibredb.exe and calibre.exe at the same time. If you want to do that, you should run the embedded server inside calibre and have calibredb connect to it. When you do you will find that adding books refreshes the book list in calibre automatically. https://manual.calibre-ebook.com/gen...calibredb.html
kovidgoyal is offline   Reply With Quote
Old 11-03-2017, 03:02 AM   #14
Timboli
Sharpest Tool On Shelf
Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.Timboli ought to be getting tired of karma fortunes by now.
 
Timboli's Avatar
 
Posts: 661
Karma: 2587836
Join Date: Feb 2009
Location: Downunda
Device: Kindles, Kobo & Samsung Tablet
Thanks for that information.

I am guessing though, that calibre 3.xx will not work on my old Win XP laptop, if what I have read is correct (from an earlier comment here above).

No worries, one day I will catch up. But for now, my old Laptop is still great for most things, so will have to do. My dropbox idea has begun appealing to me more and more anyway, and there are also some other UI Automation things I can investigate.

Thanks for your time, much appreciated.

Cheers!
Timboli is offline   Reply With Quote
Old 11-03-2017, 10:35 AM   #15
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Timboli View Post
Thanks for that information.

I am guessing though, that calibre 3.xx will not work on my old Win XP laptop, if what I have read is correct (from an earlier comment here above).

No worries, one day I will catch up. But for now, my old Laptop is still great for most things, so will have to do. My dropbox idea has begun appealing to me more and more anyway, and there are also some other UI Automation things I can investigate.

Thanks for your time, much appreciated.

Cheers!
Calibre 1.48 does work on XP and currently the 2.x, 3.x libraries are compatible. What is NOT compatible, is support for modern (AKA newer) devices, features and some plugins.
If you don't need to Manage the 'master' Library, The content server is a simple LOCAL solution

BTW that old XP still can run Remote desktop CLIENT connection to a later Windows (Pro) remote desktop HOST

Clients are available for many other platforms: Android, Linux

Last edited by BetterRed; 11-03-2017 at 05:18 PM. Reason: version number error
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple titles Starbird Library Management 7 04-29-2016 01:43 AM
Trouble adding multiple books from multiple directories to Calibre LisaAlissa Library Management 17 09-02-2015 12:00 PM
One File - multiple titles? hoppfrosch Library Management 3 11-02-2011 09:16 AM
edit multiple Titles spanishguy Library Management 2 03-16-2011 02:04 PM
multiple PCs with different OS dsvick Calibre 14 11-26-2009 10:57 PM


All times are GMT -4. The time now is 05:23 AM.


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