Graphics

 View Only
Expand all | Collapse all

RSS Feeds

Frank Grenier

Frank Grenier05-30-2014 19:45

  • 1.  RSS Feeds

    Posted 08-30-2012 01:22
    Can I use a scene group with one scene to let RSS Feeds run through a crawl? Is there a code I can use to get items 1 through 20 to come up in one scene crawl?

    Let me know if this question makes sense.

    You guys rock!


  • 2.  RE: RSS Feeds

    Posted 08-30-2012 17:23
    Hi,

    You need to use more than one Scene to scroll through an RSS. The reason is cause you need enough Scene's with text to fill the entire width of the output. I usually use 4 scenes with a logo to separate each data element in a crawl. if you have a datasource with say 100 items and you want only the first 20, then you will need to make a crawl with Twenty Scene's in it, otherwise it will scroll through the whole thing.

    Neil

    #XPression


  • 3.  RE: RSS Feeds

    Posted 09-02-2012 19:21
    Thanks Neil.

    I have another question now. How do I get data like stock numbers from a website's data table to work as a crawl?

    #XPression


  • 4.  RE: RSS Feeds

    Posted 09-02-2012 19:33
    You'll need the data as a readable url like an xml or rss feed. Then make a new Data source in Datalinq using that readable xml/rss. In XPression connect a text to the datalinq.

    #XPression


  • 5.  RE: RSS Feeds

    Posted 09-02-2012 19:42
    I am sorry, newbie here. How do I get the xml off of the website?

    #XPression


  • 6.  RE: RSS Feeds

    Posted 09-04-2012 22:09
    Hi Forogh,

    For an XML that is online (called an RSS) use the 'RSS Feed Datalinq Source', and use the http link for the XML(RSS) feed.

    When using an XML file that is local you will use the 'XML Datalinq Source' and specify the file location.

    Let us know if that works!

    #XPression


  • 7.  RE: RSS Feeds

    Posted 09-06-2012 14:41
    if you go here: http://www.cbc.ca/rss/

    there is a list with a bunch of free rss news feeds. if you pick one like this one for Top Stories: http://rss.cbc.ca/lineup/topstories.xml

    use this url to add an RSS datasource. Then in XPression attache a text object to this datasource and choose the title line inside this rss feed.

    if your still a little confused let me know, maybe we can have a chat on Skye!

    Neil Hopley

    Wireframe Group

    www.groupewireframe.com

    514-261-4380

    #XPression


  • 8.  RE: RSS Feeds

    Posted 09-11-2012 00:31
    Hey Garner and Neil,

    We just got everything hooked up again. I am going to perform some tests to see how the system generates my files without framebuffers and system crashing. As far as the RSS feeds go, guys, I understand exactly how it works now and I know where to go from here on out (thanks to you guys). Now, Neil, is there anyway you could give me your skype information and I could pick your brain as long as you have it? :) Thanks guys, I really do appreciate all that you guys have done for us.

    #XPression


  • 9.  RE: RSS Feeds

    Posted 09-11-2012 13:36
    my Skype name is neil.hopley

    Neil Hopley

    Wireframe Group

    www.groupewireframe.com

    514-261-4380

    #XPression


  • 10.  RE: RSS Feeds

    Posted 09-15-2012 00:51
    I'm just setting up our XPression and I was hoping someone out there could help.

    I'm looking for RSS feeds for Lottery numbers, stock market, and sports scores that are stable enough that the info will be in the right place all the time.

    The Florida Lottery offers an RSS feed, but the numbers all come up with a string of the numbers with dashes. I would love to put this over white lottery ball images, so would I need a parse the information further?

    I don't know if that makes sense, but....

    Thanks for any help anyone has on RSS feeds.

    #XPression


  • 11.  RE: RSS Feeds

    Posted 09-15-2012 06:38
    David,

    You need a text object that is not visible in your scene, linked to your lottery numbers in the RSS feed.

    Go in the script editor of this text object and in "onsettext", write a little script in order to parse the string to an array.

    When your array of integer is complete, update the text value of each text object (with a for each loop) which are over each white balls.

    #XPression


  • 12.  RE: RSS Feeds

    Posted 09-15-2012 12:06
    David, whats he url of the free RSS lottery? ill see if i can use it. Then send the scene.

    Neil Hopley

    Wireframe Group

    www.wireframegroup.com

    514-261-4380

    #XPression


  • 13.  RE: RSS Feeds

    Posted 09-15-2012 13:20
    http://www.flalottery.com/video/en/theWinningNumber.xml

    I was trying to do the Powerball numbers initially, but I will need to do all of them at some point. We don't run all the numbers every day, but if I can get one to work I can reverse engineer the script for the rest.

    I don't know anything about Visual Basic so if you can get me started it would be immensely appreciated.

    Thanks so much!

    #XPression


  • 14.  RE: RSS Feeds

    Posted 09-17-2012 14:53
    Hi David, that url does not work for some reason. I can't see any info when i ingest it into XPression.

    is there not a subscription based rss feed that can be available?

    Neil

    #XPression


  • 15.  RE: RSS Feeds

    Posted 09-17-2012 15:13
    That's very strange because I just checked in my XPression and it shows up. This website is the public Florida Lottery page, it's not subscription based.

    I put that website into the DateLinq as an RSS Feed DataLinq, then went into XPression and made the Date Source DataLinq and when I click on SET and BROWSE it brings up all the fields in the RSS Feed.

    I just tried it again, making a new DataLinq and the same website and it worked...

    http://www.flalottery.com/video/en/theWinningNumber.xml

    I'm not sure where else to go for the numbers. I appreciate you looking at it, but if it doesn't work for you then my producers will have to manually input the numbers the way they always have :)

    #XPression


  • 16.  RE: RSS Feeds

    Posted 09-17-2012 16:05
    Same pb for me... The website seems down... Ping returns nothing :(

    Does the website is "open" to other country ?

    #XPression


  • 17.  RE: RSS Feeds

    Posted 09-17-2012 16:33
    Hmmm. Is there any way to try with an rss feed that you can access and if it works I can reverse engineer the code to fit my needs?

    I don't know visual basic, I'm a newscast director, so I wouldn't even know where to begin parsing data onto an array and pulling that data.

    Thanks to you both for looking :)

    #XPression


  • 18.  RE: RSS Feeds

    Posted 03-30-2013 20:59
    I'm at home so I may make mistakes but I'll lay down the basic concept. Fair warning though, you will need to take this concept and expand on it for complicated sets of data.

    b> THE CRAZY BUGGERS DID IT! /> N. Korea launches nuke at US but it failed to detonate. N. Korea attempted to use tinfoil as a replacement for uranium.

    Here's an example RSS item. We will use the description for the crawl.

    Your scene will contain two text objects. On the bottom of the screen will be the crawl item which I'll name 'CRAWL'. The other will collect the data from the RSS which I'll name 'INPUT'. INPUT will not be visible. Connect INPUT to the RSS. Right click on INPUT and edit the script.

    On the top of the script window you will see some items we can access. You should see something like Text imported as textobject. 'Text' is the data that has been collected from the RSS. 'Scene' will give you access to other objects in your scene. Time to start writing the script.

    Dim SEGMENTS(2) as string

    We want to remove the headline and extra code. This creates a new String variable to temporarily hold your text. It is split into two segments. We will store the headline in the first segment and our description in the second segment.

    Dim FINALTEXT as String

    This is wherethe parsed text will be stored.

    Dim FINALOUTPUT as xpTextObject

    This will be connected to CRAWL and replace CRAWLS text with your parsed text.

    if InString(Text, "/>",0) > 0 then

    This will check how many times "/>" shows up in the feed. It'll be used as a safeguard just in case the feed format changes. Text is the RSS data. 0 is where you would like to start the search. We want to start from the first character so we'll enter '0'

    SEGMENTS=SplitString(Text, "/>", 0)

    This will now search your feed for the first instance of "/>" and store each part in their respective segment of the string.

    FINALTEXT = Segments(1)

    When selecting an item, '0' is considered the first item. We just took the second item containing the description, (1), and applied it to our FINALTEXT string.

    else

    FINALTEXT=""

    end if


    This will complete the If statement being used as a safeguard. If "/>" doesn't show up in your feed, something has changed. I chose to display nothing. You could also use FINALTEXT=Text to show the unedited rss data.

    scene.getTextObjectByName("CRAWL", FINALOUTPUT)

    This will find the CRAWL textobject and allow you to change it's input via FINALOUTPUT

    FINALOUTPUT.text=FINALTEXT

    FInally, you apply your parsed text to CRAWL.

    -----------------------------------------------------------------------------------------

    The full script will look something like this:

    Dim SEGMENTS(2) as string

    Dim FINALTEXT as String

    Dim FINALOUTPUT as xpTextObject

    if InString(Text, "/>",0) > 0 then

    SEGMENTS=SplitString(Text, "/>", 0)

    FINALTEXT = Segments(1)

    else

    FINALTEXT=""

    end if

    Scene.getTextObjectByName("CRAWL", FINALOUTPUT)

    FINALOUTPUT.text=FINALTEXT


    _______________________________________________________________

    Right now I'm creating a script to show the river levels during flood season. I had to retrieve the current river level, the projected flood level, and the date at which the river will crest. I also needed to add my own text to title each piece of data. I created 3 strings to hold my final data. FINALTEXT1, FINALTEXT2, FINALTEXT3.

    First I cut off the garbage before the current water level and applied the remaining data, SEGMENTS(1), to FINALTEXT1. I then reused SEGMENTS to split everything after the current levels using FINALTEXT1 as my source.

    SEGMENTS=SplitString(FINALTEXT1, "-", 0)

    Finally I reapplied SEGMENTS(0) (which now contains only the current levels) to FINALTEXT1 but added my own text to describe the data.

    FINALTEXT1 = "Current Levels: " + SEGMENTS(0)+"ft"

    I also had to check that the projected flood levels and the date at which the crest will occur were available, and display "N/A" if they were not. I reused SEGMENTS every time I needed to split text and temporarily store the segments.

    [I]Using 'if' statements: [/I]

    FINALTEXT2 = " * Projected: " + SEGMENTS(0) + "ft"

    [I]or[/I]

    FINALTEXT2 = " * Projected: N/A"

    [I]AND[/I]



    FINALTEXT3 = ", " + SEGMENTS(0)


    [I]or[/I]

    FINALTEXT3 = ""

    Finally I applied all three parts to CRAWL.

    FINALOUTPUT.Text= FINALTEXT1 + FINALTEXT2 + FINALTEXT3

    __________________________________________

    Again, I probably made some minor mistakes here and there but this is the basic logic behind it.

    #XPression


  • 19.  RE: RSS Feeds

    Posted 05-29-2014 19:05
    I tried using the InString and SplitString methods, but I kept getting errors saying Name 'InString' is not declared and Name 'SplitString' is not declared... am I missing something?

    #XPression


  • 20.  RE: RSS Feeds

    Posted 05-29-2014 21:14
    It should be InStr and Split.. not InString and SplitString.

    This might be useful for you: http://www.w3schools.com/vbscript/vbscript_ref_functions.asp

    #XPression


  • 21.  RE: RSS Feeds

    Posted 05-30-2014 19:45
    Awesome that helped bunches!

    #XPression