This commit is contained in:
acetheking987 2024-04-19 22:26:11 +01:00
parent 11f48f6ffc
commit 7b1d166f45
2 changed files with 16 additions and 3 deletions

View File

@ -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")

View File

@ -8,8 +8,7 @@ setup(
entry_points = {
"console_scripts": ['owo = owo.owo:main']
},
install_requires=['pyowo==1.0.1'],
version = "0.2.0",
version = "0.2.3",
description = "owoify any text from the command line",
author = "Alfie King",
author_email = "acetheking987@gmail.com"