From dde81160a2d41c455f857a0e7fe438bb054905fa Mon Sep 17 00:00:00 2001 From: chimchooree Date: Sun, 4 Oct 2020 21:15:11 -0500 Subject: [PATCH] working and decent tweet shares on each article snippet --- src/index.py | 9 +++++---- src/views/diary.tpl | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/index.py b/src/index.py index 05319cd..47f13b8 100644 --- a/src/index.py +++ b/src/index.py @@ -33,14 +33,15 @@ def list_snippets(articles): with open('entries/' + article) as f: text = f.readlines() length = len(text) - a.append(text[head]) + a.append(clean(text[head])) # title content = snip_article(find_content(article, length, head, tail), path) if content.count(''): content += '' - a.append(content) - a.append(text[head + 1].replace('
','')) - a.append(path) + a.append(content) # snippet + a.append(text[head + 1].replace('
','')) # timestamp + a.append(path) # URL + a.append(clean(text[head]).replace(' ','+')) # social media title result.append(a) return result diff --git a/src/views/diary.tpl b/src/views/diary.tpl index 3c18d9f..0df374b 100644 --- a/src/views/diary.tpl +++ b/src/views/diary.tpl @@ -75,7 +75,7 @@ {{!s[1]}}
- {{!s[2]}} • + {{!s[2]}} •