class SequenceDiagramGenerator(ImageGeneratorClass): (source)
Undocumented
Method | __init__ |
Undocumented |
Method | cleanup |
Cleanup any temporary files that were created by this generator. Including log files and image files. |
Method | generate_image |
Generate an image for a user input |
Instance Variable | diagfile |
Undocumented |
Instance Variable | pngfile |
Undocumented |
Inherited from ImageGeneratorClass
:
Method | check_user_input |
Check user input before generating image |
Method | filter_source |
Filter contents of script file before displaying in textarea |
Method | get_default_text |
Provides a template or starting point for the user to begin editing. |
Instance Variable | notebook |
Undocumented |
Instance Variable | page |
Undocumented |
Instance Variable | plugin |
Undocumented |
Unknown Field: implementation | |
should be implemented by subclasses |
Generate an image for a user input
This is the method that does the actual work to generate an image out of input text. Typically it will write the text to a temporary file using a template and then call an external program (e.g. latex) to create an image out of that source file. The result should be an image file and optionally a log file.
When the external program failed preferably this method should still return a log file, so the user can check the details of why the creation failed.
Parameters | |
text | the source text as string - raw user input |
Returns | |
a 2-tuple of the image file and the log file as File objects. If no image file was created the first element should be None, if no log file is created second element should be None. | |
Raises | |
Error | this method is allowed to raise errors like ApplicationError when running a command failed. |
Unknown Field: implementation | |
must be implemented by subclasses |