speedtest-cli aktualisiert

This commit is contained in:
Akamaru 2016-12-16 19:00:42 +01:00
parent cddb7e03ab
commit d7279386c2
2 changed files with 4 additions and 9 deletions

View File

@ -28,9 +28,9 @@ Falls du Ubuntu oder Debian verwendest, kannst du einfach `./install-dependencie
Diese Pakete werden für `flip-text.lua`, `shell.lua`, `speedtest_cli.lua` und `youtube_dl.lua` benötigt.
* `sudo apt-get install -y cowsay scrot fswebcam vnstat vnstati youtube-dl npm`
* `sudo npm install -g flip-text`
* `wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py`
* `chmod +x speedtest-cli`
* `sudo mv speedtest-cli /usr/local/bin/speedtest-cli`
* `wget -O speedtest https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest.py`
* `chmod +x speedtest`
* `sudo mv speedtest /usr/local/bin/speedtest`
Für eine manuelle Installation musst du LuaRocks für 5.2 [selbst kompilieren](http://stackoverflow.com/a/20359102).

View File

@ -1,8 +1,3 @@
--[[Requires speedtest-cli (https://github.com/sivel/speedtest-cli)
$ wget -O speedtest-cli https://raw.github.com/sivel/speedtest-cli/master/speedtest_cli.py
$ chmod +x speedtest-cli
$ sudo mv speedtest-cli /usr/local/bin/speedtest-cli
]]
local speedtest_cli = {}
function speedtest_cli:init(config)
@ -11,7 +6,7 @@ end
function speedtest_cli:action(msg, config)
utilities.send_typing(msg.chat.id, 'typing')
local result = run_command('speedtest-cli --share')
local result = run_command('speedtest --share')
local url = result:match("Share results: (.*)")
print('URL: '..url)
local text = 'http://www.speedtest.net/my-result/'..url:match('http://www.speedtest.net/result/(.*).png')