Skip to content

Commit

Permalink
Merge pull request #287 from YantCaccia/master
Browse files Browse the repository at this point in the history
first attempt to add InsertText intent
  • Loading branch information
m0ngr31 authored Oct 28, 2020
2 parents b57bb76 + 38c79d1 commit 7cec59f
Show file tree
Hide file tree
Showing 18 changed files with 67 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Most everything you can do with a remote or keyboard is supported in the skill,
- Shutdown/reboot/sleep/hibernate system
- Toggle fullscreen
- Eject media
- Send text

Instead of providing the exact verbiage here for each command, we strive to make the experience as natural as we can. Simply try asking for what you want in a way that feels _right_ to you. If a particular phrase doesn't work and you think it should, see [Getting Help](#getting-help) to notify us and we will see what we can do to accommodate the phrase you prefer.

Expand Down Expand Up @@ -95,6 +96,7 @@ I would like to thank and name all the contributors who have donated their preci
- [mcl22](https://github.com/mcl22)
- [nemik](https://github.com/nemik)
- [ruben0909](https://github.com/ruben0909)
- [YantCaccia](https://github.com/YantCaccia)

## Donate
[![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/lexigram)
Expand Down
8 changes: 8 additions & 0 deletions alexa.py
Original file line number Diff line number Diff line change
Expand Up @@ -2932,5 +2932,13 @@ def alexa_launch():
def session_ended():
return "{}", 200

@ask.intent('InsertText')
@preflight_check
def alexa_insert_text(kodi, someText):
card_title = render_template('sending_text', textToBeSent=someText).encode('utf-8')
log.info(card_title)
kodi.SendText(someText)
return statement('').simple_card(card_title, '')


# End of intent methods
9 changes: 9 additions & 0 deletions speech_assets/IntentSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,15 @@
"type": "SHOWS"
}
]
},
{
"intent": "InsertText",
"slots": [
{
"name": "someText",
"type": "AMAZON.SearchQuery"
}
]
}
]
}
2 changes: 2 additions & 0 deletions speech_assets/SampleUtterances.de.txt
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ Hibernate system ruhezustand
Hibernate system tiefschlaf
Hibernate tiefschlaf
Home startseite
InsertText schreibst {someText}
InsertText eingeben {someText}
Info info
Info info dialog
Info info fenster
Expand Down
2 changes: 2 additions & 0 deletions speech_assets/SampleUtterances.en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ Info show info window
Info show information
Info show information dialog
Info show information window
InsertText write {someText}
InsertText insert {someText}
Left go left
Left left
Left navigate left
Expand Down
2 changes: 2 additions & 0 deletions speech_assets/SampleUtterances.es.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ Info ver el dialogo de info
Info ver el dialogo de informacion
Info ver la ventana de info
Info ver la ventana de informacion
InsertText escribes {someText}
InsertText insertar {someText}
Left ir izquierda
Left izquierda
Left navegar izquierda
Expand Down
2 changes: 2 additions & 0 deletions speech_assets/SampleUtterances.fr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ Info ouvre la fenêtre d' info
Info ouvre la fenêtre d' informations
Info ouvre le dialogue d' info
Info ouvre le dialogue d' informations
InsertText ecrivez {someText}
InsertText entrez {someText}
Left gauche
Left va à gauche
ListenToAlbum joue l'album {Album}
Expand Down
13 changes: 13 additions & 0 deletions speech_assets/SampleUtterances.it.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
AMAZON.HelpIntent cosa posso chiederti
AMAZON.HelpIntent cosa puoi fare
AMAZON.HelpIntent cose da provare
AMAZON.StopIntent stop
AMAZON.StopIntent interrompi
AddonExecute apri add on {Addon}
AddonExecute apri addon {Addon}
AddonExecute apri il plug in {Addon}
Expand Down Expand Up @@ -244,6 +246,10 @@ Info visualizza info
Info visualizza informazioni
Info visualizza la finestra info
Info visualizza la finestra informazioni
InsertText scrivi {someText}
InsertText inserisci {someText}
InsertText di scrivere {someText}
InsertText di inserire {someText}
Left a sinistra
Left alla sinistra
Left naviga a sinistra
Expand Down Expand Up @@ -908,6 +914,8 @@ Mute muto
Mute setta muto
Mute setta sonoro
Mute sonoro
Mute metti il muto
Mute inserisci il muto
PageDown a livello giù
PageDown a livello inferiore
PageDown a pagina giù
Expand Down Expand Up @@ -3009,6 +3017,9 @@ VolumeDown abbassa volume
VolumeDown diminuisci il volume
VolumeDown diminuisci volume
VolumeDown volume giù
VolumeDown voce giù
VolumeDown abbassa la voce
VolumeDown diminuisci la voce
VolumeSet il volume a {Volume}
VolumeSet il volume {Volume}
VolumeSet imposta il volume a {Volume}
Expand All @@ -3035,9 +3046,11 @@ VolumeSetPct volume a {Volume} per cento
VolumeSetPct volume {Volume} per cento
VolumeUp alza il volume
VolumeUp alza volume
VolumeUp alza la voce
VolumeUp aumenta il volume
VolumeUp aumenta volume
VolumeUp volume su
VolumeUp voce su
WatchEpisode guarda episodio {Episode} della stagione {Season} di {Show}
WatchEpisode guarda episodio {Episode} serie {Season} di {Show}
WatchEpisode guarda episodio {Episode} stagione {Season} di {Show}
Expand Down
2 changes: 2 additions & 0 deletions templates.de.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ remaining_min: "Es ist noch eine Minute übrig"

