aboutsummaryrefslogtreecommitdiff
path: root/scripts/ripe-to-csv.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2010-10-26 17:23:27 +0000
committerRob Austein <sra@hactrn.net>2010-10-26 17:23:27 +0000
commite23dab52b6b7eef868bfbee2842aa6fc924050cc (patch)
tree35b143375cbb4bc5f0f9e4b8518f488b2490e575 /scripts/ripe-to-csv.py
parenta490df50b7a2d230a38be9823280c308631c4414 (diff)
AWK appears to run an order of magnitude faster than Python for this task, sigh.
svn path=/scripts/ripe-to-csv.awk; revision=3493
Diffstat (limited to 'scripts/ripe-to-csv.py')
-rw-r--r--scripts/ripe-to-csv.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/ripe-to-csv.py b/scripts/ripe-to-csv.py
index 59bfdc25..e04473d9 100644
--- a/scripts/ripe-to-csv.py
+++ b/scripts/ripe-to-csv.py
@@ -21,7 +21,7 @@ the terms and conditions referenced by the data file header comments.
$Id$
-Copyright (C) 2009 Internet Systems Consortium ("ISC")
+Copyright (C) 2009-2010 Internet Systems Consortium ("ISC")
Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -70,7 +70,7 @@ class Handle(dict):
self.check()
class aut_num(Handle):
- want_tags = ("aut-num", "mnt-by", "as-name")
+ want_tags = ("aut-num", "mnt-by") # "as-name"
def set(self, tag, val):
if tag == "aut-num" and val.startswith("AS"):
@@ -79,21 +79,21 @@ class aut_num(Handle):
def finish(self, ctx):
if self.check():
- ctx.asns.writerow((self["as-name"], self["mnt-by"], self["aut-num"]))
+ ctx.asns.writerow((self["mnt-by"], self["aut-num"]))
class inetnum(Handle):
- want_tags = ("inetnum", "mnt-by", "netname", "status")
+ want_tags = ("inetnum", "netname", "status") # "mnt-by"
def finish(self, ctx):
if self.check() and self["status"] in self.want_status:
- ctx.prefixes.writerow((self["netname"], self["mnt-by"], self["inetnum"]))
+ ctx.prefixes.writerow((self["netname"], self["inetnum"]))
class inet6num(Handle):
- want_tags = ("inet6num", "mnt-by", "netname", "status")
+ want_tags = ("inet6num", "netname", "status") # "mnt-by"
def finish(self, ctx):
if self.check() and self["status"] in self.want_status:
- ctx.prefixes.writerow((self["netname"], self["mnt-by"], self["inet6num"]))
+ ctx.prefixes.writerow((self["netname"], self["inet6num"]))
class main(object):