# HG changeset patch # User Daniel O'Connor # Date 1250825759 -34200 # Node ID f2e0787f52b87d015f6d7e8c2e8d833c311a4b7d # Parent c4188feb8f2672c65ed17d6b36e323ea860499b7 Tidy up output to be clearer. - Don't bother the user with XML errors & lack of asset tags. - Print a header for the channel & series lists. - Inform the user how to navigate the menus. diff -r c4188feb8f26 -r f2e0787f52b8 iview.py --- a/iview.py Thu Aug 20 17:35:27 2009 +0930 +++ b/iview.py Fri Aug 21 13:05:59 2009 +0930 @@ -87,10 +87,10 @@ try: self.series.append(Series(s)) except ExpatError: - print "Unable to parse XML, skipping" + #print "Unable to parse XML, skipping" continue except NoAsset: - print "No asset tag, skipping" + #print "No asset tag, skipping" continue class IView(object): diff -r c4188feb8f26 -r f2e0787f52b8 iviewget.py --- a/iviewget.py Thu Aug 20 17:35:27 2009 +0930 +++ b/iviewget.py Fri Aug 21 13:05:59 2009 +0930 @@ -14,6 +14,7 @@ def listChannels(iview): i = 1 + print "===================== Channel List =====================" print "Id %-30s %-35s" % ('Name', 'Description') for c in iview.channels: print "%2d %-30s %-35s" % (i, c.name, c.descr) @@ -21,6 +22,7 @@ def listSeries(chan): i = 1 + print "===================== Series List =====================" for s in chan.series: if len(s.title) > 1: title = s.title[1] @@ -83,7 +85,7 @@ chan = None listChannels(iview) while True: - print "Please select a channel number (0 to exit): ", + print "Please select a channel number (0 to start downloading): ", i = getInt(sys.stdin) if i != None and i >= 0 and i <= len(iview.channels): break @@ -98,7 +100,9 @@ listSeries(chan) while True: - print "Please select which series to download (space separated numbers):" + print + print "Please select which series to download (space separated numbers)" + print " or 0 to exit to channel menu: ", res = sys.stdin.readline() for r in res.split(): try: