I want to generate html5 plus css of an specific Bootstrap writer but without using the command line
so the code is
from html5css3 import Writer
from docutils.core import publish_string
variable_string='\nsome text\n========='
result = publish_string(variable_string, writer=Writer(), writer_name='html5)
And it returns the expected result en html5 but without bootstrap style, so my next step is to programatically use some command line arguments
cmd >>> rst2html5 --boostrap-css -jequery input.rst > outputfile.html
But I don't know how.
See the following:
http://docutils.sourceforge.net/docs/api/publisher.html
http://docutils.sourceforge.net/docs/api/runtime-settings.html
http://docutils.sourceforge.net/docs/user/config.html
Those documents refer to the core Docutils code. But you seem to be using a third-party front-end tool. If you need help for that tool, you should ask its author.
Note that core Docutils also has a rst2html5.py front end. It is NOT the same as the one you referenced (https://github.com/marianoguerra/rst2html5). I don't know how that one works or if it is compatible, and we cannot help you with specifics about that tool.
It would be helpful to know how it will be the programatically use of the command line
using by docutils.core Publish
and an equivalent code could be
And again how to pass the theme keyyword. That's because the front end (https://github.com/marianoguerra/rst2html5) also uses the publish_cmdline(writer_name='html', description=description)
For an example using publish_string, see
http://docutils.sourceforge.net/docs/api/publisher.html#configuration