diary uses title from entry for snippets
This commit is contained in:
+12
-8
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user