timbroder
10/21/2011 - 9:09 PM

gistfile1.py

 #normalize data for output
 for entry in feed.entry:
  #get link for template
  entry.my_link = entry.link[0].href
  
  #id for links
  entry.my_id = curr_id
  curr_id -= 1
  
  #format published date
  dt = DateTime.ISO.ParseDateTimeUTC(entry.published.text)
  entry.my_date = dt.strftime('%m/%d/%Y')
  entry.my_time = dt.strftime('%I:%M %p')