A web server that runs LOLCODE
Tired of writing PHP, Python, or Javascript? Do you want to have some fun while writing your code? WebCat is the web server for you!
Webcat is powered by Justin Meza's LOLCODE interpreter lci
Webcat renders the lolcode inside .lol files
<!DOCTYPE html>
<html>
<head>
<title>LOLCODE POWRD WEBZITE!</title>
</head>
<body>
<h1>
<lolxd>
HAI 1.2
VISIBLE "HELLO VISITOR"
KTHXBYE
</lolxd>
</h1>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<title>LOLCODE POWRD WEBZITE!</title>
</head>
<body>
<h1>HELLO VISITOR</h1>
</body>
</html>
You can refer to the LOLCODE 1.2 language spec here
- You must have lci installed on your system and be able to run it globally from the command line
- python 3.x (It must be python 3.x since WebCat runs using http.server which is not supported in python 2.x)
- Clone this repository
- Go into the WebCat folder
- Run webcat.py with either
python webcat.py
if you set up python3 correctly on windows orpython3 webcat.py
on linux. You should see the server starting up in your command line - Go to localhost:8000 on your web browser, if everything is working you should see a webpage
- Put your files in the LOLCODE directory where webcat is installed, make sure they have the .lol extension even if they don't contain any LOLCODE. Eventually WebCat will support serving plain HTML files
- You should have an index.lol file which is served as the home page
Any other file you add can be accesed by going to localhost:8000/filename (do not put .lol at the end or it won't work)
For example if you have a file named admin.lol you can access it by going to localhost:8000/admin on your browser.
I've spent a total of maybe 3 hours on this so far so a lot of features might not be there. However I have some features I plan to add whenever I have the inspiration to work on this in order to make it a little more robust, even though it will never be used in a serious manner. Some of these features are:
- Handling POST data
- Saving to files (Would require some modification to the interpreter) If you want to help add these features just submit a pull request! I would love some help!
If you want to contribute make sure to submit a pull request if you want to help me make a little part of the web powered by LOLCODE. Also, I will be writing a detailed description of the inner workings of WebCat in the developer wiki so it's easier to understand and contribute to the project so make sure to check that out.