Author Topic: FIFA world / Zonal Ranking for Football (Soccer) Teams  (Read 3509 times)

0 Members and 2 Guests are viewing this topic.

Haddood

  • $upporter
  • Hero Member
  • *****
  • Posts: 688
  • Karma: 22
    • View Profile
FIFA world / Zonal Ranking for Football (Soccer) Teams
« on: June 19, 2014, 03:16:51 PM »
in spirit of World Cup I wrote couple of command. the first will generate XML Files for the countries list according to FIFA and th second will return the team ranking ...

Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 1.9.5.6-->
<command id="979" name="Generate FIFA Countries XML" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Scrape</cmdType>
    <params>
      <param>http://www.fifa.com/worldranking/rankingtable/index.html</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <params>
      <param>\{maCode:'?(.*?)',teamName:'?(.*?)',rank:'?(.*?)',zonalRank:'?(.*?)',thisPoints:'?(.*?)'\}?</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PayloadXML.Clear</cmdType>
    <params>
      <param>payloads\FIFA codes.xml</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>PayloadXML.AddPair</cmdType>
    <params>
      <param>payloads\FIFA codes.xml</param>
      <param>{Match.{i}.1}</param>
      <param>{Match.{i}.2}</param>
    </params>
    <cmdRepeat>{#M}</cmdRepeat>
  </action>
  <action>
    <cmdType>Map.Set</cmdType>
    <params>
      <param>Variables</param>
      <param>FIFA Codes Date</param>
      <param>{ShortDate}</param>
      <param>True</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <event>FIFA.Codes</event>
</command>


Code: [Select]
<?xml version="1.0" encoding="utf-16"?>
<!--VoxCommando 1.9.5.6-->
<command id="983" name="Get FIFA Ranking" enabled="true" alwaysOn="False" confirm="False" requiredConfidence="0" loop="False" loopDelay="0" loopMax="0" description="">
  <action>
    <cmdType>Scrape</cmdType>
    <params>
      <param>http://www.fifa.com/worldranking/rankingtable/index.html</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>Results.RegEx</cmdType>
    <params>
      <param>\{maCode:'?{1}',teamName:'(.*?)',rank:'?(.*?)',zonalRank:'?(.*?)',thisPoints:'?(.*?)'\}?</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <action>
    <cmdType>VC.TriggerEvent</cmdType>
    <params>
      <param>feedback</param>
      <param>FIFA World Rank for {Match.1.1} is {Match.1.2}. Zonal rank is {Match.1.3} with  {Match.1.4} Points</param>
      <param>2</param>
    </params>
    <cmdRepeat>1</cmdRepeat>
  </action>
  <phrase>What is, Do you know</phrase>
  <phrase>FIFA ranking of</phrase>
  <payloadFromXML phraseOnly="False" use2partPhrase="False" phraseConnector="by" Phrase2wildcard="anyone" optional="False">payloads\FIFA codes.xml</payloadFromXML>
</command>
« Last Edit: June 19, 2014, 03:33:24 PM by Haddood »
When Voice command gets tough, use hand gestures

Mirac78

  • Jr. Member
  • **
  • Posts: 49
  • Karma: 5
    • View Profile
    • M.S.Photography
Re: Re: FIFA world / Zonal Ranking for Football (Soccer) Teams
« Reply #1 on: June 20, 2014, 02:17:48 AM »
Nice, tnx for code.