0.0
No commit activity in last 3 years
No release in over 3 years
Using a WikiMd formatted document, generates a basic Amazon Alexa model in XML format, as well as other formats.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.7, >= 0.7.8
 Project Readme

Introducing the alexa_modelmd gem

require 'alexa_modelmd'

wm = AlexaModelMd.new 'leo.md'
puts wm.to_xml

The above example takes a kind of Markdown file containing an Amazon Alexa model using headings, lists etc. and returns an XML representation.

file: leo.md

title: leo
invocation: leo
endpoint: http://a2.jamesrobertson.eu/do/leo/ask
--#
# Radio

## RadioPlay

* play the radio
* to play radio

    radio.play
    'I am now playing the radio.'

+ radio

# Journey

## JourneyOutbound

* I'm leaving now
* bye

`rsc.sps.notice 'jamesio: leaving'
'Okay, bye!`

## JourneyInbound

* I have arrived
* I'm back

`rsc.sps.notice 'jamesio: arrived'
'Welcome back!`


+ Journey inbound outbound

Output XML:

<?xml version='1.0' encoding='UTF-8'?>
<model>
  <summary>
    <title>leo</title>
    <invocation>leo</invocation>
    <endpoint>http://a2.jamesrobertson.eu/do/leo/ask</endpoint>
  </summary>
  <entries>
    <entry>
      <topic>Radio</topic>
      <intents>
        <intent>
          <name>RadioPlay</name>
          <utterances>
            <utterance>play the radio</utterance>
            <utterance>to play the radio</utterance>
          </utterances>
          <code><![CDATA[
radio.play
'I am now playing the radio.'
]]></code>
        </intent>
      </intents>
    </entry>
    <entry>
      <topic>Journey</topic>
      <intents>
        <intent>
          <name>JourneyOutbound</name>
          <utterances>
            <utterance>I’m leaving now</utterance>
            <utterance>bye</utterance>
          </utterances>
          <code><![CDATA[rsc.sps.notice 'jamesio: leaving'
'Okay, bye!]]></code>
        </intent>
        <intent>
          <name>JourneyInbound</name>
          <utterances>
            <utterance>I have arrived</utterance>
            <utterance>I’m back</utterance>
          </utterances>
          <code><![CDATA[rsc.sps.notice 'jamesio: arrived'
'Welcome back!]]></code>
        </intent>
      </intents>
    </entry>
  </entries>
</model>

Resources

alexa wikimd amazon bot model builder