X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2FinsertDB.pl;fp=scripts%2FinsertDB.pl;h=0000000000000000000000000000000000000000;hb=24ceaefd4ef0fb9100d60261f260233613611aab;hp=1206414f4fb904726e52586357fbb8310e09bf8f;hpb=65e65b7db41d16db1a009bf21ee5210e47a1ca73;p=infobot.git diff --git a/scripts/insertDB.pl b/scripts/insertDB.pl deleted file mode 100755 index 1206414..0000000 --- a/scripts/insertDB.pl +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/perl -w - -$| = 1; - -use strict; - -require "src/core.pl"; -require "src/logger.pl"; -require "src/modules.pl"; -require "src/Factoids/DBCommon.pl"; - -&loadConfig( $bot_config_dir . "/infobot.config" ); -&loadDBModules(); - -unless (@_) { - print "hrm.. usage\n"; - exit 0; -} - -foreach (@_) { - next unless ( -f $_ ); - - open( IN, $_ ) or die "error: cannot open $_\n"; - print "Opened $_ for input...\n"; - - print "inserting... "; - while () { - next unless (/^(.*?) => (.*)$/); - - ### TODO: check if it already exists. if so, don't add. - &setFactInfo( $1, "factoid_value", $2 ); - print ":: $1 "; - } - - close IN; -} - -# vim:ts=4:sw=4:expandtab:tw=80