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_string, prefixes=owo.PREFIXES)
Appends a random prefix to the beginning of the string. Custom prefixes are optional and must be passed as either a list or tuple of strings.
owo.add_suffix(input_string, suffixes=owo.SUFFIXES)
Appends a random suffix to the end of the string. Custom suffixes are optional and must be passed as either a list or tuple of strings.
owo.add_affixes(input_string, 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_string, 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_string, 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.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff7cda037c83e555cbc735d36113460df3905879d96e205ca2025f65637d9f71 |
|
MD5 | 6f5a5d79aecb2762634816b83166bb0f |
|
BLAKE2b-256 | bc3966038c8951f501af61e262dc8978142e475e95accde3543d4e4f16534f85 |