← Back to team overview

calibre-devs team mailing list archive

Re: Modularization: The Empire Strikes Back!

 

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

> command subcommand
>
> is really only needed if the subcommands do widely different things
> from each other. Since we're trying to keep the Readers/Writers as
> simple as possible, they should ideally have only a few options that
> will not change their behavior too much.

I was thinking that it would make it easier to introduce new pipelines
with a custom set of transforms.  If transform plugins can only be
slotted into all conversion pipelines, I'm not sure how you're planning
on dealing with plugins which are appropriate for some conversions, but
not others.

> --help will work by using calibre's plugin system to generate a list
> of all the input/output formats and their associated help texts and
> appending that to the list of options for the available
> transformations. Since there are only a handful of writers and most
> readers wont have options, this shouldn't make the help text too
> cumbersome.

A good example of the problem I'm thinking of is font-size rescaling.
It's an option for EPUB and LRF output, but not Mobipocket output.
Either the --help text for a fully-generic ebook-convert needs to list
the font-size options twice for EPUB and LRF, or it needs to note which
formats those options apply to, and force all options to be arrange in
groups which it can indicate apply to some formats and not others.

-Marshall



Follow ups

References