← Back to team overview

calibre-devs team mailing list archive

Re: Modularization: The Empire Strikes Back!

 

On Sat, Feb 7, 2009 at 12:57 PM, Kovid Goyal <kovid@xxxxxxxxxxxxxx> wrote:

> where the order of arguments is significant. The available options
> will be adjusted based on the types of the input and output file
> names.

Hmm.  Ok.  Not a big change required to my proposed interfaces.  But how
is documentation for the options going to be exposed?  If
'ebook-convert' doesn't know what options are available unless it's
provided filenames, how will '--help' work?

I'm 100% with hanging all conversion off of a single command, but
perhaps something like the increasingly-common "<command> <subcommand>"
interface would be more appropriate?  Readers have no options, then the
<subcommand> specifies a particular conversion pipeline.  Plugins can
provide their own pipelines.  So:

    ebook-convert mobi [OPTIONS] BOOK

Etc.  Doing "ebook-convert --help" would list available pipelines and
doing "ebook-convert mobi --help" would list the options for Mobipocket
generation, etc.

-Marshall



Follow ups

References