Exemple - lecteur de nouvelles rss

Le langage HTML récupère toutes les donées rss depuis http://rss.news.yahoo.com/rss/trech. Les données sont rafraîchies toutes les 15 minutes depuis cron.

 

Résultat

Résultat:

Review: Netflix and Hulu's new scripted originals (AP)

In this image released by Netflix, Steven Van Zandt is shown in a scene from 'Lillyhammer. Both Netflix and Hulu are debuting their first stabs at original scripted programming. Netflix has released all eight episodes of 'Lilyhammer' a fish-out-of-water drama with Steve Van Zandt, and on Tuesday, Hulu will premiere 'Battleground,' an 'Office'-style political faux-documentary. (AP Photo/Netflix)AP - Within just over a week, Netflix and Hulu are both debuting their first stabs at original scripted programming.




Netflix settlement trims 14 pct off 4Q earnings (AP)

AP - It turns out Netflix's fourth-quarter earnings aren't quite as good as the video subscription service told investors a couple weeks ago.



LinkedIn's 4Q revenue doubles, stock soars 8 pct (AP)

FILE - In this May 19, 2011 file photo,the LinkedIn logo is displayed in the foyer at headquarters in Mountain View, Calif. LinkedIn Corp., releases quarterly financial results Thursday, Feb. 9, 2012, after the market close. (AP Photo/Paul Sakuma, File)AP - LinkedIn provided further evidence of online networking's popularity and moneymaking potential with a fourth-quarter performance that got a glowing review on Wall Street.




Red-hot valentines for the guys, gals, and geeks we love (Yahoo! News)

Yahoo! News - Chocolates that you picked up from the grocery store on the way home from work a few minutes before the big V-Day date are not sexy. In the world of fine taste, they rate somewhere around squirt cheese, Spam, and tuna casserole — which &



Italian satellite is a laser disco ball for science (Yahoo! News)

Yahoo! News - If Albert Einstein were alive to witness Italy's Laser Relativity Satellite (LARES) in action, he might just start dancing. That's because the tungsten sphere, just over a foot in diameter, is meant to orbit the Earth and help scientists prove part &



Tesla Motors Unveils Model X Electric Minivan/SUV [PICS] (Mashable)

Mashable - [More from Mashable: Fisker Karma Electric Supercar Struts Its Stuff at CES 2012 [PICS]]



Path fumble highlights Internet privacy concerns (Reuters)

Reuters - A privacy debate surrounding fledgling social network Path went viral this week, triggering discussions on blogs and on Twitter about how far social networks can go in using members' private data.



Sony's Hirai to extend PlayStation strategy (Reuters)

Reuters - Incoming CEO Kazuo Hirai aims to re-shape Sony Corp by linking hardware and software through online networks -- a model he used at its PlayStation unit -- dismissing any suggestion the battered brand would revert to a gadget-centered strategy under his management.



Dad Shoots up Laptop -- Was it Right? (ContributorNetwork)

ContributorNetwork - COMMENTARY| What happens when a young teenager disrespects her parents on Facebook? For Tommy Jordan, it meant posting a video on YouTube and Facebook, putting 10 hollow point bullets into his daughter's laptop and grounding her for the foreseeable future. Did he go too far?



Android@home could rival Apple AirPlay (Appolicious)

Appolicious - One area in which Google has yet to catch up with Apple is home entertainment. That may soon change, as Google is reportedly working on an Android-based home music system called Android@home. Such a system would likely be among the first products to come out of Project Tungsten, which Google demonstrated at their I/O conference last spring. There, Google showed a tablet that could manage various aspects of the home, including turning lights on and off, sending music from the Internet to a hi-fi, and speakers laced with an NFC chip to initiate music play.



As Facebook IPO nears, the case for dull stocks (AP)

AP - Investors thinking of buying a piece of Facebook after it goes public are hoping it will perform like Google, whose stock has risen 500 percent since its debut seven and a half years ago.



The Hidden Tax on Every Smartphone and Tablet You Buy (ContributorNetwork)

ContributorNetwork - COMMENTARY | You weren't charged it when they rang your smartphone up at the register, and your receipt won't have any mention of it. But if you bought an Android smartphone in the last year or so, odds are you paid Microsoft $5 for the privilege of using Android, according to Citi analyst Walter Pritchard as quoted in Business Insider. Meanwhile, Google stands to collect about a billion dollars a year from Apple on account of people who buy the iPhone, according to John Paczkowski of AllThingsD.



