Compare commits

..

3 Commits
latest ... main

Author SHA1 Message Date
7b1d166f45 fix 2024-04-19 22:26:11 +01:00
11f48f6ffc install fix 2024-04-19 15:47:35 +01:00
6b50670fef readme 2024-04-19 15:30:32 +01:00
3 changed files with 39 additions and 4 deletions

View File

@ -1,3 +1,25 @@
# term-owo
owoify text from the terminal
owoify text from the terminal
# installation
### install from source
download the latest release [here](https://git.alfieking.dev/acetheking987/term-owo/releases) or clone the repository and run `pip install .` in downloaded folder
### install from repo
run `pip install --index-url https://git.alfieking.dev/api/packages/acetheking987/pypi/simple/ cmdline-owo` in terminal
# usage
from terminal run `owo` to owoify text
use the `-p` flag to use a pipe as input
### examples
`owo "hello world"` -> `hewwo wowwd`
`echo "hello world" | owo -p` -> `hewwo wowwd`

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'],
version = "0.2.0",
version = "0.2.3",
description = "owoify any text from the command line",
author = "Alfie King",
author_email = "acetheking987@gmail.com"