diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-06-19 15:22:24 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-06-19 15:22:24 +0200 |
commit | 25f53bac505295613b0cbb43e300f5c7bee79d55 (patch) | |
tree | 71787e36ba34dd1c4edcd304f3860396fc0ea56f | |
parent | f033c40970a399049a368a6a69153ed2149f2217 (diff) | |
download | www_shared-25f53bac505295613b0cbb43e300f5c7bee79d55.tar.gz www_shared-25f53bac505295613b0cbb43e300f5c7bee79d55.zip |
shorten dots
-rw-r--r-- | textproc.py | 3 |
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 | ||