![]() |
Sneak Peak: GDoc
This is something I've been planning for awhile now, and finally have been able to start in the past few days.
GDoc is an automatic documentation generator for GS2. You plug in some GS2 code (with docs in it), and it'll dump out a formatted webpage. Eventually, I want to make it so you can dump in your whole server and get back all your scripts documented. For now, it only works on a single script. For example, this is the output you get: http://althack.org/gdoc.html From this script: http://althack.org/source.txt The syntax I use inside the "documentation blocks" is the same as PHPDoc and JavaDoc, so should be familiar to anyone who uses either of those languages. Whenever I finish this I'll write an article on how to write GS2 documentation. When I extend this to support a serverfull worth of scripts, it will have navigation on the side, and scripts will be separated into npcs/weapons/classes categories. I'd really like to have some support for showing what classes a script is joined to, but it'd be pretty annoying since it'd involve some heavy GS2 parsing. One possibility is to let the scripter write what classes are joined in comments, but I doubt that'd be updated regularly so I probably won't go that route. The styling I'm using will likely change in the future, but if there is anything that you'd like to see changed I'm definitely interested. The code that does this GS2->Doc translation is written in Haskell (a programming language). I'll put it on github eventually, just haven't gotten around to it. Right now, I have plans to:
This post is basically a request for feedback/comments so let it rip. |
WhiteDragon is attempting to put all GS2 scripters out of business. RUN FOR THE HILLS!
|
Quote:
Edit: Oh, and this may very well be part of my grand scheme to provide script packages along with docs and other resources / conquer the world. :pluffy: |
Quote:
|
Quote:
|
Nice :) I will probably use it.
|
Nice work. Someone should take the code you make once you've finished it and generate documentation for some commonly-used objects (TServerPlayer, GuiControl (and children), etc) and upload it somewhere. It would be a valuable resource for new scripters and experienced scripters. I might have a crack at it if no one else does.
EDIT: What are you using for syntax highlighting of the source code? I can provide you with the GeSHi rules I use on my pastebin site if that would be at all helpful to you (example) — even if you're not using GeSHi, you might find the color definitions helpful. |
I often have trouble finding proper (any) documentation. I'm sure many people do. This seems like it would be very useful. Well done. :)
|
Quote:
And yeah, if you want to do something like this it'd be super cool. It'd also in general be nice to have someone making docs to see if there are any sudden feature requests and stuff. I'm hoping that I'll maybe release a version of GDoc within a couple days. Quote:
If you want to send your file my way that'd definitely be helpful so I can see the various tokens you've defined and such. |
1 Attachment(s)
Quote:
|
I can see it now, gscript site akin to github and sourceforge, and the ability to pull scripts from rc to your server from it. o.O along with documentation
|
Quote:
Quote:
|
Here is the Haskell source: https://github.com/whitedragon/gdoc. Not really useful if you don't know how to read/run Haskell code but just in case anyone does (afaik only Loriel does).
Updates this weekend probably, can just watch that repo if you are very interested. |
The syntax looks mean.
|
+rep enjoy ur massive boost
|
very nice
|
| All times are GMT +2. The time now is 06:48 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.