|
|
@ -38,7 +38,7 @@ def list_snippets(articles):
|
|
|
|
if content.count('<ul>') > content.count('</ul>'):
|
|
|
|
if content.count('<ul>') > content.count('</ul>'):
|
|
|
|
content += '</ul>'
|
|
|
|
content += '</ul>'
|
|
|
|
a.append(content)
|
|
|
|
a.append(content)
|
|
|
|
a.append(text[head + 1])
|
|
|
|
a.append(text[head + 1].replace('<br>',''))
|
|
|
|
a.append("social")
|
|
|
|
a.append("social")
|
|
|
|
a.append(path)
|
|
|
|
a.append(path)
|
|
|
|
result.append(a)
|
|
|
|
result.append(a)
|
|
|
@ -71,7 +71,7 @@ def snip_article(article, path):
|
|
|
|
limit = 300
|
|
|
|
limit = 300
|
|
|
|
result = article[0:min(len(article),limit)]
|
|
|
|
result = article[0:min(len(article),limit)]
|
|
|
|
result = result.rsplit(' ',1)[0]
|
|
|
|
result = result.rsplit(' ',1)[0]
|
|
|
|
# cut off at certain line count, too?
|
|
|
|
# cut off after 5 lines, too?
|
|
|
|
return result + " ... "
|
|
|
|
return result + " ... "
|
|
|
|
|
|
|
|
|
|
|
|
def sort_files(files):
|
|
|
|
def sort_files(files):
|
|
|
|