ISessionParser
Universal linefeed for commands in articles written on Windows,
Like doctest, write hints for wordish to adjust its behavior when parsing hints in the comment after a command:
~$ echo boilerplate # ignore
wildly unpredictable
~$ echo coucou >&2 # &2
coucou
~$ She is a witch # returncode: 127
She: command not found
~$ rm -r ./temp_mount_point # cleanup
The returned expected could be an CommandOutput instead of simple string and carry the attribute ignore, returncode, cleanup or err.
The idea for the cleanup command is to execute them on bailout, as they are meant to return the system in predictable state.
IReporter
ICommandRunner
IBlockSelector
Execute not at parsing time but at doctree resolved time, it allows to build a data structure of articles and cleanup command instead of communicating via a flat file descriptor.
But it is slower since wordish would be blocked until the end of parsing and resolution,
Support other format syntax, like markdown,
Support an INodeSelector( doctree_node ) -> boolean, instantiating a is_shell(), is_article(), is_cleanup(). Making it possible to gather the snippets in the following data structure:
# essence = [ n for n in doctree.traverse()
# if is_article(n) or is_cleanup(n) or is_shell(n) ]
# snippets = [ split(a, is_cleanup ) for a in split( essence, is_article ) ]