From e14da3f112eb14bab3520a193fceac20ac89d0fa Mon Sep 17 00:00:00 2001 From: Zenrac Date: Mon, 29 Oct 2018 15:39:10 +0100 Subject: [PATCH 1/5] Add files via upload --- TextToOwO/__init__.py | 1 + TextToOwO/__pycache__/__init__.cpython-35.pyc | Bin 0 -> 214 bytes TextToOwO/__pycache__/owo.cpython-35.pyc | Bin 0 -> 1108 bytes TextToOwO/owo.py | 26 ++++++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 TextToOwO/__init__.py create mode 100644 TextToOwO/__pycache__/__init__.cpython-35.pyc create mode 100644 TextToOwO/__pycache__/owo.cpython-35.pyc create mode 100644 TextToOwO/owo.py diff --git a/TextToOwO/__init__.py b/TextToOwO/__init__.py new file mode 100644 index 0000000..3e925cd --- /dev/null +++ b/TextToOwO/__init__.py @@ -0,0 +1 @@ +from .owo import text_to_owo \ No newline at end of file diff --git a/TextToOwO/__pycache__/__init__.cpython-35.pyc b/TextToOwO/__pycache__/__init__.cpython-35.pyc new file mode 100644 index 0000000000000000000000000000000000000000..99e5d685699eb7242364812eaf735c86eb3e99e5 GIT binary patch literal 214 zcmWgV<>lg*z8)>Zz`*brh~a<<$Z`PUVi6#b0z`}qISdTBj0{nX42&sE48fYrFBySS znvA!&OHwOJ;!E=5^UL%7G?{KO1L-1={*??xEINiEY)tw_u*$Vn~M4*{ARlJ8&cubZ1#T#{OZ5YUg0 d&&Tj`44b3nJXvmo;dktTS7H)GV|M)_kQ!{eeGl}mw7V%>%F4`TtMH-ko=5J zutLCSBe(!%5;R~sFauZ$m1YLM1QL3GNY`08|O-5rmEgZ5>WDs3M%` z&{6KS)k`FrrAbo+b=L`{QS}|qG9(64_gyA+k4I(Ab-sZZCFa$7@xZU~V$3~ZSBfth zg4>N^aNvZ+6}xG>j(0d;Z_P2@Eb=3}R(E+&+~7yyhQAiA&DHE6GV79I zSMa)PS9nSVuQCA~MKMm_ii%M!m77T?$?pwmDXo7>yl+CA@=NmWmYedX8gz@UYH(c@ zY5+B(XQduwk_rKY$#rT8HKVFQs6*9IC8UC>tt$^b&M>f%zcsgkjsEx6(N_pl@bbeK zXj7}l6pz|LPAS|&6U6W9xcf|O{D#(zo=x0ndKb^GFZP+(ogS@fLI*%RMm7l^jn!20 zD7~B1;?o&yk(YIAI=-7<_Pr(-VUTb64UrG2Z~4&AQ|Iz=s#JGsd>Bv@TlBA=gw<', 'UwU', '(・`ω\´・)', '(´・ω・\`)'] + + text = text.replace('L', 'W').replace('l', 'w') + text = text.replace('R', 'W').replace('r', 'w') + + text = last_replace(text, '!', '! {}'.format(random.choice(smileys))) + text = last_replace(text, '?', '? owo') + text = last_replace(text, '.', '. {}'.format(random.choice(smileys))) + + for v in vowels: + if 'n{}'.format(v) in text: + text = text.replace('n{}'.format(v), 'ny{}'.format(v)) + if 'N{}'.format(v) in text: + text = text.replace('N{}'.format(v), 'N{}{}'.format('Y' if v.isupper() else 'y', v)) + + return text From 6dfeaba5ff9d58478d0104a947d3da316a2fb537 Mon Sep 17 00:00:00 2001 From: Zenrac Date: Mon, 29 Oct 2018 15:39:48 +0100 Subject: [PATCH 2/5] Delete __init__.cpython-35.pyc --- TextToOwO/__pycache__/__init__.cpython-35.pyc | Bin 214 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 TextToOwO/__pycache__/__init__.cpython-35.pyc diff --git a/TextToOwO/__pycache__/__init__.cpython-35.pyc b/TextToOwO/__pycache__/__init__.cpython-35.pyc deleted file mode 100644 index 99e5d685699eb7242364812eaf735c86eb3e99e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 214 zcmWgV<>lg*z8)>Zz`*brh~a<<$Z`PUVi6#b0z`}qISdTBj0{nX42&sE48fYrFBySS znvA!&OHwOJ;!E=5^UL%7G?{KO1L-1={*??xEINiEY)tw_u*$Vn~M4*{ARlJ8&cubZ1#T#{OZ5YUg0 d&& Date: Mon, 29 Oct 2018 15:40:23 +0100 Subject: [PATCH 3/5] Delete owo.cpython-35.pyc --- TextToOwO/__pycache__/owo.cpython-35.pyc | Bin 1108 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 TextToOwO/__pycache__/owo.cpython-35.pyc diff --git a/TextToOwO/__pycache__/owo.cpython-35.pyc b/TextToOwO/__pycache__/owo.cpython-35.pyc deleted file mode 100644 index d676f8b42b66b50917d548a55d1afc68739b1ecb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1108 zcmZ`&%}*0S6n}4byM@vU@*xltEZRi(06iE_MNrX$hCm_^Vntxn8DYzIx6W?6bfKqu z;o#9f!n>Tj`44b3nJXvmo;dktTS7H)GV|M)_kQ!{eeGl}mw7V%>%F4`TtMH-ko=5J zutLCSBe(!%5;R~sFauZ$m1YLM1QL3GNY`08|O-5rmEgZ5>WDs3M%` z&{6KS)k`FrrAbo+b=L`{QS}|qG9(64_gyA+k4I(Ab-sZZCFa$7@xZU~V$3~ZSBfth zg4>N^aNvZ+6}xG>j(0d;Z_P2@Eb=3}R(E+&+~7yyhQAiA&DHE6GV79I zSMa)PS9nSVuQCA~MKMm_ii%M!m77T?$?pwmDXo7>yl+CA@=NmWmYedX8gz@UYH(c@ zY5+B(XQduwk_rKY$#rT8HKVFQs6*9IC8UC>tt$^b&M>f%zcsgkjsEx6(N_pl@bbeK zXj7}l6pz|LPAS|&6U6W9xcf|O{D#(zo=x0ndKb^GFZP+(ogS@fLI*%RMm7l^jn!20 zD7~B1;?o&yk(YIAI=-7<_Pr(-VUTb64UrG2Z~4&AQ|Iz=s#JGsd>Bv@TlBA=g Date: Mon, 29 Oct 2018 15:40:42 +0100 Subject: [PATCH 4/5] Delete __init__.py --- TextToOwo/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 TextToOwo/__init__.py diff --git a/TextToOwo/__init__.py b/TextToOwo/__init__.py deleted file mode 100644 index e69de29..0000000 From 7f87a25ee784b6422074a0138a3c9f6d3d56bdaa Mon Sep 17 00:00:00 2001 From: Zenrac Date: Mon, 29 Oct 2018 15:40:55 +0100 Subject: [PATCH 5/5] Delete owo.py --- TextToOwo/owo.py | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 TextToOwo/owo.py diff --git a/TextToOwo/owo.py b/TextToOwo/owo.py deleted file mode 100644 index b11f5c1..0000000 --- a/TextToOwo/owo.py +++ /dev/null @@ -1,26 +0,0 @@ -import random - -vowels = ['a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U'] - -def last_replace(s, old, new): - li = s.rsplit(old, 1) - return new.join(li) - -def text_to_owo(text): - """ Converts your text to OwO """ - smileys = [';;w;;', '^w^', '>w<', 'UwU', '(・`ω\´・)', '(´・ω・\`)'] - - text = text.replace('L', 'W').replace('l', 'w') - text = text.replace('R', 'W').replace('r', 'w') - - text = last_replace(text, '!', '! {}'.format(random.choice(smileys))) - text = last_replace(text, '?', '? owo') - text = last_replace(text, '.', '. {}'.format(random.choice(smileys))) - - for v in vowels: - if 'n{}'.format(v) in text: - text = text.replace('n{}'.format(v), 'ny{}'.format(v)) - if 'N{}'.format(v) in text: - text = text.replace('N{}'.format(v), 'N{}{}'.format('Y' if v.isupper() else 'y', v)) - - return text