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(str, prefixes=owo.PREFIXES)
Appends a random prefix to the beginning and end of the string. Custom prefixes are optional and must be passed as an iterable.
owo.add_suffix(str, suffixes=owo.SUFFIXES)
Appends a random suffix to the beginning and end of the string. Custom suffixes are optional and must be passed as an iterable.
owo.add_affixes(str, 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 iterables.
owo.substitute(str, 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(str, 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.
If you pass in variables with the wrong data types I have no idea what will happen so don't do that.
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-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70adce17f3c95001162d3eb92f27df322fc035fb40d5de0d9932d46ee68fc4fe |
|
MD5 | 3e1e7fafbc8fd29d1e29c4a6a5fb86f5 |
|
BLAKE2b-256 | 24387c3dcfa6c49de1dfcdd754d8f8c199ec12841e9afc22c14a4e7d519f6040 |