#!/usr/bin/python3
# Copyright (c) 2016 Eric Eisenhart
# This software is released under an MIT-style license.
# See LICENSE.md for full details.

import sys
import pprint
import feedparser
import argparse
feedparser.PREFERRED_XML_PARSERS.remove('drv_libxml2')

# 0 is command itself:
if len(sys.argv) == 2:
  feed_url = sys.argv[1]
  feed_data = feedparser.parse(feed_url)
  # depth=1 because we can't handle anything deeper
  pp = pprint.PrettyPrinter(indent=4, depth=1)
  pp.pprint(feed_data.entries[0])  
else:
  print("Give me 1 feed URL on the command-line, and I'll give the first entry from it.")

Add helper tool to help with examining entries in a feed.
Add helper tool to help with examining entries in a feed.
