List navigation using conversational context

All,
I am looking for some code ideas for a list navigational skill. The idea is that I would have an intent trigger, that would return a list, let’s call it my_list[]. my_list[] may contain many items. Once the initial list has been retrieved by the original intent I would like Mycroft to speak the first item in the list along with “to navigate the list say Next, Previous, Or Select”. At this point I might respond “Next” where Mycroft would now speak the next item in the list and so on. Upon commanding Mycroft to “Select” the intent would return the list value or index. I understand at a high level what I need here but am not sure how to get from A to B on this one. If anyone has some examples they would be very welcome.

If you already have your list i would try it like this:

for x in mylist:
speak list item
ask user if next item
If next item:
Pass
Else: break

Hope this helps, if you need a working code example i may write and test it tomorrow just let me know

Thanks, now that I have the conversation context sorted out I will give this a try.

1 Like