|
|
@ -18,17 +18,21 @@ def list_snippets(articles):
|
|
|
|
limit = 4
|
|
|
|
limit = 4
|
|
|
|
total = len(articles)
|
|
|
|
total = len(articles)
|
|
|
|
head = count_lines('entries/raw/res/head.txt')
|
|
|
|
head = count_lines('entries/raw/res/head.txt')
|
|
|
|
print(head)
|
|
|
|
|
|
|
|
result = []
|
|
|
|
result = []
|
|
|
|
|
|
|
|
|
|
|
|
for article in articles:
|
|
|
|
for article in articles:
|
|
|
|
article = []
|
|
|
|
text = []
|
|
|
|
article.append("title")
|
|
|
|
a = []
|
|
|
|
article.append(snip_article("words words words"))
|
|
|
|
|
|
|
|
article.append("11/22/33")
|
|
|
|
with open('entries/feature/' + article) as f:
|
|
|
|
article.append("social")
|
|
|
|
text = f.readlines()
|
|
|
|
article.append("link")
|
|
|
|
|
|
|
|
result.append(article)
|
|
|
|
a.append(text[head])
|
|
|
|
|
|
|
|
a.append(snip_article("words words words"))
|
|
|
|
|
|
|
|
a.append("11/22/33")
|
|
|
|
|
|
|
|
a.append("social")
|
|
|
|
|
|
|
|
a.append("link")
|
|
|
|
|
|
|
|
result.append(a)
|
|
|
|
return result
|
|
|
|
return result
|
|
|
|
|
|
|
|
|
|
|
|
def count_lines(fname):
|
|
|
|
def count_lines(fname):
|
|
|
|