- Python 99.2%
- Shell 0.8%
| install.sh | fixed everything | |
| main.py | fixed semicolon behaviour | |
| readme.md | Update 'readme.md' | |
| test.owo | fixed everything | |
| test2.owo | fixed everything | |
Pythowo - The cuwute pwogwamming language
Table of contents
Logo
Installation
- Requires python 3.8 or highier
- Run
sudo ./install.shthat will create the proper file in /usr/bin - You're all done!
Usage
- To run a script, type
pythowo <file.owo> [flags] - Run
pythowo -hfor further information
How to code in Pythowo
This language is fully python compatible. This means that you can run python scripts with pythowo, as long as you disable Profanity Error (so you can use the letter 'r') with --swear.
However, it hase some features of its own.
Comments
Any line containing the sequence UwU will be turned into a comment
Example:
This line woun't be evalUwUated
Syntax
It's generally the python one, except you can use
(。・ω・。)ノ♡instead of;uwuinstead ofuowoinstead ofowinstead ofr^wto use awand not anrin the output
(the last two work for caps as wellW->Rand^W->W)
and you cannot use r or R.
Also some statements got uwuified:
variable declaration/assignation: please set <name> to <value>
that can be chained like so: please set <name1> to <name2> to <value> assigning <value> to both variable
functions: here's some fUwUncitons
task myFunction(arg1, arg2:type, *args, keyword1=defaultvalue1, **kwargs): -> type
...
wetuwn <return code>
(task is a deltarune chapter 2 reference btw)
and classes:
kitty MyClass:
task __init__(self, ...):
...
...
Interpreter
once you have installed pythowo, you can add #! /bin/pythowo at the start of the file, then run chmod +x <filename> to make it executable as
./<filename>, using automatically pythowo as "interpreter".
With that said, is preferrable during development to run your script with pythowo <filename>, so you can use arguments while you code.
Contributing
There's plenty more to uwuify, feel free to share suggestions or implement them yourself and pull request!
Where to look in main.py
The first few lines are initialization and we can safely ignore them.
- Lines 27 to 89 are the configuration and the core of the language. You will most likely want to change stuff there.
- You may also wanna have a look at lines 111 to 134
Understanding the transpiling process
The program will modify the .owo file into a python script. It will achieve this by firstly doing a bunch of find+replace, as indicated by replace_deez_nuts dictionary, IN ORDER, example
impowowt wandowom
would first replace owo into o, then the remaining ws into rs, generating the following python code
import random
then by applying some more changes that are hard coded and not in the config part.