From 7b1d166f45655140227c8e2e7a4dccbee932c4f3 Mon Sep 17 00:00:00 2001 From: acetheking987 Date: Fri, 19 Apr 2024 22:26:11 +0100 Subject: [PATCH] fix --- owo/owo.py | 16 +++++++++++++++- setup.py | 3 +-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/owo/owo.py b/owo/owo.py index 5844a17..1b5a9ea 100644 --- a/owo/owo.py +++ b/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") diff --git a/setup.py b/setup.py index 6c4c4fd..6e69a96 100644 --- a/setup.py +++ b/setup.py @@ -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"