03-21-2020, 11:17 AM | #1 |
Junior Member
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 |
03-21-2020, 11:30 AM | #2 |
Well trained by Cats
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 |
Advert | |
|
03-21-2020, 01:09 PM | #3 |
Junior Member
Posts: 6
Karma: 10
Join Date: Mar 2020
Device: Nook tab 7"
|
Duh!
Thanks |
03-21-2020, 02:11 PM | #4 |
Junior Member
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. |
03-21-2020, 02:13 PM | #5 |
Well trained by Cats
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
|
|
Advert | |
|
03-21-2020, 02:16 PM | #6 |
Junior Member
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 |
03-21-2020, 02:52 PM | #7 |
Wizard
Posts: 1,176
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
|
Is double hyphen a Unix convention?
|
03-21-2020, 03:00 PM | #8 |
null operator (he/him)
Posts: 20,567
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
|
|
03-21-2020, 05:43 PM | #9 |
Addict
Posts: 281
Karma: 7724454
Join Date: Sep 2017
Location: Bethesda, MD, USA
Device: Kobo Aura H20, Kobo Clara HD
|
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. |
03-21-2020, 06:22 PM | #10 |
Junior Member
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...
|
Tags |
calibre, command line |
|
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 |