aboutsummaryrefslogtreecommitdiff
path: root/template.py
diff options
context:
space:
mode:
Diffstat (limited to 'template.py')
-rwxr-xr-xtemplate.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/template.py b/template.py
index cee18aff..9fe859fd 100755
--- a/template.py
+++ b/template.py
@@ -166,7 +166,8 @@ def preview_text(filename):
166 k.append(i) 166 k.append(i)
167 b = ''.join(str(e) for e in k) 167 b = ''.join(str(e) for e in k)
168 text = b.replace("\n", "") 168 text = b.replace("\n", "")
169 return(text) 169 textreduced = (text[:300] + '...') if len(text) > 300 else (text + '..')
170 return(textreduced)
170 171
171 172
172def abstract_news(filename): 173def abstract_news(filename):