Do HTML sa extrahujú všetky rss správy z http://rss.news.yahoo.com/rss/trech. Výstup sa obnovuje každých 15 minút.
Výstup:
AP - A legal tussle pitting media conglomerate Viacom Inc. against online video leader YouTube is about to get dirtier as a federal judge prepares to release documents that will expose their secrets and other confidential information.
AP - Yahoo is buying a fantasy sports company co-founded by an MIT graduate whose card-counting skills helped him win millions of dollars in blackjack and spawned a film and a best-selling book.
AP - A man fired from a Texas auto dealership used an Internet service to remotely disable ignitions and set off car horns of more than 100 vehicles sold at his old workplace, police said Wednesday.
AP - As competition for video subscribers heats up in the New York City area, Verizon Communications Inc. has taken a swipe at cable TV rival Cablevision Systems Corp., accusing it of infringing on several Verizon digital set-top box patents.
AP - Maxi Sopo was having so much fun "living in paradise" in Mexico that he posted about it on Facebook so all his friends could follow his adventures. Others were watching, too: A federal prosecutor in Seattle, where Sopo was wanted on bank fraud charges.
AP - Google Inc. is making two new versions of its Nexus One phone: one for AT&T Inc.'s network and one for Sprint Nextel Corp.'s.
Reuters - Google Inc is working with Intel Corp and Sony Corp to develop a new class of Internet-enabled televisions and set top boxes, according to a media report.
Macworld.com - Fancy a bundle? MacUpdate has announced the release of its Promo Spring Bundle 2010, which includes 10 different Mac apps for the low, low price of $50.
Reuters - Google Inc's Nexus One smartphone will soon be available to subscribers of Sprint Nextel Corp, the second U.S. wireless service provider to announce an agreement to support the touchscreen phone.
AP - Seattlepi.com, the online successor to the print version of the Seattle Post-Intelligencer, celebrates its first birthday Thursday with music, free cupcakes and cheap beer.
PC World - Petite, that's how you might describe this rumored Xbox 360 motherboard, snapped and leaked on Chinese site A9VG's message boards and picked up by Kotaku. The motherboard reportedly packs the CPU and GPU onto a single chip--that'd be it purportedly hiding under the CoolerMaster fan--whereas existing Xbox 360 boards position the CPU and GPU across from each other at the board's center (see below).
Macworld.com - Jerome York, a 13-year-veteran of Apple’s board of directors, has been hospitalized after suffering a brain aneurysm, according to a Wall Street Journal report. The Journal, citing a person familiar with the matter, says that York is “in very serious condition” at Pontiac Osteopathic Hospital in Pontiac, Mich.
AP - Diebold Inc., a maker of ATMs and security systems, said Wednesday that Kumar Pavithran will lead its integrated services, global software development and global professional services teams.
NewsFactor - IBM is going deeper into the cloud. On Tuesday, the Armonk, N.Y.-based company announced beta versions of an expanded commercial cloud-based service for software development and testing, on both public and private clouds.
PC World - After an international take-down effort, a rogue ISP responsible for controlling large numbers of computers infected with data-stealing code is down for the moment, but it may be reconnecting with the Internet, according to security researchers.
PC World - Acquia hopes to make a hosted version of its Drupal open-source content management system widely available in about three months, the company's CTO said Wednesday.
Macworld.com - On Wednesday, developer Amro Mousa from Return7 posted on Twitter that Apple has now added the ability for developers to schedule a sale window for their iPhone applications, allowing them to temporarily schedule a different price. Macworld has independently confirmed the new feature.
Zdrojový kód skriptu:
# 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