3 use lib '../src/perlmods/lib/';
4 use lib '../src/perlmods/lib/OpenILS/Utils/';
6 use OpenSRF::Utils::JSON;
8 use OpenILS::Utils::ScriptRunner;
9 use OpenSRF::Utils::Logger;
10 use OpenSRF::Utils::SettingsClient;
11 use OpenSRF::EX qw(:try);
12 use Fieldmapper (IDL => 'fm_IDL.xml');
16 Usage: $0 /openils-root-dir script.js
20 my $root = shift(@ARGV);
22 OpenSRF::System->bootstrap_client( config_file => $root.'/conf/opensrf_core.xml');
25 OpenILS::Utils::ScriptRunner->add_path($root.'/var/web/opac/common/js/');
26 OpenILS::Utils::ScriptRunner->add_path('../src/javascript/backend/libs/');
27 OpenILS::Utils::ScriptRunner->add_path('./');
29 print OpenSRF::Utils::JSON->perl2JSON( OpenILS::Utils::ScriptRunner->new( file => shift(@ARGV) )->run );
30 #print OpenSRF::Utils::JSON->perl2JSON( OpenILS::Utils::ScriptRunner->new->run( shift(@ARGV) ) );