Added 'update_ilines.sh' which will generate CH and LI I lines on demand. Let's not cron this yet :)

git-svn-id: svn+ssh://svn.ipng.nl/usr/share/subversion/repositories/ircnet.ipng.ch@3 c5d60b8d-fdcb-4146-b734-af4215e9eb71
This commit is contained in:
ircnet
2009-09-03 19:34:55 +00:00
parent 3c76560cc2
commit d69333744b
4 changed files with 27 additions and 7 deletions

View File

@ -1,6 +1,6 @@
# File generated on Tue Sep 1 19:35:11 2009 by ircd@ubuntu
# Commandline: /home/ircd/ripedb-ilines/ilines.py -i /home/ircd/ripedb-ilines/delegated-ripencc-latest -o ilines.ch.conf -c ch -y 200
# input=/home/ircd/ripedb-ilines/delegated-ripencc-latest output=ilines.ch.conf country=CH class=200
# File generated on Thu Sep 3 21:32:27 2009 by ircd@ircnet
# Commandline: ./ilines.py -i delegated-ripencc-latest -o ilines.ch.7911 -y 200 -c ch
# input=delegated-ripencc-latest output=ilines.ch.7911 country=CH class=200
# First line: 2|ripencc|1251756421|56709|00000000|20090831|+0200
# $Id: $

View File

@ -1,6 +1,6 @@
# File generated on Tue Sep 1 19:34:50 2009 by ircd@ubuntu
# Commandline: /home/ircd/ripedb-ilines/ilines.py -i /home/ircd/ripedb-ilines/delegated-ripencc-latest -o ilines.li.conf -c li -y 202
# input=/home/ircd/ripedb-ilines/delegated-ripencc-latest output=ilines.li.conf country=LI class=202
# File generated on Thu Sep 3 21:32:27 2009 by ircd@ircnet
# Commandline: ./ilines.py -i delegated-ripencc-latest -o ilines.li.7911 -y 202 -c li
# input=delegated-ripencc-latest output=ilines.li.7911 country=LI class=202
# First line: 2|ripencc|1251756421|56709|00000000|20090831|+0200
# $Id: $

View File

@ -102,7 +102,7 @@ def main():
assert False, "Input file version is not '2'"
ofile.write("# First line: %s\n" % line)
ofile.write("# $Id: $\n\n\n")
ofile.write("#\n\n")
output_linecount = 0
for line in ifile.readlines():

20
ripedb/update_ilines.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/sh
INPUT="delegated-ripencc-latest"
do_country()
# $1=country $2=class $3=threshold
{
./ilines.py -i $INPUT -o ilines.$1.$$ -y $2 -c $1
[ ! -r ilines.$1.$$ ] && return -1
[ `wc -l ilines.$1.$$ | awk '{ print $1 }'` -lt $3 ] && {
echo "$1: File too short, less than $3 lines"
return -2
}
mv ilines.$1.$$ ../include/ilines.$1.conf
return 0
}
do_country ch 200 1000
do_country li 202 15