示例#1
0
文件: writer.py 项目: GoGoBunny/blohg
 def assemble_parts(self):
     # we will add 2 new parts to the writer: 'first_paragraph_as_text' and
     # 'images'
     Writer.assemble_parts(self)
     self.parts['first_paragraph_as_text'] = \
         self.visitor.first_paragraph_as_text
     self.parts['images'] = self.visitor.images
示例#2
0
 def assemble_parts(self):
     # we will add 2 new parts to the writer: 'first_paragraph_as_text' and
     # 'images'
     Writer.assemble_parts(self)
     self.parts['first_paragraph_as_text'] = \
         self.visitor.first_paragraph_as_text
     self.parts['images'] = self.visitor.images
示例#3
0
def translate_to_parts(document):
    writer = Writer()
    writer.document = document
    writer.translate()
    writer.assemble_parts()
    return dict(writer.parts)
示例#4
0
def translate_to_parts(document):
  writer = Writer()
  writer.document = document
  writer.translate()
  writer.assemble_parts()
  return dict(writer.parts)