Skip to content

Commit 7cec59f

Browse files
authored
Merge pull request #287 from YantCaccia/master
first attempt to add InsertText intent
2 parents b57bb76 + 38c79d1 commit 7cec59f

18 files changed

+67
-2
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Most everything you can do with a remote or keyboard is supported in the skill,
6262
- Shutdown/reboot/sleep/hibernate system
6363
- Toggle fullscreen
6464
- Eject media
65+
- Send text
6566

6667
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.
6768

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

99101
## Donate
100102
[![Buy Me A Coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/lexigram)

alexa.py

+8
Original file line numberDiff line numberDiff line change
@@ -2932,5 +2932,13 @@ def alexa_launch():
29322932
def session_ended():
29332933
return "{}", 200
29342934

2935+
@ask.intent('InsertText')
2936+
@preflight_check
2937+
def alexa_insert_text(kodi, someText):
2938+
card_title = render_template('sending_text', textToBeSent=someText).encode('utf-8')
2939+
log.info(card_title)
2940+
kodi.SendText(someText)
2941+
return statement('').simple_card(card_title, '')
2942+
29352943

29362944
# End of intent methods

speech_assets/IntentSchema.json

+9
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,15 @@
787787
"type": "SHOWS"
788788
}
789789
]
790+
},
791+
{
792+
"intent": "InsertText",
793+
"slots": [
794+
{
795+
"name": "someText",
796+
"type": "AMAZON.SearchQuery"
797+
}
798+
]
790799
}
791800
]
792801
}

speech_assets/SampleUtterances.de.txt

+2
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@ Hibernate system ruhezustand
313313
Hibernate system tiefschlaf
314314
Hibernate tiefschlaf
315315
Home startseite
316+
InsertText schreibst {someText}
317+
InsertText eingeben {someText}
316318
Info info
317319
Info info dialog
318320
Info info fenster

speech_assets/SampleUtterances.en.txt

+2
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ Info show info window
131131
Info show information
132132
Info show information dialog
133133
Info show information window
134+
InsertText write {someText}
135+
InsertText insert {someText}
134136
Left go left
135137
Left left
136138
Left navigate left

speech_assets/SampleUtterances.es.txt

+2
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ Info ver el dialogo de info
130130
Info ver el dialogo de informacion
131131
Info ver la ventana de info
132132
Info ver la ventana de informacion
133+
InsertText escribes {someText}
134+
InsertText insertar {someText}
133135
Left ir izquierda
134136
Left izquierda
135137
Left navegar izquierda

speech_assets/SampleUtterances.fr.txt

+2
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ Info ouvre la fenêtre d' info
167167
Info ouvre la fenêtre d' informations
168168
Info ouvre le dialogue d' info
169169
Info ouvre le dialogue d' informations
170+
InsertText ecrivez {someText}
171+
InsertText entrez {someText}
170172
Left gauche
171173
Left va à gauche
172174
ListenToAlbum joue l'album {Album}

speech_assets/SampleUtterances.it.txt

+13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
AMAZON.HelpIntent cosa posso chiederti
22
AMAZON.HelpIntent cosa puoi fare
33
AMAZON.HelpIntent cose da provare
4+
AMAZON.StopIntent stop
5+
AMAZON.StopIntent interrompi
46
AddonExecute apri add on {Addon}
57
AddonExecute apri addon {Addon}
68
AddonExecute apri il plug in {Addon}
@@ -244,6 +246,10 @@ Info visualizza info
244246
Info visualizza informazioni
245247
Info visualizza la finestra info
246248
Info visualizza la finestra informazioni
249+
InsertText scrivi {someText}
250+
InsertText inserisci {someText}
251+
InsertText di scrivere {someText}
252+
InsertText di inserire {someText}
247253
Left a sinistra
248254
Left alla sinistra
249255
Left naviga a sinistra
@@ -908,6 +914,8 @@ Mute muto
908914
Mute setta muto
909915
Mute setta sonoro
910916
Mute sonoro
917+
Mute metti il muto
918+
Mute inserisci il muto
911919
PageDown a livello giù
912920
PageDown a livello inferiore
913921
PageDown a pagina giù
@@ -3009,6 +3017,9 @@ VolumeDown abbassa volume
30093017
VolumeDown diminuisci il volume
30103018
VolumeDown diminuisci volume
30113019
VolumeDown volume giù
3020+
VolumeDown voce giù
3021+
VolumeDown abbassa la voce
3022+
VolumeDown diminuisci la voce
30123023
VolumeSet il volume a {Volume}
30133024
VolumeSet il volume {Volume}
30143025
VolumeSet imposta il volume a {Volume}
@@ -3035,9 +3046,11 @@ VolumeSetPct volume a {Volume} per cento
30353046
VolumeSetPct volume {Volume} per cento
30363047
VolumeUp alza il volume
30373048
VolumeUp alza volume
3049+
VolumeUp alza la voce
30383050
VolumeUp aumenta il volume
30393051
VolumeUp aumenta volume
30403052
VolumeUp volume su
3053+
VolumeUp voce su
30413054
WatchEpisode guarda episodio {Episode} della stagione {Season} di {Show}
30423055
WatchEpisode guarda episodio {Episode} serie {Season} di {Show}
30433056
WatchEpisode guarda episodio {Episode} stagione {Season} di {Show}

