Esempio n. 1
0
def detailToTitle(td):
    '''Converts something like feedparser's title_detail into a
    nice text or html string.'''
    # Title may be in plain title, but a title_detail is preferred
    if td.type=='text/html':
        title=h2t(td.value).strip().replace('\n', ' ')
    else:
        title=td.value.strip()
    return title
Esempio n. 2
0
 def detailToTitle(self,td):
     if td.type=='text/html':
         title=h2t(td.value).strip().replace('\n', ' ')
     else:
         title=td.value.strip()    
     return title
Esempio n. 3
0
 def __repr__(self):
     if not self.decoTitle:
         self.decoTitle = h2t(self.title).strip().replace('\n', ' ')
     return self.decoTitle