'Convert HTML to something meaningful in plain text'

def unknown_starttag(self, tag, attrs):

    tag = lower(tag)
    if (tag not in self.ignore_tags):
        if ((tag[0] == 'h') or (tag in ['br', 'pre', 'p', 'hr'])):
            self.add_break()
        elif (tag == 'img'):
            src = ''
            for (k, v) in attrs:
                if (lower(k) == 'src'):
                    src = v
            self.add_break()
            self.add_text(('Image:    ' + src))
        elif (tag == 'li'):
            self.add_break()
            if self.ol_number:
                self.add_text((str(self.ol_number) + '    -    '))
                self.ol_number = (self.ol_number + 1)
            else:
                self.add_text('-    ')
        elif (tag in ['dd', 'dt']):
            self.add_break()
            self.mod_indent((+ 1))
        elif (tag in ['ul', 'dl', 'ol']):
            self.mod_indent((+ 1))
            if (tag == 'ol'):
                self.ol_number = 1
