HTML¶
A utility function to flatten HTML is provided, along with an export to an HTML format (using Presentation MathML).
- myokit.formats.html.html2ascii(html, width=79, indent=' ')¶
Flattens HTML and attempts to create readable ASCII code.
The output will be text-wrapped after
width
characters. Each new level of nesting will be indented with the text given asindent
.
Exporting¶
- myokit.formats.html.exporters()¶
Returns a dict of all exporters available in this module.
- class myokit.formats.html.HTMLExporter¶
This
Exporter
generates a HTML file displaying a model’s equations.The equations are encoded using Presentation MathML. This format can be viewed in most modern browsers, but is less suitable as an exchange format.
- model(path, model, protocol=None)¶
Export to a html document.
- post_export_info()¶
Optional method that returns a string containing information about this exporter, to be shown after the export is completed.
- runnable(path, model, protocol=None, *args)¶
Exports a
myokit.Model
and optionally amyokit.Protocol
to something that can be run or compiled.The output will be stored in the directory
path
. Amyokit.ExportError
will be raised if any errors occur.
- supports_model()¶
Returns
True
.
- supports_runnable()¶
Returns
True
if this exporter supports export of a model and optional protocol to a runnable piece of code.