This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Midnightas's profile picture

Craftweb/Craftscape - A browser specification and program for an internet!

Started by Midnightas, 18 October 2016 - 11:40 AM
Midnightas #1
Posted 18 October 2016 - 01:40 PM
Craftweb
Craftweb is a series of specifications made to create a standard for browsers in ComputerCraft.. browsers.
One of these browsers is Craftscape (A reference to Netscape).
Here is the link to the Craftweb specification.

Craftscape
Craftscape is a browser that uses the CWS to browse an internet.
When opening the program, you will see a GUI similar to
this:


Here you will specify a destination computer. This is the ID of a computer that is the host.
Next it will ask you for a page, if you leave it empty, it will open "index.cw".
After that the browser will connect to the computer.
Due to the single-threaded nature of ComputerCraft, you may need to wait if there are too many connections to that server.
After you've waited, you will be greeted with a page.
Congratulations, you've connected to a page on an internet.

Now.. "an" internet? What does that mean?
Unfortunately, every server will have a different set of web pages.
This has it's own advantages and disadvantages.

Pastebin: http://pastebin.com/QSpxrJtM

Craftweb Host
Craftweb Host is a simple program that hosts Craftweb files for browsers (that follow the CWS) to receive.
By opening the program it will freeze the computer and wait for connections.
It will look like this:


Pastebin: http://pastebin.com/ifhQq6NN
クデル #2
Posted 18 October 2016 - 02:03 PM
Is this like a lesser version of KristScape, or something different?
Midnightas #3
Posted 18 October 2016 - 02:57 PM
Is this like a lesser version of KristScape, or something different?
This is different than Kristscape.
InDieTasten #4
Posted 18 October 2016 - 05:26 PM
So this implements a protocol to exchange and query for files, and craftscape is able to enrich the experience of the content of the files, due to the standardized CWS format. Unfortunately, the CWS format only implies to support <full> and <part> content, which are pretty much identical to print() and write() functions. No colors are specified. No background. No layouting for different screensizes. There is no mention of some sort of "user agent string" to determine screensize serverside.

I guess it's proof of concept kind of thing. If you keep adding functionality such as the stuff I mentioned above, this might be a nice http/html clone in computercraft :)/>

I'd suggest you to put your documentation onto some permanent storage, such as pastebin, or a gist file. Then people in the future don't need to worry about a dead link in case your server goes down for whatever reason. Just in case this takes off. You never know ;D Just some advice
Midnightas #5
Posted 18 October 2016 - 07:29 PM
So this implements a protocol to exchange and query for files, and craftscape is able to enrich the experience of the content of the files, due to the standardized CWS format. Unfortunately, the CWS format only implies to support <full> and <part> content, which are pretty much identical to print() and write() functions. No colors are specified. No background. No layouting for different screensizes. There is no mention of some sort of "user agent string" to determine screensize serverside.

I guess it's proof of concept kind of thing. If you keep adding functionality such as the stuff I mentioned above, this might be a nice http/html clone in computercraft :)/>

I'd suggest you to put your documentation onto some permanent storage, such as pastebin, or a gist file. Then people in the future don't need to worry about a dead link in case your server goes down for whatever reason. Just in case this takes off. You never know ;D Just some advice

Thank you! Yes, this is pretty much my own version of HTML.
And yes, right now it's pretty much a proof of concept. But I forgot to put in the color and bg attribute in the documentation… :|
I may will add http messages in 1.0.

:)/>