Apples iOS surpasses Mac OS X in web traffic (Appolicious)

Appolicious - Apples mobile devices apparently have been taking a bite out of the larger PC market, but theyre also eating up some of Apples own computer market share, a new web traffic study suggests.



Google working to patch Wallet security holes (Appolicious)

Appolicious - One of the big pushes Google is making for the future of its Android mobile platform is in Google Wallet, the near-field communication software that lets users make purchases in brick-and-mortar stores using only information stored and broadcast over short range by their smartphones.



Chrome Beta leads Android Apps of the Week (Appolicious)

Appolicious - Google made a grand gesture in launching the Chrome browser beta for Android. Gaining popularity on the desktop, it was only a matter of time before Google merged its browser and mobile efforts with an Android version of Chrome. Vonage also made a splash with its Android debut, competing with established players like Skype and Googles own VoIP service. Rdio has completely reworked its Android app in hopes of making its mark on the Android Markets music scene, while Zlango reached 1 million users just a few months after its launch.



Siri rival Speaktoit gives old iPhones the personal assistant experience (Digital Trends)

Digital Trends - Way back in the fall of 2011, when we were just being introduced to Siri in all her (short lived) iPhone 4S exclusivity glory, we wrote about Speaktoit. It was among the first legitimate answers to Siri that came hot on the heels of the iPhone 4S announcement. Â



Not the DIY type? Tips to find a tax preparer (AP)

AP - If your financial life is simple and you have basic computer skills, using do-it-yourself software is an "EZ" way to file your tax return.



Turbo-traders take Bank of America for a ride (AP)

FILE - In this Tuesday, Aug. 23, 2011 file photo, Bank of America Merrill Lynch traders work on the floor of the New York Stock Exchange in New York. There are fewer and fewer traders on the NYSE floor because of the dominance of computer trading of securities - including the high-frequency trading that can take advantage of price changes in a millisecond. Bank of America is the stock of the moment for high-frequency trading; investors use computer algorithms to exploit small changes in a stock's price. If a computer can seize on a stock like Bank of America a fraction of a second faster than the rest of the market, it can book a tiny profit. (AP Photo/Henny Ray Abrams)AP - On a normal day, 4 billion shares of stock change hands on the New York Stock Exchange. One in 10 belongs to a single company. It's not McDonald's or IBM, both of which have been on a tear.




Code source du Script

Code source du script:

# File: rss_main.w
# Name: RSS READER
# Description: output html retrieves all rss news from http://rss.news.yahoo.com/rss/tech
# Input: URL [http://rss.news.yahoo.com/rss/tech]
# Output format: HTML file
# Output fields: linked title, description (with the html code)

#<Logger File>
#    Global
#    FileName rss_log.log
#    # log all messages up to debug messages
#    Level debug
#</Logger>

<Section>
    Name RSS_reader
    Define $output_file rss_output.html
	
    # clean output file
	<Action Print>
        FileName {$output_file}
        FileMode Write
    </Action>
    
    #load RSS feed from yahoo
    <Action ContentURL>
        URL http://rss.news.yahoo.com/rss/tech
        RemoveNewLine
    </Action>

    #while is inside any rss item, try to match it and print to HTML output
    <Section While>
        <Pattern>
            Name rss_item
            
            #pattern for matching one item in channel
            RegExp <item>*<title>{$rss_item_title}</title>*\
                    <link>{$rss_item_link}</link>*<guid{:re([^>]*)}>*</guid>*<source>*</source>*\
                   <category>*</category>*<pubDate>{$rss_item_publicated}</pubDate>*\
                    <description>{$rss_item_description}</description>
            HtmlSpecialChars
        </Pattern>

        #print matched data to file
        <Action Print>
            FileName {$output_dir}{$output_file}
            Text <a href="{$rss_item_link}">{$rss_item_title}</a><br>\
                 <p>{$rss_item_description}</p><br><br>
        </Action>
    </Section>
</Section>    

#start execution with section RSS_reader
Main RSS_reader
Gardez contact avec UnitMiner
© 2004-2012 QualityUnit.com, All rights reserved