InDesign ICML Files

class bkgen.icml.ICML(fn=None, root=None, tree=None, parser=None, encoding=’UTF-8’, schemas=None, **args)[source]

Bases: bxml.xml.XML, bkgen.source.Source

model for working with ICML files (also idPkg:Story xml)

NS = {‘idPkg’: ‘http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging’}
POINTS_PER_EM = 12
ROOT_TAG = ‘Document’
classmethod classname(stylename)[source]

convert an Indesign style name into an HTML class name

document(fn=None, **params)[source]

produce and return XML output from this ICML document. fn = the output filename; default os.path.splitext(ICML.fn)[0] + ‘.xml’

documents(path=None, **params)[source]

return a list of documents containing the content of the document

include_mixin(style, mixin)[source]
metadata()[source]

return an opf:metadata element with the metadata in the document

style_attributes(elem, points_per_em=None)[source]

query style elem for attributes and return a CSS style definition block.

style_block(elem, points_per_em=None)[source]

query style elem and return a style definition block

stylesheet(fn=None, points_per_em=None)[source]

create a CSS stylesheet, using the style definitions in the ICML file.