Public Member Functions | |
def | __init__ |
def | dotIndenter |
def | export |
def | get_png_size |
def | processMap |
def | selectNode |
def | write_output |
Public Attributes | |
include_nodes | |
shapes | |
Static Public Attributes | |
tuple | file_types = ('bmp','dot','eps','gif','jpg','pdf','png','ps','svg','tif','png+map','stdout') |
dictionary | option_types |
string | plugin_name = 'DOT Export' |
Export a CMSSW config file to DOT (http://www.graphviz.org) markup, either as raw markup or by invoking the dot program, as an image.
Definition at line 261 of file DOTExport.py.
def DOTExport.DotExport.__init__ | ( | self | ) |
def DOTExport.DotExport.dotIndenter | ( | self, | |
dot | |||
) |
Simple indenter for dot output, mainly to prettify it for human reading.
Definition at line 309 of file DOTExport.py.
References join().
Referenced by DOTExport.DotExport.export().
def DOTExport.DotExport.export | ( | self, | |
data, | |||
filename, | |||
filetype | |||
) |
Definition at line 463 of file DOTExport.py.
References DOTExport.DotExport.dotIndenter(), FileExportPlugin.FileExportPlugin.options, DOTExport.DotProducer.options, confdb.HLTProcess.options, fireworks::OptionNode.options(), DOTExport.DotExport.selectNode(), DOTExport.DotProducer.shapes, EcalLaserAnalyzer2.shapes, DOTExport.DotExport.shapes, and DOTExport.DotExport.write_output().
def DOTExport.DotExport.get_png_size | ( | self, | |
filename | |||
) |
def DOTExport.DotExport.processMap | ( | self, | |
mapdata | |||
) |
Re-process the client-side image-map produces when png+map is selected. DOT will only ever put a single URL in the imagemap corresponding to a node, with the 'url' parameter (after html encoding) as the url, and the 'title' parameter as the title. This isn't useful behaviour for our purposes. We want probably several link areas, or a javascript link to make a menu appear, or other more complex behaviour. If the option 'urlprocess' is turned on, this function is called, and it expects to find a dictionary it can eval in the url parameter. I can't think of a less messy way of passing data to this function without having inner access to DOT at the moment. This function iterates through all the areas in the mapfile, replacing each one with one or more areas according to the rules in the dictionary stored in the URL parameter. The dictionary should have structure: { split_x:#, split_y:#, scale_x:#, scale_y:#, cells:[ { top:#, left:#, width:#, height:#, html_attribute1:"...", html_attribute2:"..." ] } The imagemap is first scaled in size by scale_x and scale_y. It is then split into split_x*split_y rectangular cells. New areas are created for each defined cell with the defined top,left location and width,height. This will not check you aren't making new areas that overlap if you define them as such. The areas then get attributes defined by html_attribute fields - eg, 'html_href':'mypage.htm' becomes 'href'='mypage.htm' in the area. Probably you want as a minimum to define html_href and html_alt. It would also be useful to set html_class to allow highlighting of different link types, or html_onclick/onmouseover for more exotic behaviour. This will probably be quite sensitive to the presence of special characters, complex splitting schemes, etc. Use with caution. This may be somewhat replaceable with the <html_label> and cut-down table format that graphviz provides, but I haven't had much of an experiment with that.
Definition at line 393 of file DOTExport.py.
References join(), and python.multivaluedict.map().
Referenced by DOTExport.DotExport.write_output().
def DOTExport.DotExport.selectNode | ( | self, | |
dotdata, | |||
node, | |||
depth_s | |||
) |
Definition at line 328 of file DOTExport.py.
References DOTExport.DotExport.__init__(), and funct.abs().
Referenced by DOTExport.DotExport.export().
def DOTExport.DotExport.write_output | ( | self, | |
dot, | |||
filename, | |||
filetype | |||
) |
Definition at line 498 of file DOTExport.py.
References DOTExport.DotExport.get_png_size(), bookConverter.max, FileExportPlugin.FileExportPlugin.options, DOTExport.DotProducer.options, confdb.HLTProcess.options, fireworks::OptionNode.options(), and DOTExport.DotExport.processMap().
Referenced by DOTExport.DotExport.export().
|
static |
Definition at line 294 of file DOTExport.py.
Referenced by FileExportPlugin.FileExportPlugin.fileTypes().
DOTExport.DotExport.include_nodes |
Definition at line 373 of file DOTExport.py.
|
static |
Definition at line 265 of file DOTExport.py.
Referenced by FileExportPlugin.FileExportPlugin.listOptions().
|
static |
Definition at line 293 of file DOTExport.py.
Referenced by FileExportPlugin.FileExportPlugin.pluginName().
DOTExport.DotExport.shapes |
Definition at line 299 of file DOTExport.py.
Referenced by DOTExport.DotExport.export().