X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=html.pl;h=661423d6e9fab457866f625053eef268ae4b4c49;hb=0cdbd10b14a8e99c23973238c47238c81b11f7ec;hp=994570cbc20581fef8870d4a5f567ab9a1b637ea;hpb=eaa3b686bea886e4c15d2850f2a0d5fa3489870c;p=koha-bibliografija diff --git a/html.pl b/html.pl index 994570c..661423d 100755 --- a/html.pl +++ b/html.pl @@ -12,6 +12,8 @@ use locale; use Text::Unaccent; use Carp qw(confess); use utf8; +use JSON; +use POSIX qw(strftime); use lib '/srv/koha_ffzg'; use C4::Context; @@ -239,12 +241,14 @@ while( my $row = $sth_select_authors->fetchrow_hashref ) { if ( ! defined $data->{year} ) { warn "MISSING year in ", $row->{biblionumber}; +=for remove-year-limit } elsif ( $data->{year} < 2008 ) { push @{ $skip->{year_lt_2008} }, $row->{biblionumber}; next; } elsif ( $data->{year} > 2013 ) { push @{ $skip->{year_gt_2013} }, $row->{biblionumber}; next; +=cut } # warn "# ", $row->{biblionumber}, " data ",dump($data); @@ -350,13 +354,17 @@ sub html_title { |, join(" ", @_), qq| + |; } sub html_end { - return qq|\n\n|; + return + qq|Zadnji puta osvježeno: |, + strftime("%Y-%m-%d %H:%M:%S\n", localtime()), + qq|\n\n|; } mkdir 'html' unless -d 'html'; @@ -370,7 +378,7 @@ debug 'authors' => \@authors; sub li_biblio { my ($biblionumber) = @_; - return qq|
  • |, + return qq|
  • |, qq|$biblionumber|, biblioitem_html($biblionumber), qq|edit|, @@ -386,7 +394,7 @@ sub author_html { foreach my $category ( sort keys %{ $authors->{$authid}->{$type} } ) { my $label = $category_label->{$category} || 'Bez kategorije'; - print $fh qq|

    $label

    \n