Quote:
Originally Posted by JGB
Is there anywhere with an indepth explanation of how to use caliber command line? every time I use it I get lost or it does nothing.
|
When using windows, open a command prompt from the start menu, and type the calibre command line tool name you want to use, any options and then drag any file onto it and it just inputs say "f:/folder1/folder2/folder3/file.lit".
In summary, type
lit2oeb [options] "f:/folder1/folder2/folder3/file.lit" and then it does stuff for a while, and says output to directory .
Unfortunately this uses the current directory (short form of this is just a dot "."). However, the calibre command lit2oeb has [options] that
may go between the command's name and the inputfilename. When I say
may, I mean it's optional (short form of this is just to put square brackets "[ ]" around what is optional).
So putting all this together, open the cmd prompt and change to the calibre install directory i.e. issue:
Code:
C:\> cd "C:/Program Files/calibre"
and then type the calibre command line tool's name without any other text. You will get the following:
Code:
C:\Program Files\calibre>lit2oeb
Usage: lit2oeb [options] LITFILE
Whenever you pass arguments to lit2oeb that have spaces in them, enclose the arg
uments in quotation marks.
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-o OUTPUT_DIR, --output-dir=OUTPUT_DIR
Output directory. Defaults to current directory.
-p, --pretty-print Legibly format extracted markup. May modify meaningful
whitespace.
--verbose Useful for debugging.
Created by Kovid Goyal <kovid@kovidgoyal.net>
Now give it your command, with the required options in the middle as follows:
Code:
C:\Program Files\calibre>lit2oeb -o "MyDirectory" --verbose f:/folder1/folder2/folder3/file.lit
Again, the square brackets [options] just mean that the options are all optional i.e. don't need to be specified (but
should if you want the command line tool to do something different than what is it's default behaviour).
Just try the above lit2oeb command and see if it created "MyDirectory" in the calibre install directory with your contents/results therein. Be sure to surround any inputfilename with quotes if it uses spaces in the filename! (also holds true for any option you may use i.e. -o "New Directory of mine"!)
You really need to understand how the dos/command prompt (terminal in linux) works to truly harvest the power that lies in the calibre command line tools.