Skip to content

javif89/webcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WebCat

A web server that runs LOLCODE

About

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

What does WebCat do?

Webcat renders the lolcode inside .lol files

You write your regular HTML and put your code between the <lolxd> tags like this

<!DOCTYPE html>
<html>
<head>
	<title>LOLCODE POWRD WEBZITE!</title>
</head>
<body>
    <h1>
	    <lolxd>
	      HAI 1.2
	      VISIBLE "HELLO VISITOR"
	      KTHXBYE
	    </lolxd>
    </h1>
</body>
</html>

Result

<!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

Installing

There are only two requirements to run WebCat

  • 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)

After you have those you can just follow these steps

  • Clone this repository
  • Go into the WebCat folder
  • Run webcat.py with either python webcat.py if you set up python3 correctly on windows or python3 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

Using WebCat

  • 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.

WebCat is still in a very early stage

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!

Contributing

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.

Releases

No releases published

Packages

No packages published