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

[Dont Flame Me Please :P] Have a Alternative to Pastebin

Started by Divide_By_0, 07 March 2013 - 02:00 PM
Divide_By_0 #1
Posted 07 March 2013 - 03:00 PM
Is there another simple Code system out there, similar to pastebin, if so, maybe making a Alternative Pastebin Ingame for the users who cant use it, dont want to use it, just dont like it or if pastebin is down, it makes a good alternative.
Also im thinking that pastebin WOULD STAY, But have a alternative.
ChunLing #2
Posted 07 March 2013 - 03:07 PM
There are such programs, if you'll search by the keyword of the particular service you want to use you may find one for your preferred alternative. It also isn't too hard to write such a program, if the service is approximately equivalent to pastebin in function.
SuicidalSTDz #3
Posted 07 March 2013 - 03:28 PM
Why would we need an alternative to pastebin? Why should there be an alternative? Is pastebin not good enough? (No flaming intended) If you want an alternative, like ChunLing said, write your own program to paste code to a website using the HTTP Api. If you are not familiar with the HTTP Api, then "look" at CC's Pastebin code and get an understanding of how it works. (I would upload the code to pastebin, however, they are under a heavy load right now :(/>) If the driving force behind your arguement is the fact pastebin is down right now, then shame on you. Pastebin is rarely down and should not be shunned for being popular.

Solution: Wait for pastebin to go back online (Patience is a virtue, one which most do not have)

EDIT: I am sorry if you felt a "flaming" mood in my text's tone
JJRcop #4
Posted 07 March 2013 - 03:46 PM
I'll just leave this here:

url, path = {...}[1], {...}[2]
request = http.get(tostring(url))
file = fs.open(path, "w")
file.write(request.readAll())
file.close()
Coded on the fly!
Dlcruz129 #5
Posted 07 March 2013 - 06:17 PM
As stated above, this is already possible. Learn how to use the http API.
Cranium #6
Posted 08 March 2013 - 04:31 AM
Since this is something you can code yourself(and an example was provided to you), I will just close this topic now.

EDIT: The http API can read plain text from any url. Wheter that be from dropbox, pastebin, github, bitbucket, etc. Take a look at other hosting sites and make a downloader.