remaining_time: ", und die Wiedergabe wird um {{ end_time }} enden"

sending_text: "Senden {{ textToBeSent }}"


############################
## General Templates ##
Expand Down
2 changes: 2 additions & 0 deletions templates.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ remaining_min: "There is one minute remaining"

remaining_time: ", and it will end at {{ end_time }}"

sending_text: "Sending {{ textToBeSent }}"


############################
## General Templates ##
Expand Down
2 changes: 2 additions & 0 deletions templates.es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ remaining_min: "Queda un minuto"

remaining_time: ", y acabará a las {{ end_time }}"

sending_text: "Enviando {{ textToBeSent }}"


############################
## General Templates ##
Expand Down
2 changes: 2 additions & 0 deletions templates.fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ remaining_min: "Il reste une minute"

remaining_time: ", et se terminera à {{ end_time }}"

sending_text: "Envoi {{ textToBeSent }}"


############################
## General Templates ##
Expand Down
2 changes: 2 additions & 0 deletions templates.it.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ remaining_min: "Manca un minuto"

remaining_time: ", e terminerà alle {{ end_time }}"

sending_text: "Sto inviando {{ textToBeSent }}"


############################
## General Templates ##
Expand Down
2 changes: 2 additions & 0 deletions utterances.de.txt
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,5 @@ AddonGlobalSearch (suche/suche nach/finde) {Artist}

AMAZON.HelpIntent (/nach) was ich es fragen kann
AMAZON.HelpIntent was es (/alles) kann

InsertText (schreibst/eingeben) {someText}
2 changes: 2 additions & 0 deletions utterances.en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -275,3 +275,5 @@ AddonGlobalSearch (find/search for) {Artist}

AMAZON.HelpIntent what can (you do/i ask you)
AMAZON.HelpIntent things to try

InsertText (write/insert) {someText}
4 changes: 3 additions & 1 deletion utterances.es.txt
Original file line number Diff line number Diff line change
Expand Up @@ -276,4 +276,6 @@ AddonGlobalSearch (encontrar/buscar) {Album}
AddonGlobalSearch (encontrar/buscar) {Artist}

AMAZON.HelpIntent que puedes hacer
AMAZON.HelpIntent cosas que probar
AMAZON.HelpIntent cosas que probar

InsertText (escribes/insertas) {someText}
2 changes: 2 additions & 0 deletions utterances.fr.txt
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,5 @@ AddonGlobalSearch (cherche/recherche) {Artist}
AMAZON.HelpIntent (que puis-je/qu'est-ce que je peux) te demander
AMAZON.HelpIntent (que peux-tu/qu'est-ce que tu peux) faire
AMAZON.HelpIntent choses à essayer

InsertText (entrez/ecrivez) {someText}
9 changes: 8 additions & 1 deletion utterances.it.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ Fullscreen (/cambia) (pieno schermo/schermo pieno/visualizzazione)
StereoscopicMode (/cambia) modalità (stereoscopica/tre d.)

AudioPassthrough cambia audio (passthrough/digitale)
Mute (/imposta/setta) (muto/sonoro)
Mute (/imposta/setta/metti/inserisci) (muto/sonoro)
VolumeUp (alza/aumenta) (/il) volume
VolumeUp (alza/aumenta) (/la) voce
VolumeUp volume su
VolumeDown (abbassa/diminuisci) (/il) volume
VolumeDown (abbassa/diminuisci) (la) voce
VolumeDown volume giù
VolumeSet (/setta/imposta) (/il) volume (/a) {Volume}
VolumeSetPct (/setta/imposta) (/il) volume (/a) {Volume} per cento
Expand Down Expand Up @@ -268,3 +270,8 @@ AddonGlobalSearch (trova/cerca) {Artist}

AMAZON.HelpIntent cosa (puoi fare/posso chiederti)
AMAZON.HelpIntent cose da provare

AMAZON.StopIntent (stop/interrompi)

InsertText (scrivi/inserisci) {someText}
InsertText di (scrivere/inserire) {someText}

0 comments on commit 7cec59f

Please sign in to comment.