working and decent tweet shares on each article snippet

small-nav
chimchooree 4 years ago
parent d9b78f4e4d
commit dde81160a2

@ -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('<ul>') > content.count('</ul>'):
content += '</ul>'
a.append(content)
a.append(text[head + 1].replace('<br>',''))
a.append(path)
a.append(content) # snippet
a.append(text[head + 1].replace('<br>','')) # timestamp
a.append(path) # URL
a.append(clean(text[head]).replace(' ','+')) # social media title
result.append(a)
return result

@ -75,7 +75,7 @@
{{!s[1]}}
</div>
<div class="snippet-info">
{{!s[2]}} • <a class="share-link share-twitter" href="http://twitter.com/share?text={{s[0]}}&url={{s[3]}}&via=lilchimchooree" target="_blank">tweet</a>
{{!s[2]}} • <a class="share-link share-twitter" href="http://twitter.com/share?text={{s[4]}}&url={{s[3]}}&via=lilchimchooree" target="_blank">tweet</a>
</div>
<div class="snippet-link">

Loading…
Cancel
Save