From: djmcgrath Date: Sun, 25 Jan 2009 03:38:19 +0000 (+0000) Subject: * Use File::Basename to strip down the created_by entry for factpack.pl X-Git-Url: https://git.donarmstrong.com/?p=infobot.git;a=commitdiff_plain;h=318c1a8e6ebe1bf79c9488b15d1ce79d143a571a * Use File::Basename to strip down the created_by entry for factpack.pl git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1862 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/scripts/factpack.pl b/scripts/factpack.pl index c9f3151..6a6e60c 100755 --- a/scripts/factpack.pl +++ b/scripts/factpack.pl @@ -3,6 +3,7 @@ $| = 1; use strict; +use File::Basename; use vars qw($bot_base_dir $bot_src_dir $bot_misc_dir $bot_state_dir $bot_data_dir $bot_config_dir $bot_log_dir $bot_run_dir $bot_pid $memusage %param @@ -75,7 +76,7 @@ foreach (@ARGV) { ### TODO: check if it already exists. if so, don't add. ### TODO: combine 2 setFactInfo's into single &setFactInfo( $key, "factoid_value", $value ); - &setFactInfo( $key, "created_by", $file ); + &setFactInfo( $key, "created_by", basename($file) ); print ":: $key "; }