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

Get code from forums

Started by faubiguy, 04 October 2012 - 03:45 AM
faubiguy #1
Posted 04 October 2012 - 05:45 AM
This is a little program I threw together that allows you to download code to your game from code blocks on the CC forums. This requires the http API to be enabled.

It can scan through any forum topic and page and lets you save the contents of any code block you want.

When you start it, it will ask you for the ID# of the topic, and the page.
The ID# is the number in the url right after /topic/. (For example, http://www.computerc...dex.php?/topic/4700-get-code-from-forums/)

After entering these it will download and scan through the page, and display the results. You can choose to save or delete any result, or exit, which deletes any unsaved results. On the results screen, to open the menu, press left-control.

If you find any bugs, let me know.

Note: The results screen can get somewhat difficult to navigate if there are many signatures with code. I may add code to remove duplicate matches. Updated, now doesn't keep duplicate code blocks.

Update: Just fixed an error with saving. Now saves properly.

Link: http://pastebin.com/Mp0h9ZJS
Edited on 04 October 2012 - 06:32 PM
jag #2
Posted 04 October 2012 - 05:52 AM
Neat!!