Posted 03 June 2013 - 08:36 PM
Programs Chat System APIS TODO:
Spoiler
SitdownSpoiler
Multi file downloader It can download an entire directory structure from an HTTP server with one command. Pastebin: pastebin get 3tqG4Vg8 sitdown Instructions:Spoiler
- Create files list
Spoiler
Sitdown uses a .files file to determine what files it need to download. Each line in it represents a file or directory. If it's a directory the the directory has to have .files file in it. You can generate one by running "sitdown sit test" replacing test with what directory you want to generate the files list for. It will generate a files list in the directory listing all the files in the directory. - Upload directory to server
- Download
Spoiler
Run "sitdown down http://example.com example". Replace example.com with where the directory is located on the server and example with were to download it to. If you don't specify were to download it to it will attempt to figure it out. Eg: "sitdown down http://coderpuppy.ko...om/sitdown-test" would download to "sitdown-test"
Spoiler
Better chat for ComputerCraft, features include colors (using text escapes) and bot support Server: Pastebin: pastebin get 4s5XemYx chatd Gist: 10176291 Client: Requires the chatbot API and my textEscapes API Pastebin: pastebin get dgJadwuS chatc Gist: 10176089 Chat Bot API: Pastebin: pastebin get iw3J1Fgg chatbot Gist: 10158696 API:Spoiler
- createBot(hostname, username) – Create a bot and connect to a server. Bot:
Spoiler
- id – Random identifier, hopefully unique to the bot
- handle(ev) – Handle an event (ev must be in the form { event name, event parameters… })
- send(msg) – Send a message
- logout(reason = 'Quit') – Logout with an optional reason
- bot_user_message – Fired when anyone says anything, params: bot.id, username, msg, userid
- bot_user_action – Fired when anyone uses /me, params: bot.id, username, action, userid
- bot_user_nickchange – Fired when anyone changes their nick, params: bot.id, oldusername, newusername, userid
- bot_user_join – Fired when anyone joins, params: bot.id, username, userid
- bot_user_leave – Fired when anyone says leaves, params: bot.id, username, reason, userid
- bot_user_action – Fired when anyone says anything, params: bot.id, username, action, userid
- bot_quit – Fired when the bot disconnects for any reason, params: bot.id, reason
Spoiler
Spoiler
Text EscapesSpoiler
textEscapes lets you print strings with escape codes to, for example, change the text color in the middle of a string. Pastebin: pastebin get F7hL1ite textEscapes Gist: 9906482 Examples: -- Print "Hello World!" in lime textEscapes.print(textEscapes.textLime .. "Hello World!" .. textEscapes.textWhite) -- Print "HI!!!" in grey with a yellow background textEscapes.print(textEscapes.textGrey .. textEscapes.backYellow .. "HI!!!" .. textEscapes.reset)
API: Spoiler
- write(text, opts) – Like normal write except uses' escapes, Options:
Spoiler
- textColor – Whether text color escapes work
- backColor – Whether background color escapes work
- moveCursor – Whether cursor escapes work
- scroll – Whether scroll escapes work
- blink – Whether blink escapes work
- clear – Whether clear escapes work
- clearLine – Whether clearLine escapes work
- print(text, opts) – Like normal print except uses' escapes
- text`Color` – Escape code for changing the text color to `color`
- back`Color` – Escape code for changing the background color to `color`
- reset – Escape code for changing the text color to white and the background color to black
- clear – Escape code for clearing the screen
- clearLine – Escape code for clearing the line (see term.clearLine)
- blinkOn – Escape code for turning blink on
- blinkOff – Escape code for turning blink off
- textColor(color) – Get the escape code for changing the text color to `color`
- backColor(color) – Get the escape code for changing the background color to `color`
- moveCursor(x, y) – Get the escape code for moving the cursor to `x`, `y`
- scroll(n) – Get the escape code for scrolling `n` rows
- hexColor(color) – Get `color` in hexadecimal
- Documentation
- Drop-in single file config function – Saves the config in the same file
Edited on 20 January 2016 - 05:14 AM