def __init__(self, name=None, binary=None, binaryArgs=None, **kwargs): if name is not None: self.__name__ = name if binary is not None: self.binary = bin_search(binary) else: self.binary = bin_search(self.binaryName) if binaryArgs is not None: self.binaryArgs = binaryArgs
def __init__(self, name=None, binary=None, binaryArgs=None, **kwargs): if name is not None: self.__name__ = name if binary is not None: self.binary = bin_search(binary) else: self.binary = bin_search(self.binaryName) if binaryArgs is not None: self.binaryArgs = binaryArgs
def __init__(self, name=None, **kwargs): self.config = { # sample configuration 'binary_path' : bin_search('xsltproc'), 'command_line' : '%(transform)s %(input)s', 'inputs' : ('text/xml',), 'output' : 'text/html', 'output_encoding' : 'UTF-8', 'dtds' : { '-//OASIS//DTD DocBook V4.1//EN' : '/usr/share/sgml/docbook/xsl-stylesheets-1.29/html/docbook.xsl' }, 'default_transform': '' } self.config_metadata = { 'binary_path' : ('string', 'Binary path', 'Path of the executable on the server.'), 'command_line' : ('string', 'Command line', '''Additional command line option. There should be at least the input file (designed by "%(input)s") and the xsl file (designed by "%(transform)s").The transformation\'s result must be printed on stdout. '''), 'inputs' : ('list', 'Inputs', 'Input(s) MIME type. Change with care.'), 'output' : ('string', 'Output', 'Output MIME type. Change with care.'), 'output_encoding': ('string', 'Output encoding', 'Output encoding.'), 'dtds' : ('dict', 'DTDs', 'Association of public ids or dtds to XSL transformations.', ('Public id', 'XSLT path')), 'default_transform' : ('string', 'Default xslt', 'Default xslt, used when no specific transformation is found.'), } self.config.update(kwargs) if name: self.__name__ = name
def __init__(self, name=None, **kwargs): self.config = { # sample configuration 'binary_path' : bin_search('xsltproc'), 'command_line' : '%(transform)s %(input)s', 'inputs' : ('text/xml',), 'output' : 'text/html', 'output_encoding' : 'UTF-8', 'dtds' : { '-//OASIS//DTD DocBook V4.1//EN' : '/usr/share/sgml/docbook/xsl-stylesheets-1.29/html/docbook.xsl' }, 'default_transform': '' } self.config_metadata = { 'binary_path' : ('string', 'Binary path', 'Path of the executable on the server.'), 'command_line' : ('string', 'Command line', '''Additional command line option. There should be at least the input file (designed by "%(input)s") and the xsl file (designed by "%(transform)s").The transformation\'s result must be printed on stdout. '''), 'inputs' : ('list', 'Inputs', 'Input(s) MIME type. Change with care.'), 'output' : ('string', 'Output', 'Output MIME type. Change with care.'), 'output_encoding': ('string', 'Output encoding', 'Output encoding.'), 'dtds' : ('dict', 'DTDs', 'Association of public ids or dtds to XSL transformations.', ('Public id', 'XSLT path')), 'default_transform' : ('string', 'Default xslt', 'Default xslt, used when no specific transformation is found.'), } self.config.update(kwargs) if name: self.__name__ = name
def __init__(self, name=None, binary=None, **kwargs): if name is not None: self.__name__ = name if binary is not None: self.binary = bin_search(binary) self.binary = getShortPathName(self.binary)
'inputs': ('application/vnd.ms-excel',), 'output': 'text/html', }), ('ps_to_text', None, {'binary_path': 'ps2ascii', 'command_line': '%(input)s', 'inputs': ('application/postscript',), 'output': 'text/plain', }), ) TRANSFORMS = {} for tr_name, extension, config in COMMAND_CONFIGS: try: bin = bin_search(config['binary_path']) except MissingBinary: print('no such binary {0}'.format(config['binary_path'])) else: tr = ExternalCommandTransform(tr_name, extension) tr.config['binary_path'] = bin tr.__name__ = tr_name tr.config = config TRANSFORMS[tr_name] = tr XMLPROCS_CONF = { 'xsltproc': '--catalogs --xinclude -o %(output)s %(transform)s %(input)s', '4xslt': ' -o %(output)s %(input)s %(transform)s', } bin = None
def __init__(self, name=None, binary=None, **kwargs): if name is not None: self.__name__ = name if binary is not None: self.binary = bin_search(binary) self.binary = getShortPathName(self.binary)
'inputs': ('application/vnd.ms-excel', ), 'output': 'text/html', }), ('ps_to_text', None, { 'binary_path': 'ps2ascii', 'command_line': '%(input)s', 'inputs': ('application/postscript', ), 'output': 'text/plain', }), ) TRANSFORMS = {} for tr_name, extension, config in COMMAND_CONFIGS: try: bin = bin_search(config['binary_path']) except MissingBinary: print('no such binary {0}'.format(config['binary_path'])) else: tr = ExternalCommandTransform(tr_name, extension) tr.config['binary_path'] = bin tr.__name__ = tr_name tr.config = config TRANSFORMS[tr_name] = tr XMLPROCS_CONF = { 'xsltproc': '--catalogs --xinclude -o %(output)s %(transform)s %(input)s', '4xslt': ' -o %(output)s %(input)s %(transform)s', } bin = None
ZOPE_LINES_IS_TUPLE_TYPE = True ## MYSQL SQLStorage Table Type ## To use connections with ACID transactions you should define it as ## INNODB. The MySQL default table type is MyISAM. MYSQL_SQLSTORAGE_TABLE_TYPE = 'INNODB' ## Debug security settings of Fields, Widgets and Storages? DEBUG_SECURITY=False #DEBUG_SECURITY=True ## If you have graphviz http://www.research.att.com/sw/tools/graphviz/ ## and its frontend "dot" installed on your system set this to True ## You need dot version > 1.10 with cmapx support. try: GRAPHVIZ_BINARY = transform_utils.bin_search('dot') except transform_utils.MissingBinary: # graphviz not found GRAPHVIZ_BINARY = None HAS_GRAPHVIZ = False else: HAS_GRAPHVIZ = True ## comment out the following line to enable the reference graph tool HAS_GRAPHVIZ = False ## protect attributes of AttributeStorage from unallowed access? ATTRIBUTE_SECURITY = True ## set language default for metadata, it will be overwritten by portal-settings! LANGUAGE_DEFAULT=u''