News:

HOT TIP! In the command editor, you can ctrl-click and drag an item to create a copy of it.

Main Menu

TheBlaze.com News

Started by PegLegTV, October 17, 2015, 10:26:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PegLegTV

Theses two commands are similar to Nime5ters Reuters World News

Simply ask "What's new at the Blaze" and it will read the first 5 article titles from TheBlaze.com and add all the articles currently on the site to the payload list,

then say "Tell me more about headline number {1}" and it will either read a synopsis of the article (I have it cut out all the links which includes hyperlinks) or if it has a youtube video it will launch the video in Kodi and skip reading the article (since most of the time the articles with videos are just a description of the video)

and then it will email a link of the article to the email of your choosing, simply add your email address to the last action in "More From the Blaze" where it says youremailhere

The Blaze
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 2.2.0.9-->
<commandGroup open="True" name="The Blaze" enabled="True" prefix="" priority="0" requiredProcess="" description="">
  <command id="1082" name="the blaze" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <params>
        <param>one moment please as I check to see what is new at the blaze dot com</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>http://www.theblaze.com/stories/feed/</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegExReplace</cmdType>
      <params>
        <param>&amp;#\d+;</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>&lt;title&gt;(.*?)&lt;/title&gt;&lt;link&gt;(.*?)&lt;/link&gt;</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.Clear</cmdType>
      <params>
        <param>payloads\TheBlaze.xml</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>PayloadXML.AddPair</cmdType>
      <params>
        <param>payloads\TheBlaze.xml</param>
        <param>{Match.{i}.2}</param>
        <param>{i}</param>
      </params>
      <cmdRepeat>{#M}</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.ShowText</cmdType>
      <params>
        <param>latest headlines from TheBlaze.com</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>OSD.AddText</cmdType>
      <params>
        <param>{i}. {Match.{i}.1}.</param>
      </params>
      <cmdRepeat>5</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <params>
        <param>Latest headlines from the blaze dot com</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>TTS.SpeakSync</cmdType>
      <params>
        <param>{i}. {Match.{i}.1}.</param>
      </params>
      <cmdRepeat>5</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.SetVar</cmdType>
      <params>
        <param>headline {i}</param>
        <param>{Match.{i}.1}</param>
      </params>
      <cmdRepeat>5</cmdRepeat>
    </action>
    <action>
      <cmdType>Group.Rebuild</cmdType>
      <params>
        <param>The Blaze</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Whats new at the blaze</phrase>
  </command>
  <command id="1255" name="More from The Blaze" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
    <action>
      <cmdType>Scrape</cmdType>
      <params>
        <param>{1}</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <action>
      <cmdType>Results.RegEx</cmdType>
      <params>
        <param>src="https://www.youtube.com/embed/(.*?)"</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <if ifBlockDisabled="False" ifNot="False">
      <ifType>LastActionSuccess</ifType>
      <ifParams>&amp;&amp;</ifParams>
      <then>
        <action>
          <cmdType>TTS.Speak</cmdType>
          <params>
            <param>Loading You Tube video from the blaze, please wait</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>XJson.Raw</cmdType>
          <params>
            <param>player.open</param>
            <param>"item": {"file":"plugin://plugin.video.youtube/play/?video_id={Match.1.1}"}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </then>
      <else>
        <action>
          <cmdType>Results.RegExReplace</cmdType>
          <params>
            <param>&amp;.(\d+);</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.RegExReplace</cmdType>
          <params>
            <param>;..(\d+)</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.RegEx</cmdType>
          <params>
            <param>&lt;p&gt;(\w)(.*?)&lt;/</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.MatchConcat</cmdType>
          <params>
            <param><![CDATA[ ]]></param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>Results.RegExReplace</cmdType>
          <params>
            <param>&lt;.*?&gt;</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
        <action>
          <cmdType>TTS.SpeakSync</cmdType>
          <params>
            <param>{LastResult}</param>
          </params>
          <cmdRepeat>1</cmdRepeat>
        </action>
      </else>
    </if>
    <action>
      <cmdType>SMTP.Send</cmdType>
      <params>
        <param>youremailhere</param>
        <param>The Blaze News Stories</param>
        <param>The Blaze.com - &lt;a href="{1}"&gt;{Var.headline {PF.1}}&lt;/a&gt; </param>
        <param />
        <param>True</param>
      </params>
      <cmdRepeat>1</cmdRepeat>
    </action>
    <phrase>Tell me more about</phrase>
    <phrase>headline, article</phrase>
    <phrase>number</phrase>
    <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\TheBlaze.xml</payloadFromXML>
  </command>
</commandGroup>