def process_tables(self, table, info=None): self.rowcount = 0 table = self.pre_table( table ) table = tagfix('tr', table, info=info, matchfunc=self.process_rows) table = self.post_table( table ) self.tablecount += 1 return table
def process_rows(self, row, info=None): self.cellcount = 0 row = self.pre_row( row ) row = tagfix('td', row, info=info, matchfunc=self.process_cells) row = self.post_row( row ) self.rowcount += 1 return row
def __init__(self, html, filename, info={}, **kw ): self.filename = filename self.info = info self.tablecount = 0 html = self.pre_html( html ) html = tagfix('table', html, info=self.info, matchfunc=self.process_tables) html = self.post_html( html ) self.html = html