del.icio.us twitter mashup

by Doug Finke on April 29, 2007

in Mashup,PowerShell,del.icio.us,twitter

Using PowerShell

Create a simple container, loop over it and get a mashup of today’s activities on del.icio.us and twitter.

Future posts will show how to save this data.

Copy and paste into a PowerShell Console

$mashup = @{
    delicious = {
      $url = “http://del.icio.us/rss/popular/”
      New-Object Net.WebClient |
      ForEach {
        ([xml]$_.DownloadString($url)).rdf.item |
         select title |
         add-member -pass noteproperty feed “delicious” } }

    twitter = {
      $url = “http://twitter.com/statuses/public_timeline.rss”
      New-Object Net.WebClient |
      ForEach {
       ([xml]$_.DownloadString($url)).rss.channel.item |
        select title |
        add-member -pass noteproperty feed “twitter” } }
}

Then this

$mashup.GetEnumerator() | ForEach {& $_.Value} | Format-Table -a feed, title

RSS mashup result

feed           title
—-            —–
delicious     tlbox – Web Design Tools
delicious     SmugBlog: Don MacAskill » Blog Archive » The
delicious     How to install Ubuntu (Feisty Fawn) in OS X
twitter        Matthew W Selznick: @Flyswatter: I was twitter
twitter        Joshua Hatfield: I might have a small I just
twitter        Dan Kogai: Mac – CotEditor?twitter Matthew W
twitter        Jody: I’m chatting at Monache.com…..
twitter        Larry Tomlinson: Watching The Last Samurai

{ 1 trackback }

Development in a Blink » Blog Archive » Using PowerShell and Digg
05.02.07 at 8:30 pm

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>