2 use strict; use warnings;
4 use OpenILS::Utils::Fieldmapper;
5 use OpenSRF::Utils::SettingsClient;
7 OpenSRF::System->bootstrap_client(config_file => $ARGV[0]);
8 Fieldmapper->import(IDL => OpenSRF::Utils::SettingsClient->new->config_value("IDL"));
10 my $map = $Fieldmapper::fieldmap;
12 # if a true value is provided, we generate the web (light) version of the fieldmapper
14 if(!$web) { $web = ""; }
18 aou au perm_ex ex aout
19 mvr ccs ahr aua ac actscecm cbreb acpl
20 cbrebi acpn acp acnn acn bren asc asce
21 clfm cifm citm cam ahtc
24 crcd crmf crrf mbts aoc aus
25 mous mobts mb ancc cnct cnal
28 my @reports = qw/ perm_ex ex ao aou aout /;
31 print "var _c = {};\n";
33 for my $object (keys %$map) {
35 my $hint = $map->{$object}->{hint};
37 if($web eq "web_core") {
38 next unless (grep { $_ eq $hint } @web_core );
41 if($web eq "reports") {
42 next unless (grep { $_ eq $hint } @web_core );
46 my $short_name = $map->{$object}->{hint};
49 for my $field (keys %{$map->{$object}->{fields}}) {
50 my $position = $map->{$object}->{fields}->{$field}->{position};
51 $fields[$position] = $field;
54 print "_c[\"$short_name\"] = [";
56 if( $f ne "isnew" and $f ne "ischanged" and $f ne "isdeleted" ) {
65 print "fmclasses = _c;\n";