fix
This commit is contained in:
parent
11f48f6ffc
commit
7b1d166f45
16
owo/owo.py
16
owo/owo.py
@ -1,7 +1,21 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from pyowo import owo
|
||||
import argparse, sys
|
||||
from re import compile, sub
|
||||
|
||||
replacements = [
|
||||
(compile(r"(?:r|l)"), "w"),
|
||||
(compile(r"(?:R|L)"), "W"),
|
||||
(compile(r"n([aeiou])"), "ny\\1"),
|
||||
(compile(r"N([aeiou])"), "Ny\\1"),
|
||||
(compile(r"N([AEIOU])"), "NY\\1"),
|
||||
(compile(r"ove"), "uv"),
|
||||
]
|
||||
|
||||
def owo(text: str) -> str:
|
||||
for r in replacements:
|
||||
text = sub(r[0], r[1], text)
|
||||
return text
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser("owo")
|
||||
|
Loading…
Reference in New Issue
Block a user