aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrusinthread <rusinthread@cock.li>2016-12-23 02:59:36 +0300
committerrusinthread <rusinthread@cock.li>2016-12-23 02:59:36 +0300
commit8c61a5993a54b8334528180bdd4915cd0dd3392a (patch)
tree934c3d9821b93d7ce1ca21feb067edc73f71a751
parent278083d122bd6c89a70c0d55da636611926fb8ae (diff)
remove old obsolete code
-rwxr-xr-xmain.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/main.py b/main.py
index e87122d..4b8e0ac 100755
--- a/main.py
+++ b/main.py
@@ -80,7 +80,7 @@ def clean_string(s, remove_junk=False):
return s
-def decode(s, optimize=False):
+def decode(s):
buf = ''
for word in s.split(' '):
word = word.strip()
@@ -92,8 +92,7 @@ def decode(s, optimize=False):
else:
letter = word[0]
buf += letter
- if optimize:
- buf = re.sub(r'ппв', '', buf, flags=re.I)
+
return buf
def main():
@@ -117,7 +116,7 @@ def main():
print(obj['text'])
print_colored(text, 'green', fallback_prefix='[CLEANED] ')
- print_colored(decode(text, optimize=False), 'cyan', fallback_prefix='[DECODED] ')
+ print_colored(decode(text), 'cyan', fallback_prefix='[DECODED] ')
if 'pic' in obj:
pic = obj['pic'] if isinstance(obj['pic'], list) else [obj['pic']]