From: Benja F. <b.f...@gm...> - 2003-01-15 16:44:40
|
Mark Nodine wrote: > I'd like to get everyone's thoughts about a new RST directive, > which I'll tentatively call "shell", though I'm open to other > ideas for the name. The proposed shell directive would be > similar to the "include" directive except that instead of reading > from a file that is named in the argument, it executes the > argument in a shell. Like "include", it would allow the > "literal" option to disable reparsing of the output as RST. > > The advantage of the proposed "shell" directive is that it > allows parts of the document to be constructed dynamically, > without having to run the program previously to create an > included file. For example, you could have a document that > has something like > > The following files are in this directory: > > .. shell:: ls -l > :literal: > > What do people think? You'd want to allow this only when a special option is passed to docutils, so that you can simply run a ReST someone sends you through the converter without worrying about '.. shell:: rm ~ -rf'. - Benja |