Translates normal text into OwO speak. Port from Zuzak's javascript version
Project description
OwO
Yet another owoifier. This specific one is a port of @zuzak's JavaScript OWO into Python, because we needed this to be in even more languages.
Install
- Run the command
pip install text-to-owo
to install the package on your system. - Add
import owo
to the beginning of your script.
Usage
Constants
owo.PREFIXES
Tuple containing default prefixes
owo.SUFFIXES
Tuple containing default suffixes
owo.SUBSTITUTIONS
Dict containing default substitutions
Functions
owo.add_prefix(input, prefixes=owo.PREFIXES)
Appends a random prefix to the beginning and end of the string. Custom prefixes are optional and must be passed as either a list or tuple of strings.
owo.add_suffix(input, suffixes=owo.SUFFIXES)
Appends a random suffix to the beginning and end of the string. Custom suffixes are optional and must be passed as either a list or tuple of strings.
owo.add_affixes(input, prefixes=owo.PREFIXES, suffixes=owo.SUFFIXES)
Appends a random prefix and suffix to the beginning and end of the string. Custom prefixes and suffixes are optional and must be passed as either a list or tuple of strings.
owo.substitute(input, substitutions=owo.SUBSTITUTIONS)
Turns the text into owo speak without adding any prefixes or suffixes.
Custom substitutions are optional and must be passed as dictionary in the form {"key":"replacement"}
.
owo.owo(input, prefixes=owo.PREFIXES, suffixes=owo.SUFFIXES, substitutions=owo.SUBSTITUTIONS)
Both substitutes and adds prefixes and suffixes. Optional prefixes, suffixes, and substitutions are the same as in other methods.
For all optional arguments the given iterable/dict will replace the default values, not add to them.
All functions take a single string as input and output a string.
Example
import owo
print(owo.owo("I have no mouth and I must scream"))
# HIIII! I haz nu mouth and I must scweam XDDD
print(owo.substitute("I have no mouth and I must scream"))
# I haz nu mouth and I must scweam
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for text_to_owo-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 520d6fca5edfdebc697a1b3746fee0df853301b1b0e08db837a5528ed1c90ced |
|
MD5 | 42685d671c833fe2705d87b984e5f415 |
|
BLAKE2b-256 | 94b68ed7fe2a2dd307d15e2d1cb1ee379b11219eed799c2fbbe4ed30a3b2d076 |