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

ComputerCraft Dash Docset!

Started by AmandaC, 11 June 2014 - 12:27 AM
AmandaC #1
Posted 11 June 2014 - 02:27 AM
I've spent most of today playing with this idea I had: "What if I could access the ComputerCraft docs offline, using my favourite documentation browser program?" So… I made it happen!

Introducing a ComputerCraft docset for Dash.

It's missing large swaths of the ComputerCraft APIs, however I'm out of energy to continue documenting, and decided to share this with y'all for comments and (hopefully) contributions. I've also abstracted out the dash part, to allow third parties to generate docsets for their own Lua code. (I've got this going for Project Veek, in a private branch)

You can find the source and (almost) everything needed to build the docset on it's github. To build it, you will need the ldoc lua library. As well as the lsqlite3 module ( I got both using luarocks, which in-turn I got using Homebrew) once you have that, just run the included make-docs.sh, and away you go!

I intend to distribute this in a pre-built form once it's more complete.
Update: See bottom of this post for instructions to add to Dash.

I've made this by making minimal LDoc-riddled source files for parssing by LDoc. This, along with a custom template, generates HTML in a format that looks pretty good in the Dash browser. Then, using a custom ldoc filter function, I generate the search index file for Dash to use.


But what about Windows/Linux?
Yes, yes, Dash is OS X only software, however a quick Google reveals Zeal which claims to be compatable with Dash docsets. I don't know how you'd import the docset into it, and you need a Unix-alike (or Cygwin…) to build the docset in the first place.


Obglitory Screenshot.
Term Docs

Gimme!

I've decided to go ahead and distribute the docset using Dash's Docset Feed mechanism. Please keep in mind that it's still very un-finished.

Dash Instructions
To add it to dash, bring up settings, click on the "Downloads" tab, then click on the plus button on the bottom, then enter this URL into it:
http://amanda.darkdna.net/dash/ComputerCraft.xml
Edited on 11 June 2014 - 06:52 PM
Cranium #2
Posted 11 June 2014 - 04:24 PM
This is actually a good idea, AmandaC. I think with the forum being down a few times lately, this would be nice to have an offline version of the docs.
AmandaC #3
Posted 11 June 2014 - 08:48 PM
An update!
I've decided what the hell, I'll distribute it using the docset feed mechanism now instead of at some unspecified point in the future. It is currently missing pretty much all of the os API, however it's a start. You're still welcome to contribute, and I'll continue updating the docset feed as it gets filled out.

To add it to dash, bring up settings, click on the "Downloads" tab, then click on the plus button on the bottom, then enter this URL into it:
http://amanda.darkdna.net/dash/ComputerCraft.xml
It appears that the Forums won't allow me to provide a direct link to add it right to dash, which is understandable as it's a non-standard protocol.

I'm still unsure how one would go about using this in Zeal, but if someone figures it out, I'll be happy to copy their instructions into the OP. :)/>