Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 06-07-2020, 03:18 AM   #31
kjdavies
Enthusiast
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 33
Karma: 53170
Join Date: Jun 2013
Device: Sony PRS-600
Quote:
Originally Posted by kjdavies View Post
It could be that other elements are impeding performance, but... yep, about 2-2.5 times as long per title.

And strange, I did try setting multiple metadata (standard and custom) at once, using that syntax... didn't seem to work.

However, I will try again. Perhaps I had it formatted incorrectly.

set_custom doesn't have '--field', though.

calibredb set_custom [options] column id value

I take it I should try

calibredb set_custom [options] [column id value]*
It appears

calibredb set_metadata -f publisher:'Some Publisher' -f comments:'big block of HTML' bookID

does work as one would hope.

My attempts at assigning multiple custom columns in one call, not so much.
kjdavies is offline   Reply With Quote
Old 06-07-2020, 03:20 AM   #32
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: 37,016
Karma: 16422171
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Use the correct field names, --list-fields is your friend.
kovidgoyal is offline   Reply With Quote
Old 06-07-2020, 03:30 PM   #33
kjdavies
Enthusiast
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 33
Karma: 53170
Join Date: Jun 2013
Device: Sony PRS-600
Quote:
Originally Posted by kovidgoyal View Post
Use the correct field names, --list-fields is your friend.
Indeed, and I am using the correct field names. (take '--with-library' as given):
  • calibredb set_metadata -f field:'value' id

works
  • calibredb set_metadata -f field1:'value' -f field2:'value' id

works
  • calibredb set_custom custfield1 id 'value'

works
  • calibredb set_custom custfield1 id 'value' custfield2 id 'value'

respects only the first entry
  • calibredb set_metadata -f custfield1:'value' id
  • calibredb set_metadata -f #custfield1:'value' id
  • calibredb set_metadata -f *custfield1:'value' id
  • calibredb set_metadata -f '#custfield1':'value' id
  • calibredb set_metadata -f '*custfield1':'value' id

do not recognize the custom field name (despite 'Custom Field', '#custfield' being returned when I query fields that can be set, using --list-fields)
  • calibredb set_custom -f custfield:'value' id

does not recognize -f, as indeed I would not expect it to (but thought I would try anyway).

If there is a way to assign multiple custom columns via a single call I will happily use it. It is not documented in calibredb (--help or the help page). Obvious permutations and applications of the set_custom and set_metadata commands don't work as one might hope.

Multiple field specification when calling set_metadata does work (I don't see in the documentation that you can do this, but after you suggested it I tried and it worked), but I don't see how to get it to accept custom columns despite them being reported as available when I query using --list-fields.
kjdavies is offline   Reply With Quote
Old 06-08-2020, 12:19 AM   #34
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: 37,016
Karma: 16422171
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You want

-f '#name:value'
kovidgoyal is offline   Reply With Quote
Old 06-08-2020, 08:37 PM   #35
kjdavies
Enthusiast
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 33
Karma: 53170
Join Date: Jun 2013
Device: Sony PRS-600
That was not obvious from the documentation, but I think you just made my day.

Of course, the first entry I tried loading is missing a bunch of fields (the product page was missing, but I still have a "this product no longer available" response page). Second one populated everything as expected, though!

25 seconds per entry (connecting directly) down to ~6-7! Thank you! That reduces an 42+ hour job to 14 hours. I could conceivably have this entire thing uploaded by... the time I start work tomorrow. Right.

I don't suppose 'calibredb add' can take "-f comments:'comment' -f publisher:'publisher' -f '#custom:value'" as well, so I can do it all in one pass?

THANK YOU. Even if I can't do the entire thing in a single call, getting it down to 'add title' and one 'set remaining metadata' call is a big improvement.
kjdavies is offline   Reply With Quote
Old 06-08-2020, 11:53 PM   #36
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: 37,016
Karma: 16422171
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
That's how quoting for all shells works, you surround the entire argument with quotes. And yes you can set all fields including builtin and custom ones in a single call.
kovidgoyal is offline   Reply With Quote
Old 06-09-2020, 01:37 AM   #37
kjdavies
Enthusiast
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 33
Karma: 53170
Join Date: Jun 2013
Device: Sony PRS-600
Quote:
Originally Posted by kovidgoyal View Post
That's how quoting for all shells works, you surround the entire argument with quotes. And yes you can set all fields including builtin and custom ones in a single call.
For some strange reason I wasn't thinking shell quoting, so I was surrounding just the value I was trying to assign with quotes. That is, it accepted

-f publisher:'publisher with spaces'

when you're telling me the correct quoting is

-f 'publisher:some publisher with spaces'

And "calibredb add" will accept -f as well? Time to give that a try.

Last edited by kjdavies; 06-09-2020 at 01:47 AM. Reason: fixing (I hope) emoji
kjdavies is offline   Reply With Quote
Old 06-09-2020, 01:58 AM   #38
kjdavies
Enthusiast
kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.kjdavies is no e-book dilettante.
 
Posts: 33
Karma: 53170
Join Date: Jun 2013
Device: Sony PRS-600
Quote:
Originally Posted by kjdavies View Post
For some strange reason I wasn't thinking shell quoting, so I was surrounding just the value I was trying to assign with quotes. That is, it accepted

-f publisher:'publisher with spaces'

when you're telling me the correct quoting is

-f 'publisher:some publisher with spaces'

And "calibredb add" will accept -f as well? Time to give that a try.
Sadly,

calibredb add -f 'publisher:some publisher' libraryspec myfile.cbz

Fails with

calibredb.exe: error: no such option -f

Still, I'm down to two calls, so it's still good. Thank you again.
kjdavies is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Support multiple instances of same format in same book entry masp Library Management 3 09-23-2014 10:44 PM
Multiple identical server instances detected didierm Calibre Companion 2 08-17-2014 10:19 AM
Two or multiple instances of Calibre on one computer clockmaker Library Management 2 06-30-2012 01:55 PM
Replace multiple matching instances within paragraph? murphycc Conversion 2 02-23-2012 09:53 AM
Trouble with multiple content server instances perx Calibre 3 02-17-2012 01:24 AM


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


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