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-owoto install the package on your system. - Add
import owoto 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file text-to-owo-2.0.1.tar.gz.
File metadata
- Download URL: text-to-owo-2.0.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fdc38a1886a07604e758450c2f15004e15b6e475eb0316c2bc6d1454fba8e679
|
|
| MD5 |
1f7e5b59b89a689d12ea9b12766c9dc1
|
|
| BLAKE2b-256 |
9796b3884874b2e54083531303dd5c2ddbe169e281a795d2cc8c30cd109ec2c3
|
File details
Details for the file text_to_owo-2.0.1-py3-none-any.whl.
File metadata
- Download URL: text_to_owo-2.0.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff7cda037c83e555cbc735d36113460df3905879d96e205ca2025f65637d9f71
|
|
| MD5 |
6f5a5d79aecb2762634816b83166bb0f
|
|
| BLAKE2b-256 |
bc3966038c8951f501af61e262dc8978142e475e95accde3543d4e4f16534f85
|