Announcement

Collapse
No announcement yet.

Word of the day with RSS reader

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Word of the day with RSS reader

    HI,


    I am trying to use Jon00's RSS reader to announce the word of the day. I would like to use a feed that gives the definition and the use in a sentence. I have had trouble finding a suitable feed. Has anyone used Jon00's script for this purpose.

    Also are there any methods of ignoring charachters so they are not spoken and of changing the speaking rate.

    Cheers.

    By the way Jon00 all of your scripts are amazing, thanks for all the effort you have put in.

    Cabbage

    #2
    I don't use jon00 RSS reader but I do use the folowing script to pull the word for the day from a yahoo RSS feed.

    -------------
    'Word of the day script originally from the HS board. Modified for better speech when using speech
    'proxies and to pull from Yahoo, spell the word and give it's usage and definition.
    Sub Main
    speakMsg = ""
    Set objXMLDoc = CreateObject("MSXML2.DOMDocument.4.0")
    objXMLDoc.async = false
    objXMLDoc.load("http://xml.education.yahoo.com/rss/wotd/")
    set sData = objXMLDoc.selectSingleNode("rss/channel/item/title")
    iloc = InStr(sData.text," -")
    word = Left(sData.text,iloc-1)
    splData = split(sData.text,":")
    Set sData = objXMLDoc.selectSingleNode("rss/channel/item/description")
    istart = InStr(sData.text,"(")
    If istart > 0 Then
    iend = InStr(sData.text,")")
    word_type = Mid(sData.text,istart+1,iend-istart-1)
    def = Right(sData.text,Len(sData.text)-iend)
    Else
    word_type = ""
    def = sData.text
    End If
    speakMsg = speakMsg & "The word of the day is, " & word & ". "
    speakMsg = speakMsg & word & " is spelled, . "
    For I = 1 to Len(word)
    speakMsg = speakMsg & (UCase(Mid(word,I,1))) & ". , ."
    Next
    If word_type <> "" Then
    speakMsg = speakMsg & ", " & word & " is a, " & word_type & "., ,"
    End If
    speakMsg = speakMsg & ", The definition of, , " & word & " ,is, " & def
    hs.speak speakMsg
    hs.WriteLog "Info", "Yahoo word of the day used."
    End Sub
    -----------------------------------------------------------------
    Marty
    ------
    XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
    Playing with HS3 a bit but it's just play at this point.

    Comment


      #3
      Here are a few WOTD feeds I have seen, though they many not be suitable for your requirements.

      http://wordsmith.org/awad/rss1.xml

      http://xml.education.yahoo.com/rss/wotd/

      http://dictionary.reference.com/wordoftheday/wotd.rss

      http://www.merriam-webster.com/word/index.xml

      http://www.oed.com/rss.xml

      Each SAPI5 voice handles punctuation & characters differently so is difficult to comment. You can change the pitch of a voice with tags but the script would need to be modified to do this.
      Jon

      Comment


        #4
        Marty,

        I have tried to use that script. It gave me an Active X error so I thought since I was using the RSS reader anyway I would use it.

        Cabbage

        Comment


          #5
          it doesn't sound like you have the Microsoft MSXML files loaded.
          Marty
          ------
          XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
          Playing with HS3 a bit but it's just play at this point.

          Comment


            #6
            Marty, Thanks for posting, this version is better than the one I was using. I like the word type and the spelling. I need to mod it just a little more so I can put the word in an HS Device, then I can send it to my betabrite

            Jack
            Over The Hill
            What Hill?
            Where?
            When?
            I Don't Remember Any Hill

            Virtualized Server 2k3 Ent X86 Guest on VMWare ESXi 4.1 with 3 SunRay thin clients as access points - HSPro 2.4.0.48 - ZTroller - ACRF2 (3 WGL 800's) - iAutomate RFID - Ledam - MLHSPlugin - Ultra1wire - RainRelay8 - TI103 - Ultramon - WAF-AB8SS - jvESS (11 zones) - Bitwise Controls BC4 - with 745 Total Devices - 550 Events - 104 scripts - 78 ZWave devices - 42 X10 devices - 76 DS10a's 3 RFXSenors and 32 Motion Sensors

            Comment


              #7
              I have one that does that, not so much for the betabright but for when yahoo is down.

              Sub Main
              Set objXMLDoc = CreateObject("MSXML2.DOMDocument.4.0")
              objXMLDoc.async = false
              objXMLDoc.load("http://xml.education.yahoo.com/rss/wotd/")
              set sData = objXMLDoc.selectSingleNode("rss/channel/item/title")
              iloc = InStr(sData.text," -")
              word = Left(sData.text,iloc-1)
              If hs.DeviceString("V74") = (word) Then
              hs.Run "word of the day alternate.txt"
              Else
              hs.Run "word_of_the_day_Yahoo.txt"
              End If
              hs.WaitSecs 10
              hs.SetDeviceString "V74" , (word) , True
              End Sub

              You'll have to mod this some, it mostly looks at yahoo, checks to make sure it's not the same as yesterday. well you get the idea, you're better at this than me so you'll see what it does.
              Marty
              ------
              XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
              Playing with HS3 a bit but it's just play at this point.

              Comment

              Working...
              X