Exemple #1
0
 def emit_page(self, index, text):
     """Emit a plain text page."""
     record = DocumentRecord()
     record.document_id = self.document.id
     record.text = safe_string(text)
     record.index = index
     db.session.add(record)
Exemple #2
0
 def create_page(self, document, text, number=1):
     record = DocumentRecord()
     record.document_id = document.id
     record.text = text
     record.index = number
     db.session.add(record)
     return record
Exemple #3
0
 def emit_page(self, index, text):
     """Emit a plain text page."""
     record = DocumentRecord()
     record.document_id = self.document.id
     record.text = safe_string(text)
     record.index = index
     db.session.add(record)
Exemple #4
0
 def emit_page(self, index, text):
     """Emit a plain text page."""
     self.document.type = Document.TYPE_TEXT
     record = DocumentRecord()
     record.document_id = self.document.id
     record.text = text
     record.index = index
     db.session.add(record)
Exemple #5
0
 def emit_page(self, index, text):
     """Emit a plain text page."""
     text = stringify(text)
     record = DocumentRecord()
     record.document_id = self.document.id
     record.text = text
     record.index = index
     db.session.add(record)
     if text is not None:
         self.pages.append(text)