[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 Biblio.pm,1.15,1.16 test.pl,1.5,1.6
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/C4 Biblio.pm,1.15,1.16 test.pl,1.5,1.6 |
Date: |
Mon, 07 Oct 2002 07:04:31 -0700 |
Update of /cvsroot/koha/koha/C4
In directory usw-pr-cvs1:/tmp/cvs-serv6066
Modified Files:
Biblio.pm test.pl
Log Message:
road to 1.3.1 : viewing MARC biblio
Index: Biblio.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/Biblio.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** Biblio.pm 5 Oct 2002 09:49:25 -0000 1.15
--- Biblio.pm 7 Oct 2002 14:04:26 -0000 1.16
***************
*** 2,5 ****
--- 2,8 ----
# $Id$
# $Log$
+ # Revision 1.16 2002/10/07 14:04:26 tipaul
+ # road to 1.3.1 : viewing MARC biblio
+ #
# Revision 1.15 2002/10/05 09:49:25 arensb
# Merged with arensb-context branch: use C4::Context->dbh instead of
***************
*** 281,299 ****
}
$sth->execute;
! my ($lib,$tag,$res);
! while ( ($tag,$lib) = $sth->fetchrow) {
$res->{$tag}->{lib}=$lib;
}
if ($forlibrarian eq 1) {
! $sth=$dbh->prepare("select tagfield,tagsubfield,liblibrarian as lib
from marc_subfield_structure");
} else {
! $sth=$dbh->prepare("select tagfield,tagsubfield,libopac as lib from
marc_subfield_structure");
}
$sth->execute;
my $subfield;
! while ( ($tag,$subfield,$lib) = $sth->fetchrow) {
! $res->{$tag}->{$subfield}=$lib;
}
return $res;
--- 284,305 ----
}
$sth->execute;
! my ($lib,$tag,$res,$tab);
! while ( ($tag,$lib,$tab) = $sth->fetchrow) {
$res->{$tag}->{lib}=$lib;
+ $res->{$tab}->{tab}="";
}
if ($forlibrarian eq 1) {
! $sth=$dbh->prepare("select tagfield,tagsubfield,liblibrarian,tab as lib
from marc_subfield_structure");
} else {
! $sth=$dbh->prepare("select tagfield,tagsubfield,libopac,tab as lib from
marc_subfield_structure");
}
$sth->execute;
my $subfield;
! while ( ($tag,$subfield,$lib,$tab) = $sth->fetchrow) {
! $res->{$tag}->{$subfield}->{lib}=$lib;
! $res->{$tag}->{$subfield}->{tab}=$tab;
!
}
return $res;
Index: test.pl
===================================================================
RCS file: /cvsroot/koha/koha/C4/test.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** test.pl 5 Oct 2002 09:53:38 -0000 1.5
--- test.pl 7 Oct 2002 14:04:27 -0000 1.6
***************
*** 1,2 ****
--- 1,3 ----
+ #!/usr/bin/perl
package C4::test;
***************
*** 22,25 ****
--- 23,29 ----
use C4::Context;
use C4::Catalogue;
+ use C4::Biblio;
+ use MARC::Record;
+ use MARC::File::USMARC;
our $dbh = C4::Context->dbh;
***************
*** 53,62 ****
&MARCaddMarcBiblio($record2);
# parse all subfields
! my @fields = $record->fields();
! foreach my $field (@fields) {
! my @subf=$field->subfields;
! for my $i (0..$#subf) {
# print $field->tag(), " ", $field->indicator(1),$field->indicator(2),
"subf: ", $subf[$i][0]," =",$subf[$i][1]," <-- \n";
! }
! }
#print $record->as_formatted();
--- 57,75 ----
&MARCaddMarcBiblio($record2);
# parse all subfields
! #my @fields = $record->fields();
! #foreach my $field (@fields) {
! # my @subf=$field->subfields;
! # for my $i (0..$#subf) {
# print $field->tag(), " ", $field->indicator(1),$field->indicator(2),
"subf: ", $subf[$i][0]," =",$subf[$i][1]," <-- \n";
! #}
! #}
#print $record->as_formatted();
+ #my $file =
MARC::File::USMARC->in("/home/paul/courriers/koha/exemples_unimarc/env179.1.txt");
+ ## get a marc record from the MARC::File object
+ ## $record will be a MARC::Record object
+ #while (my $record = $file->next()) {
+ ## print the title contained in the record
+ # print $record->as_formatted(),"\n";
+ #}
+ ## we're done so close the file
+ # $file->close();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 Biblio.pm,1.15,1.16 test.pl,1.5,1.6,
Paul POULAIN <=
- Prev by Date:
[Koha-cvs] CVS: koha MARCdetail.pl,NONE,1.1 search.pl,1.13,1.14
- Next by Date:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/parameters marctagstructure.tmpl,NONE,1.1
- Previous by thread:
[Koha-cvs] CVS: koha MARCdetail.pl,NONE,1.1 search.pl,1.13,1.14
- Next by thread:
[Koha-cvs] CVS: koha/koha-tmpl/intranet-tmpl/default/en/parameters marctagstructure.tmpl,NONE,1.1
- Index(es):