Skip to content

Commit

Permalink
make cawwabwe fwom the command winye
Browse files Browse the repository at this point in the history
  • Loading branch information
DerpyChap committed Mar 29, 2020
1 parent 0fd50b5 commit 134ac2c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__pycache__/
*.egg-info/
17 changes: 10 additions & 7 deletions owotext/owo.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,17 @@ def whatsthis(self, text: str):
text = text.replace(key, value)
return random.choice(self.prefixes) + text + random.choice(suffixes)

if __name__ == '__main__':
parser = argparse.ArgumentParser(
def main(args=None):
parser = argparse.ArgumentParser(
description='A Python library for converting text strings into OwO',
epilog='https://github.com/DerpyChap/owotext')

parser.add_argument('text', type=str, nargs='+', help='The text to OwO')
parser.add_argument('text', type=str, nargs='+', help='The text to OwO')

args = parser.parse_args()
o = OwO()
text = ' '.join(args.text)
print(o.whatsthis(text))

args = parser.parse_args()
o = OwO()
text = ' '.join(args.text)
print(o.whatsthis(text))
if __name__ == '__main__':
main()
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ def readme():
license='MIT',
packages=['owotext'],
include_package_data=True,
zip_safe=False)
zip_safe=False,
entry_points={
'console_scripts': [
'owo = owotext.owo:main'
]
})

0 comments on commit 134ac2c

Please sign in to comment.