Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: David Goodger <goodger <at> python.org>
Subject: Re: [Docutils-checkins] r4041 - trunk/docutils/docs/dev/todo.txt
Newsgroups: gmane.text.docutils.devel
Date: Friday 11th November 2005 13:24:55 UTC (over 11 years ago)
[[email protected]]
> +  html4css1.css will break.  So it might be better to use a secondary
> +  stylesheet for the PEP writer.  I.e., the PEP writer uses the HTML
> +  writer's standard stylesheet *plus* the ``pep.css`` stylesheet.
> +  (Driving this concept even further, we could allow for three
> +  stylesheets [HTML writer, PEP writer, user] or any number of
> +  stylesheets.  It's just a bit difficult to come up with a proper
> +  option syntax for that.)
>
>    Also, ``pep.css`` really has only one major customer: python.org.
>    The PEP stylesheet serves its purpose well for them.  They have no
>    use for modular, imported stylesheets, which would only increase
>    bandwidth and add complexity.
>
> +  On the other hand, we don't really want to maintain two stylesheets
> +  in parallel.  The redundancy inevitably causes errors.

Let's not converse via checkins, OK?  My bad; I started it.

I vote -0 on the idea.  If somebody wants to implement multiple
stylesheets, I won't object, but I don't care much either.

Option syntax: optparse can handle accumulating lists of option
values.  Config files can list space-separated values.

The problem is that since we have a default value, we have to
differentiate between adding another stylesheet and replacing the
default.  I suggest that the existing --stylesheet & --stylesheet-path
options keep their semantics to replace the existing settings.  We
could introduce new --add-stylesheet & --add-stylesheet-path options,
which accumulate; further --stylesheet/--stylesheet-path options would
clear these lists.  The stylesheet or stylesheet_path setting (only
one may be set), plus the added_stylesheets and added_stylesheet_paths
settings, describe the combined styles.

For example, this run will have only one custom stylesheet:

    rstpep2html.py --stylesheet-path custom.css ...

This run will use the default stylesheet, and the custom one:

    rstpep2html.py --add-stylesheet-path custom.css ...

This run will use the default stylesheet, a custom local stylesheet,
and an external stylesheet:

    rstpep2html.py --add-stylesheet-path custom.css \
        --add-stylesheet http://www.example.org/external.css
...

This run will use only the second custom stylesheet:

    rstpep2html.py --add-stylesheet-path custom.css \
        --stylesheet-path second.css ...

As for PEPs, there haven't been any errors due to redundancy that I
know of so far.  If reST PEPs are the only rationale for the extra
functionality, it's not enough; -1.  A stronger use case needs to be
put forward first.

--
David Goodger <http://python.net/~goodger>
 
CD: 4ms