(self, document_table, skip_first=False)
Given a document that's been parsed into the appropriate
        rows, write those rows to the resulting files.
Given a document that's been parsed into the appropriate
        rows, write those rows to the resulting files.
Given a document that s been parsed into the appropriate rows write those rows to the resulting files .
def write(self, document_table, skip_first=False):
        """
        Given a document that's been parsed into the appropriate
        rows, write those rows to the resulting files.
        """
        assert self._isopen
        for table_index, table in document_table:
            for i, row in enumerate(table):
                if skip_first and i == 0:
                    continue
                # update the primary component of the ID to match
                # how many docs we've seen
                try:
                    row_has_id = row.has_id()
                except AttributeError:
                    row_has_id = False
                if row_has_id:
                    row.id = (self._current_primary_id,) + tuple(row.id[1:])

                self.write_row(table_index, row)

        self._current_primary_id += 1
def write ( self , document_table , skip_first = False ) : assert self . _isopen for table_index , table in document_table : for i , row in enumerate ( table ) : if skip_first and i == 0 : continue # update the primary component of the ID to match # how many docs we've seen try : row_has_id = row . has_id ( ) except AttributeError : row_has_id = False if row_has_id : row . id = ( self . _current_primary_id , ) + tuple ( row . id [ 1 : ] ) self . write_row ( table_index , row ) self . _current_primary_id += 1