$sth_auth->execute();
while( my $row = $sth_auth->fetchrow_hashref ) {
+ if ( $row->{department} !~ m/Filozofski fakultet u Zagrebu/ ) {
+ push @{ $skip->{nije_ffzg} }, $row;
+ next;
+ }
$auth_header->{ $row->{authid} } = $row->{full_name};
- $row->{department} =~ s/, Filozofski fakultet u Zagrebu\s*// || next;
+ $row->{department} =~ s/, Filozofski fakultet u Zagrebu.*$//;
$row->{department} =~ s/^.+\.\s*//;
- push @{ $auth_department->{ $row->{department} } }, $row->{authid};
# warn dump( $row );
+ push @{ $auth_department->{ $row->{department} } }, $row->{authid};
push @authors, $row;
}
close($dep_fh);
rename 'html/departments/index.new', 'html/departments/index.html';
+my $azvo_stat;
+
+foreach my $department ( sort keys %$department_category_author ) {
+ foreach my $category ( sort keys %{ $department_category_author->{$department} } ) {
+ foreach my $authid ( @{ $department_category_author->{$department}->{$category} } ) {
+ foreach my $type ( keys %{ $authors->{$authid} } ) {
+ next unless exists $authors->{$authid}->{$type}->{$category};
+ $azvo_stat->{ $department }->{ $category }->{ $type } += $#{ $authors->{$authid}->{$type}->{$category} } + 1;
+ }
+ }
+ }
+}
+
+debug 'azvo_stat' => $azvo_stat;
+
+=for later
+open(my $fh, '>', 'html/azvo.new');
+
+
+
+close($fh);
+rename 'html/azvo.new', 'html/azvo.html';
+=cut
+