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

InstallUtils - A very small library for Pastebin stuff

Started by Geforce Fan, 19 March 2015 - 01:42 AM
Geforce Fan #1
Posted 19 March 2015 - 02:42 AM
Features:
  • Load an API directly from pastebin without a single fs call
  • Run something from pastebin without running the Pastebin program(not the greatest idea)
  • Download something from pastebin, again, without running the Pastebin program.
Usage:
Copy and paste this at the top of your installer. This is the easiest and recommended way.

Functions:
pasteRun(pasteID, tableOfArgs)]
pastePI(pasteID,tableForAPI) - This will load the pasteID, but all functions go into the global table of name specified. As in, you pass it 2 strings.
pasteGet(pasteID) Returns: The program, in a string
pasteGetAndSave(pasteID,fileLocation) Gets a program and writes it to a file.

So, it's a fairy simple API, 56 lines long. I wrote it because of the need for loading an API off pastebin, then decided I should just make it a general purpose installer API.
Edited on 19 March 2015 - 01:42 AM
Lupus590 #2
Posted 19 March 2015 - 08:00 AM
I was going to make one of these… I didn't think of putting it as a file header though. Nice job.
Edited on 19 March 2015 - 07:01 AM
Geforce Fan #3
Posted 19 March 2015 - 10:56 PM
I was going to make one of these… I didn't think of putting it as a file header though. Nice job.
Thanks!
I've added it to LimitlessBox v3, so it's now 25% more spaghetti because 2 functions do the same thing!