]> git.donarmstrong.com Git - infobot.git/commitdiff
* Use File::Basename to strip down the created_by entry for factpack.pl
authordjmcgrath <djmcgrath@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 25 Jan 2009 03:38:19 +0000 (03:38 +0000)
committerdjmcgrath <djmcgrath@c11ca15a-4712-0410-83d8-924469b57eb5>
Sun, 25 Jan 2009 03:38:19 +0000 (03:38 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1862 c11ca15a-4712-0410-83d8-924469b57eb5

scripts/factpack.pl

index c9f3151c38556ce5c79c56fec4f5b8c56476c0db..6a6e60c282524ece08497039f4966f6fb8091c29 100755 (executable)
@@ -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 ";
     }