This commit is contained in:
alfie 2024-04-19 13:36:57 +01:00
parent ed8457679c
commit 70868a679c
3 changed files with 38 additions and 0 deletions

0
owo/__init__.py Normal file
View File

22
owo/owo.py Normal file
View File

@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
from pyowo import owo
import argparse, sys
def main():
parser = argparse.ArgumentParser("owo")
parser.add_argument("-p", "--pipe", help="pipe text to owoify", action="store_true")
parser.add_argument("text", help="owoify any text", type=str, nargs="?")
args = parser.parse_args()
if args.pipe:
for line in sys.stdin:
print(owo(line), end="")
elif args.text:
print(owo(args.text))
else:
print(owo("No text provided"))
parser.print_help()
if __name__ == "__main__":
main()

16
setup.py Normal file
View File

@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
from setuptools import setup
setup(
name = "cmdline-owo",
packages = ["owo"],
entry_points = {
"console_scripts": ['owo = owo.owo:main']
},
install_requires=['pyowo'],
version = "0.2.0",
description = "owoify any text from the command line",
author = "Alfie King",
author_email = "acetheking987@gmail.com"
)