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)
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)
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)