Example #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)
Example #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
Example #3
0
File: result.py Project: pudo/aleph
 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)
Example #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)
Example #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)