Skip to content

Commit

Permalink
Enable named file analysis for by_registrar.py
Browse files Browse the repository at this point in the history
  • Loading branch information
iay committed Nov 7, 2016
1 parent b21288b commit 95c836b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions charting/by_registrar.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from xml.dom.minidom import parse
from urllib import urlopen
from datetime import date
import sys

REGISTRAR_NAME = {

Expand Down Expand Up @@ -76,11 +77,14 @@ def display(infile, split):
print "%10s: %d" % (e[0], e[1])
print "%10s: %d" % ("other", sum([e[1] for e in rest_counts]))

cache_file = date.today().strftime("cache/%Y-%m.xml")
print "Most recent monthly UK federation production aggregate (%s):" % (cache_file)
display(cache_file, 9)
if len(sys.argv) == 2:
display(sys.argv[1], 9)
else:
cache_file = date.today().strftime("cache/%Y-%m.xml")
print "Most recent monthly UK federation production aggregate (%s):" % (cache_file)
display(cache_file, 9)

print
print

print "Current eduGAIN production aggregate:"
display(urlopen("http://mds.edugain.org/"), 9)
print "Current eduGAIN production aggregate:"
display(urlopen("http://mds.edugain.org/"), 9)

0 comments on commit 95c836b

Please sign in to comment.