[Python-modules-team] Bug#473585: better handling of standard css file

Guenter Milde milde at users.sf.net
Thu Oct 20 20:55:50 UTC 2011


> Oh it would rock my world if the rst2* scripts could read options
> from a configuration file...

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





More information about the Python-modules-team mailing list