ono
This commit is contained in:
parent
ed8457679c
commit
70868a679c
0
owo/__init__.py
Normal file
0
owo/__init__.py
Normal file
22
owo/owo.py
Normal file
22
owo/owo.py
Normal 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
16
setup.py
Normal 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"
|
||||
)
|
Loading…
Reference in New Issue
Block a user