1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-09-20 14:27:40 +03:00

feat: Add speedtest package

This commit is contained in:
Florian / Fkeloks 2019-03-09 18:20:35 +01:00
parent aff32be78e
commit 09ad43406d
15 changed files with 2020 additions and 0 deletions

View File

@ -0,0 +1,36 @@
# SpeedTest Package
The SpeedTest package will give you information about your network speed
* Ping
* Download speed
* Speed Upload)
Based on the package https://github.com/sivel/speedtest-cli
## Modules
### Speedtest
#### Usage
**en-US**:
```
(en-US) "What is my current Internet speed?"
(en-US) "Can you make me a speedtest?"
(en-US) "Made a speedtest"
(en-US) "Start a speed test"
(en-US) "Is my internet network good?"
(en-US) "Is my internet connection good?"
...
```
**fr-FR**:
```
(fr-FR) "Quelle est ma vitesse Internet actuelle?"
(fr-FR) "Peux-tu me faire un speedtest ?"
(fr-FR) "Fait un speedtest"
(fr-FR) "Lance moi un test de vitesse"
(fr-FR) "Mon réseau internet est-il bon ?"
(fr-FR) "Ma connexion internet est-elle bonne ?"
...
```

View File

View File

View File

@ -0,0 +1,5 @@
{
"speedtest": {
"options": {}
}
}

View File

View File

View File

@ -0,0 +1,13 @@
{
"speedtest": {
"start": [
"Well, I start the analysis. The results of the test will be given to you in a few moments..."
],
"end": [
"Analysis completed. Here are your results:"
],
"error": [
"Ooh, an error occurred during my research... Sorry, but I can not analyze your network."
]
}
}

View File

@ -0,0 +1,14 @@
{
"speedtest": {
"start": [
"Bien, je démarre l'analyse.\nLes résultats du test vous seront donnés dans quelques instants...",
"Je démarre l'analyse de votre vitesse réseau.\nLes résultats du test vous seront donnés dans quelques instants..."
],
"end": [
"Analyse terminée. Voici vos résultats :"
],
"error": [
"Mince, une erreur est survenue durant mes recherches... Désolé, mais je ne parviens pas à analyser votre réseau."
]
}
}

View File

View File

@ -0,0 +1,10 @@
{
"speedtest": [
"What is my current Internet speed?",
"Can you make me a speedtest?",
"Made a speedtest",
"Start a speed test",
"Is my internet network good?",
"Is my internet connection good?"
]
}

View File

@ -0,0 +1,10 @@
{
"speedtest": [
"Quelle est ma vitesse Internet actuelle?",
"Peux-tu me faire un speedtest ?",
"Fait un speedtest",
"Lance moi un test de vitesse",
"Mon réseau internet est-il bon ?",
"Ma connexion internet est-elle bonne ?"
]
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,36 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
# The SpeedTest package will give you information about your network speed
# Author: Florian Bouché
# Date: 2019-03-09
# Based on the package https://github.com/sivel/speedtest-cli
import utils
import os
import sys
import subprocess
def speedtest(string):
"""The SpeedTest package will give you information about your network speed """
utils.output('inter', 'start', utils.translate('start'))
realpath = os.path.dirname(os.path.realpath(__file__))
process = subprocess.Popen(
[sys.executable, realpath + '\speedtest.lib.py', '--simple'],
shell=True,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT
)
(output, err) = process.communicate()
p_status = process.wait()
if err:
utils.output('end', 'error', utils.translate('error'))
utils.output('inter', 'end', utils.translate('end'))
return utils.output('end', 'test', output.decode('utf-8'))

View File

@ -0,0 +1 @@
1.0.0