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 07-02-2018, 12:35 AM   #1
csgnyc
Junior Member
csgnyc began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2018
Device: Android
Editing custom metadata with CLI

I've just started fooling around with the command line interface and am getting the hang of it. Specifically what I want to do is to use the interface to edit the Library of Congress catalog numbers for each book. I've set up the Library of Congress custom data field and can access it with the GUI.

Is this doable -- does the ebook-meta command (or any other command) allow for editing of the LOC custom field?

If it's not doable, anyone have suggestions for a workaroun?
csgnyc is offline   Reply With Quote
Old 07-02-2018, 12:38 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: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibredb set_metadata --help
kovidgoyal is offline   Reply With Quote
Old 07-02-2018, 01:13 AM   #3
csgnyc
Junior Member
csgnyc began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2018
Device: Android
Thanks for the quick response. I'm getting close.

If I get a list of fields through calibredb set_metadata -l, on my list is format:Library of Congress and Field name: #LOC.

If I then try to edit the metadata of book id 45070 to change the LOC number to LC385, it looks like the command is "calibredb set_metadata --field #loc:LC385 45070". This gets me an error that the field option requires an argument.
csgnyc is offline   Reply With Quote
Old 07-02-2018, 01:37 AM   #4
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: 43,850
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You need to quote command line arguments appropriately for whatever shell you are using

Code:
--field "#LOC:whatever"
kovidgoyal is offline   Reply With Quote
Old 07-02-2018, 01:48 AM   #5
csgnyc
Junior Member
csgnyc began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Jul 2018
Device: Android
This worked. Thanks.
csgnyc is offline   Reply With Quote
Reply

Tags
cli, custom, metadata


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fetching metadata with CLI kassart Calibre 9 08-03-2016 10:36 PM
Saving metadata and covers with the cli interface not working properly Kode Calibre 9 11-09-2014 06:29 PM
Editing custom columns JCSullivan Library Management 4 04-12-2012 01:14 PM
Adding online metadata using ISBN from CLI EditorJack Calibre 17 01-20-2009 01:47 AM


All times are GMT -4. The time now is 12:46 AM.


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