Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 03-21-2020, 11:17 AM   #1
RobertWHayes
Junior Member
RobertWHayes began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2020
Device: Nook tab 7"
Calibre command line syntax

I'm having trouble getting the options to work. I get "no such option" a lot.

What's wrong with this example?
c:\users\Robert>calibredb catalog Katalog.epub -generate-recently-added
Usage: calibredb.exe catalog /path/to/destination.(csv|epub|mobi|xml...) [options]

Export a catalog in format specified by path/to/destination extension.
Options control how entries are displayed in the generated catalog output.
Note that different catalog formats support different sets of options.


Whenever you pass arguments to calibredb.exe that have spaces in them, enclose the arguments in quotation marks. For example: "C:\some path with spaces"

calibredb.exe: error: no such option: -g
RobertWHayes is offline   Reply With Quote
Old 03-21-2020, 11:30 AM   #2
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: 29,799
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Code:
--generate-recently-added

    Include 'Recently Added' section in catalog. Default: 'False' Applies to: AZW3, EPUB, MOBI output formats
Note: 2@ -, not 1
theducks is online now   Reply With Quote
Advert
Old 03-21-2020, 01:09 PM   #3
RobertWHayes
Junior Member
RobertWHayes began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2020
Device: Nook tab 7"
Duh!
Thanks
RobertWHayes is offline   Reply With Quote
Old 03-21-2020, 02:11 PM   #4
RobertWHayes
Junior Member
RobertWHayes began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2020
Device: Nook tab 7"
New problem.
--genre-source-field="#genre" works, or --Preset works,
but not if I set the genre to #genre in the preset dropdown.
RobertWHayes is offline   Reply With Quote
Old 03-21-2020, 02:13 PM   #5
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: 29,799
Karma: 54830978
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 RobertWHayes View Post
Duh!
Thanks
That was IT?
The -g got me thinking that it was trying to parse and it failed
theducks is online now   Reply With Quote
Advert
Old 03-21-2020, 02:16 PM   #6
RobertWHayes
Junior Member
RobertWHayes began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2020
Device: Nook tab 7"
Yeh, I blame my aging eyes... and not being careful. The -- solved that whole mess.
Now it looks like I may not be able to use a --preset
RobertWHayes is offline   Reply With Quote
Old 03-21-2020, 02:52 PM   #7
ShellShock
Wizard
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 1,176
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
Is double hyphen a Unix convention?
ShellShock is offline   Reply With Quote
Old 03-21-2020, 03:00 PM   #8
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,567
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by ShellShock View Post
Is double hyphen a Unix convention?
Yes, its a bash thing, search for "double hyphen command" for why '--'

BR
BetterRed is offline   Reply With Quote
Old 03-21-2020, 05:43 PM   #9
sjfan
Addict
sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.sjfan ought to be getting tired of karma fortunes by now.
 
Posts: 281
Karma: 7724454
Join Date: Sep 2017
Location: Bethesda, MD, USA
Device: Kobo Aura H20, Kobo Clara HD
Quote:
Originally Posted by ShellShock View Post
Is double hyphen a Unix convention?
It's a GNU convention (and it precedes bash), and GNU's Not Unix, so it's not really Unix. But it's from the Unix-adjacent world.

Unix commands commonly had single-character flags: you might have "-h" for "help", "-l" for "list", -p for "print", and -e for "error". You can use multiple flags after a single dash, so "-lp" is the same as "-l -p".

GNU introduced long names—slower to type, but easier to remember. But when they did, there was a potential clash: is "-help" the same as "-h -e -l -p", or is it the single "help" option? To avoid this clash, they introduced the convention of using two dashes with a long option name. So "-help" remains "-h -e -l -p", while "--help" is the "help" long option.

This is why you get the original error message above: calibre says "error: no such option: -g" because it begins parsing "-generate-recently-added", sees a single dash, and interprets it as '-g -e -n -e -r -a....'.

http://www.catb.org/~esr/writings/ta...l/ch10s05.html has some discussion.
sjfan is offline   Reply With Quote
Old 03-21-2020, 06:22 PM   #10
RobertWHayes
Junior Member
RobertWHayes began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Mar 2020
Device: Nook tab 7"
Thanks, I a windows guy, but i do have a bin dir for fut/tut/sed...
RobertWHayes is offline   Reply With Quote
Reply

Tags
calibre, command line


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
calibre command line mahargiani Recipes 2 11-15-2019 01:21 AM
Calibre with command line ? Laurent06 Conversion 2 11-09-2014 12:37 AM
command line syntax for search filter cybmole Calibre 5 06-26-2013 07:55 AM
Calibre Command Line Conversion bmwr1200c Calibre 1 08-10-2011 07:04 PM
Autotagging with Calibre (command line) erion Calibre 11 08-28-2010 01:33 PM


All times are GMT -4. The time now is 08:29 AM.


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