diary uses title from entry for snippets

small-nav
Mimi Momo 4 years ago
parent 47d60026f0
commit 92c7389e5c

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

Loading…
Cancel
Save