SHOW:
|
|
- or go back to the newest paste.
| 1 | local mon = peripheral.wrap("right") -- Sélectionez le coté de votre écran :3
| |
| 2 | term.redirect(mon) | |
| 3 | os.loadAPI("json")
| |
| 4 | term.clear() | |
| 5 | term.setTextColor(colors.gray) | |
| 6 | - | print("Twitter minsto")
|
| 6 | + | print("Twitter minsto)
|
| 7 | term.setCursorPos(3,1) | |
| 8 | Incr = 0 | |
| 9 | - | |
| 9 | + | |
| 10 | - | |
| 10 | + | |
| 11 | while true do | |
| 12 | - | |
| 12 | + | |
| 13 | - | local contenu = http.get("http://goofyplace.org/Black/twitter/request.php?user=FeedThePatrick")
|
| 13 | + | local contenu = http.get("http://theo33500.tech/toath/twitteroauth/test.php")
|
| 14 | - | --Ici changer Bl4ckWare par le pseudo a surveiller. |
| 14 | + | --Ici changer Bill par le pseudo a surveiller. |
| 15 | local data = contenu.readAll() | |
| 16 | - | |
| 16 | + | |
| 17 | decode = json.decode(data) | |
| 18 | i = 10 | |
| 19 | ii = 0 | |
| 20 | - | |
| 20 | + | |
| 21 | while ii <= 10 do | |
| 22 | if decode.statuses[i] ~= null then | |
| 23 | - | local text = decode.statuses[i].text |
| 23 | + | local text = decode.statuses[i].text |
| 24 | - | text = text:gsub("u00e9","e")
|
| 24 | + | text = text:gsub("u00e9","e")
|
| 25 | - | text = text:gsub("u00e0","a")
|
| 25 | + | text = text:gsub("u00e0","a")
|
| 26 | - | text = text:gsub("u00a0"," ")
|
| 26 | + | text = text:gsub("u00a0"," ")
|
| 27 | local from = decode.statuses[i].user.name | |
| 28 | local long = string.len(from) | |
| 29 | local I = 74 - long | |
| 30 | - | |
| 30 | + | |
| 31 | if Incr==0 then | |
| 32 | color = colors.white | |
| 33 | elseif Incr == 1 then | |
| 34 | color = colors.orange | |
| 35 | elseif Incr == 2 then | |
| 36 | color = colors.magenta | |
| 37 | elseif Incr == 3 then | |
| 38 | color = colors.yellow | |
| 39 | elseif Incr == 4 then | |
| 40 | color = colors.lime | |
| 41 | elseif Incr == 5 then | |
| 42 | color = colors.pink | |
| 43 | elseif Incr == 6 then | |
| 44 | color = colors.gray | |
| 45 | elseif Incr == 7 then | |
| 46 | color = colors.cyan | |
| 47 | elseif Incr == 8 then | |
| 48 | color = colors.purple | |
| 49 | elseif Incr == 9 then | |
| 50 | color = colors.blue | |
| 51 | elseif Incr == 10 then | |
| 52 | color = colors.brown | |
| 53 | elseif Incr == 11 then | |
| 54 | color = colors.green | |
| 55 | else | |
| 56 | Incr = 0 | |
| 57 | end | |
| 58 | - | |
| 58 | + | |
| 59 | - | |
| 59 | + | |
| 60 | - | Incr = Incr + 1 |
| 60 | + | Incr = Incr + 1 |
| 61 | - | term.setTextColor(color) |
| 61 | + | term.setTextColor(color) |
| 62 | - | print("----------------------------------------------------------------------------------")
|
| 62 | + | print("----------------------------------------------------------------------------------")
|
| 63 | print("\n "..text)
| |
| 64 | write("\n from : " ..from)
| |
| 65 | while I > 0 do | |
| 66 | - | write("-")
|
| 66 | + | write("-")
|
| 67 | - | I = I - 1 |
| 67 | + | I = I - 1 |
| 68 | end | |
| 69 | print("\n ")
| |
| 70 | end | |
| 71 | - | |
| 71 | + | |
| 72 | i = i - 1 | |
| 73 | ii = ii + 1 | |
| 74 | sleep(0.1) | |
| 75 | end | |
| 76 | - | |
| 76 | + | |
| 77 | sleep(60) | |
| 78 | end |