'One-liner string summary of text info.'

def as_summary(self):

    d = self.as_dict()
    info = []
    if (self.file_type_name and (self.file_type_name != 'regular    file')):
        info.append(self.file_type_name)
    else:
        info.append((self.lang or '???'))
        if (not self.is_text):
            info.append('binary')
        elif self.encoding:
            enc = self.encoding
            if self.has_bom:
                enc += '    (bom)'
            info.append(enc)
        if (DEBUG_CHARDET_INFO and hasattr(self, 'chardet_info') and self.chardet_info['encoding']):
            info.append(('chardet:%s/%.1f%%' % (self.chardet_info['encoding'], (self.chardet_info['confidence'] * 100.0))))
    return ('%s:    %s' % (self.path, ',    '.join(info)))
