A generic filter for system commands

For the information geek, we need a generic filter that sends the text fragment to any pre-defined system command, and sets the rendered HTML output as the output of the command. Graphviz Filter is a special case of such a filter, but we really need a generic system.

I'm thinking: gnuplot, LilyPond, LaTeX, etc. All housed under one roof.

Some design issues arise: Each of these programs produces output in a variety of formats. How to control the desired format? How to specify other parameters? How to render the output format in HTML?

  • Whereas Graphviz Filter solved this problem by parsing comments in the DOT script to extract parameters, this is a clumsy approach. Next time, I'd like to create a content type for each system application, where the fields of the content type represent the different parameters. This way, adding parameters becomes easier.
  • To render the output formats, the current Graphviz Filter architecture works OK: each output format can register a callback that converts the actual command output (a text file, a bitmap graphic, a vector graphic) into an HTML fragment.
  • How to support styling of the entities being processed? This approach was proposed for Graphviz Filter.
  • How to support add-on modules that add information to the entities being processed?