aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2020-06-19 15:22:24 +0200
committerMartin Schanzenbach <mschanzenbach@posteo.de>2020-06-19 15:22:24 +0200
commit25f53bac505295613b0cbb43e300f5c7bee79d55 (patch)
tree71787e36ba34dd1c4edcd304f3860396fc0ea56f
parentf033c40970a399049a368a6a69153ed2149f2217 (diff)
downloadwww_shared-25f53bac505295613b0cbb43e300f5c7bee79d55.tar.gz
www_shared-25f53bac505295613b0cbb43e300f5c7bee79d55.zip
shorten dots
-rw-r--r--textproc.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/textproc.py b/textproc.py
index 9a89b76..30370ac 100644
--- a/textproc.py
+++ b/textproc.py
@@ -48,8 +48,7 @@ def cut_text(filename, count):
48 k.append(i) 48 k.append(i)
49 b = ''.join(str(e) for e in k) 49 b = ''.join(str(e) for e in k)
50 text = html2text(b.replace("\n", "")) 50 text = html2text(b.replace("\n", ""))
51 textreduced = (text[:count] + '...') if len(text) > count else (text + 51 textreduced = (text[:count] + ' [...]') if len(text) > count else (text)
52 '..')
53 return (textreduced) 52 return (textreduced)
54 53
55 54