def pretty_all(container):
 for (name, mt) in container.mime_map.iteritems():
  prettied = False
  if (mt in OEB_DOCS):
   pretty_html_tree(container, container.parsed(name))
   prettied = True
  elif (mt in OEB_STYLES):
   container.parsed(name)
   prettied = True
  elif (name == container.opf_name):
   root = container.parsed(name)
   pretty_opf(root)
   pretty_xml_tree(root)
   prettied = True
  elif (mt in {guess_type(u'a.ncx'), guess_type(u'a.xml')}):
   pretty_xml_tree(container.parsed(name))
   prettied = True
  if prettied:
   container.dirty(name)

def pretty_all ( container ) : for ( name , mt ) in container . mime_map . iteritems ( ) : prettied = False if ( mt in OEB_DOCS ) : pretty_html_tree ( container , container . parsed ( name ) ) prettied = True elif ( mt in OEB_STYLES ) : container . parsed ( name ) prettied = True elif ( name == container . opf_name ) : root = container . parsed ( name ) pretty_opf ( root ) pretty_xml_tree ( root ) prettied = True elif ( mt in { guess_type ( u'a.ncx' ) , guess_type ( u'a.xml' ) } ) : pretty_xml_tree ( container . parsed ( name ) ) prettied = True if prettied : container . dirty ( name )
pretty print all html/css/xml files in the container .