#473585 docutils: move the default CSS file to /etc

#473585#3
Date:
2005-08-22 17:08:00 UTC
From:
To:
Oh it would rock my world if the rst2* scripts could read options
from a configuration file...

#473585#8
Date:
2008-03-31 13:02:29 UTC
From:
To:
It would be nice when the CSS for HTML [1] would be handled as a
configuration file in /etc/python/... This way at least command
line options to set a custom CSS can be left away. Probably more
files in [2] could be configuration files as well.

[1] /usr/share/pycentral/python-docutils/site-packages/docutils/writers/html4css1/html4css1.css
[2] /usr/share/pycentral/python-docutils/site-packages/docutils/writers

#473585#11
Date:
2008-03-31 13:51:51 UTC
From:
To:
clone 324540 -1
retitle -1 better handling of standard css file
thanks

also sprach Robert Hunger <robert.hunger@gmail.com> [2008.03.31.1502 +0200]:

Seems like a separate (but valid) wishlist item. Thus cloning.

#473585#20
Date:
2008-07-19 02:19:34 UTC
From:
To:
(I'm going through all the docutils bug reports in Debian; sorry to be
resurrecting this after so long...)

I'm really not convinced that having rst2html get its CSS file from /etc
is a reasonable enhancement; you're essentially proposing that docutils'
output become dependent on the (configuration of the) machine it's run on.

This seems inappropriate for what's basically a (specialized) compiler (it's
used in the build process of several Debian packages, for instance, including
at least one of mine). The docutils rst2html command seems to me as
though it ought to take input (options and source) and produce output,
with the output being generated deterministically from the input (rather
than from the input plus some details of the environment in which it's run).

If you have project-specific options that you always want to pass to the
rst2* tools, putting options in a config file and using --config=something.cfg
seems a better solution - at least you only need one command-line option that
way. I tend to write a Makefile whenever I have more than one rst file
in a project, which automates further.

    Simon

#473585#25
Date:
2008-07-21 13:03:41 UTC
From:
To:
Simon McVittie <smcv@debian.org> wrote on 2008-07-19T03:19:34+0100:

and on the user account it's run.

IMHO when you want a special configuration (e.g. the default
configuration) i think it's better to explicitly state this in
the build procedure (especially for a package).

There are many other programs that fit in this category e.g.
html2ps, pdfto{ps,text}, gcc, ... Nevertheless, most of these
programs allow custom settings in configuration files and/or
environment variables (e.g. ~/.html2psrc, {/etc/xpdf/xpdfrc,
~/.xpdfrc}, {C_INCLUDE_PATH,GCC_EXEC_PREFIX,COMPILER_PATH})

Me too, but I would like to have a personal and machine wide
default.

Robert

#473585#30
Date:
2011-10-20 20:55:50 UTC
From:
To:
But they already do! Since ages!
See http://docutils.sourceforge.net/docs/user/config.html

 By default, Docutils checks the following places for configuration files,
 in the following order:

  /etc/docutils.conf: This is a system-wide configuration file,
  applicable to all Docutils processing on the system.

  ./docutils.conf: This is a project-specific configuration file, located
  in the current directory. The Docutils front end has to be executed
  from the directory containing this configuration file for it to take
  effect (note that this may have nothing to do with the location of the
  source files). Settings in the project-specific configuration file will
  override corresponding settings in the system-wide file.

  ~/.docutils: This is a user-specific configuration file, located in the
  user's home directory. Settings in this file will override corresponding
  settings in both the system-wide and project-specific configuration
  files.

 ...

So you can easily make a copy of html4css1.css, edit to your taste and write
in one of the config files something like:

[html4css1 writer]
# my default style-sheet
stylesheet-path: /path/to/my/customized/stylesheet.css


Günter

#473585#35
Date:
2011-10-20 21:43:09 UTC
From:
To:
retitle 473585 docutils: move the default CSS file to /etc
tags 473585 + wontfix
submitter 473585 Robert Hunger <robert.hunger@gmail.com>
thanks

Hi Guenter,

First of all, thanks for your interest in Debian bugs!

* Guenter Milde <milde@users.sf.net>, 2011-10-20, 22:55:

That's true. However, while this bug was originally about configurable
settings, it was since then split into two: one about the original issue
(#324540) and the other one about moving the default CSS file into /etc
(#473585).

I don't think that the other request is reasonable, so I'm tagging it as
wontfix (and making the bug subject more clear).