templates.de.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ remaining_min: "Es ist noch eine Minute übrig"
413413

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

416+
sending_text: "Senden {{ textToBeSent }}"
417+
416418

417419
############################
418420
## General Templates ##

templates.en.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ remaining_min: "There is one minute remaining"
413413

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

416+
sending_text: "Sending {{ textToBeSent }}"
417+
416418

417419
############################
418420
## General Templates ##

templates.es.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ remaining_min: "Queda un minuto"
413413

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

416+
sending_text: "Enviando {{ textToBeSent }}"
417+
416418

417419
############################
418420
## General Templates ##

templates.fr.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ remaining_min: "Il reste une minute"
413413

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

416+
sending_text: "Envoi {{ textToBeSent }}"
417+
416418

417419
############################
418420
## General Templates ##

templates.it.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,8 @@ remaining_min: "Manca un minuto"
413413

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

416+
sending_text: "Sto inviando {{ textToBeSent }}"
417+
416418

417419
############################
418420
## General Templates ##

utterances.de.txt

+2
Original file line numberDiff line numberDiff line change
@@ -263,3 +263,5 @@ AddonGlobalSearch (suche/suche nach/finde) {Artist}
263263

264264
AMAZON.HelpIntent (/nach) was ich es fragen kann
265265
AMAZON.HelpIntent was es (/alles) kann
266+
267+
InsertText (schreibst/eingeben) {someText}

utterances.en.txt

+2
Original file line numberDiff line numberDiff line change
@@ -275,3 +275,5 @@ AddonGlobalSearch (find/search for) {Artist}
275275

276276
AMAZON.HelpIntent what can (you do/i ask you)
277277
AMAZON.HelpIntent things to try
278+
279+
InsertText (write/insert) {someText}

utterances.es.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -276,4 +276,6 @@ AddonGlobalSearch (encontrar/buscar) {Album}
276276
AddonGlobalSearch (encontrar/buscar) {Artist}
277277

278278
AMAZON.HelpIntent que puedes hacer
279-
AMAZON.HelpIntent cosas que probar
279+
AMAZON.HelpIntent cosas que probar
280+
281+
InsertText (escribes/insertas) {someText}

utterances.fr.txt

+2
Original file line numberDiff line numberDiff line change
@@ -248,3 +248,5 @@ AddonGlobalSearch (cherche/recherche) {Artist}
248248
AMAZON.HelpIntent (que puis-je/qu'est-ce que je peux) te demander
249249
AMAZON.HelpIntent (que peux-tu/qu'est-ce que tu peux) faire
250250
AMAZON.HelpIntent choses à essayer
251+
252+
InsertText (entrez/ecrivez) {someText}

utterances.it.txt

+8-1
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,12 @@ Fullscreen (/cambia) (pieno schermo/schermo pieno/visualizzazione)
6161
StereoscopicMode (/cambia) modalità (stereoscopica/tre d.)
6262

6363
AudioPassthrough cambia audio (passthrough/digitale)
64-
Mute (/imposta/setta) (muto/sonoro)
64+
Mute (/imposta/setta/metti/inserisci) (muto/sonoro)
6565
VolumeUp (alza/aumenta) (/il) volume
66+
VolumeUp (alza/aumenta) (/la) voce
6667
VolumeUp volume su
6768
VolumeDown (abbassa/diminuisci) (/il) volume
69+
VolumeDown (abbassa/diminuisci) (la) voce
6870
VolumeDown volume giù
6971
VolumeSet (/setta/imposta) (/il) volume (/a) {Volume}
7072
VolumeSetPct (/setta/imposta) (/il) volume (/a) {Volume} per cento
@@ -268,3 +270,8 @@ AddonGlobalSearch (trova/cerca) {Artist}
268270

269271
AMAZON.HelpIntent cosa (puoi fare/posso chiederti)
270272
AMAZON.HelpIntent cose da provare
273+
274+
AMAZON.StopIntent (stop/interrompi)
275+
276+
InsertText (scrivi/inserisci) {someText}
277+
InsertText di (scrivere/inserire) {someText}

0 commit comments

Comments
 (0)