From bugzilla-daemon@bugs.koha-community.org Tue Dec 4 00:23:14 2012 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 9202] New: TT plugin to allow direct display of MARC::Records Date: Mon, 03 Dec 2012 23:23:12 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3266087715030217127==" --===============3266087715030217127== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9202 Bug ID: 9202 Summary: TT plugin to allow direct display of MARC::Records Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: new feature Priority: P5 - low Component: Templates Assignee: jcamins@cpbibliography.com Reporter: jcamins@cpbibliography.com Given how central MARC is to Koha, it would be useful to be able to display MARC records directly in Template::Toolkit. -- You are receiving this mail because: You are watching all bug changes. --===============3266087715030217127==-- From bugzilla-daemon@bugs.koha-community.org Tue Dec 4 00:26:44 2012 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 9202] TT plugin to allow direct display of MARC::Records Date: Mon, 03 Dec 2012 23:26:44 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0741577721557821336==" --===============0741577721557821336== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9202 Jared Camins-Esakov changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes. --===============0741577721557821336==-- From bugzilla-daemon@bugs.koha-community.org Tue Dec 4 00:38:13 2012 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 9202] TT plugin to allow direct display of MARC::Records Date: Mon, 03 Dec 2012 23:38:12 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4710758490868420855==" --===============4710758490868420855== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9202 --- Comment #1 from Jared Camins-Esakov --- Created attachment 13863 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13863&action=edit Bug 9202: Add a MARC plugin for Template::Toolkit A Template::Toolkit plugin which given a MARC::Record object parses it into a hash that can be accessed directly in Template::Toolkit. === SYNOPSIS === [% USE record = MARC(mymarc) %]

[% record.f245.sa %]

[% record.f245.all %] [% FOREACH link IN record.f856s %] [% link.sy %] [% END %] [% FOREACH contents IN record.f505s %] [% FOREACH subf IN contents.subfields %] [% SWITCH subf.code %] [% CASE 'a' %] [% subf.value %] [% CASE 't' %] [% subf.value %] [% CASE 'r' %] [% subf.value %] [% END %] [% END %] [% END %] [% FOREACH subj IN record.f6xxs %] [% subj.sa %] [% END %] [% FOREACH field IN record.fields %] [% SWITCH field.tag %] [% CASE '600' %] Subject: [% field.all %] is what we are all about [% CASE '700' %] Co-author: [% field.all %], I presume? [% END %] [% END %] === ACCESSORS === By using some clever AUTOLOAD acrobatics, this plugin offers the user six types of accessors. ==== Direct accessors ==== [% record.f245.sa %] print $record->f245->sa; By prefixing field numbers with an 'f' and subfield codes with an 's', the first field/subfield with a given tag/code can be accessed. ==== Concatenated accessors ==== [% record.f245.all %] print $record->f245->all; A string consisting of all subfields concatenated together is accessible through the all member of field objects. ==== Subfield iterators ==== [% FOREACH subfield IN record.f245.subfields %] [% subfield.code %] = [% subfield.value %] [% END %] foreach my $subfield ($record->f245) { print $subfield->code, ' = ', $subfield->value; } Subfield iterators are accessible through the subfields member of field objects. ==== Field iterators ==== [% FOREACH field IN record.f500s %] [% field.all %] [% END %] foreach my $field ($record->f500s) { print $field->all; } Field iterators are accessible by adding an 's' to the end of field names: f500s, etc. ==== Section iterators ==== [% FOREACH field IN record.f5xxs %] [% field.all %] [% END %] foreach my $field ($record->f5xxs) { print $field->all; } All the fields in a section (identified by the first digit of the tag) can be accessed with 'fNxxs' and then iterated through. ==== Complete field list ==== [% FOREACH field IN record.fields %] [% field.all %] [% END %] foreach my $field ($record->fields) { print $field->all; } All the fields in a record can be accessed via the fields object method. -- You are receiving this mail because: You are watching all bug changes. --===============4710758490868420855==-- From bugzilla-daemon@bugs.koha-community.org Fri Dec 7 15:25:22 2012 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 9202] TT plugin to allow direct display of MARC::Records Date: Fri, 07 Dec 2012 14:25:10 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4855113733759149418==" --===============4855113733759149418== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9202 Kyle M Hall changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |kyle@bywatersolutions.com --- Comment #2 from Kyle M Hall --- 09:24 ~/kohaclone ((0573727...) $%)$ perl t/Template_Plugin_MARC.t 1..21 not ok 1 - use Koha::Template::Plugin::MARC; # Failed test 'use Koha::Template::Plugin::MARC;' # at t/Template_Plugin_MARC.t line 25. # Tried to use 'Koha::Template::Plugin::MARC'. # Error: Type of arg 1 to push must be array (not hash element) at /home/koha/kohaclone/Koha/Template/Plugin/MARC.pm line 225, near "$fieldobj;" # Type of arg 1 to push must be array (not hash element) at /home/koha/kohaclone/Koha/Template/Plugin/MARC.pm line 227, near "$fieldobj;" # Type of arg 1 to push must be array (not hash element) at /home/koha/kohaclone/Koha/Template/Plugin/MARC.pm line 228, near "$fieldobj;" # BEGIN not safe after errors--compilation aborted at /home/koha/kohaclone/Koha/Template/Plugin/MARC.pm line 296. # Compilation failed in require at (eval 12) line 2. # BEGIN failed--compilation aborted at (eval 12) line 2. ok 2 - load method returns correct class name ok 3 - Created expected object Undefined subroutine &Koha::Template::Plugin::MARC::marc called at t/Template_Plugin_MARC.t line 52. # Looks like you planned 21 tests but ran 3. # Looks like you failed 1 test of 3 run. # Looks like your test exited with 255 just after 3. -- You are receiving this mail because: You are watching all bug changes. --===============4855113733759149418==-- From bugzilla-daemon@bugs.koha-community.org Fri Dec 7 19:37:29 2012 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 9202] TT plugin to allow direct display of MARC::Records Date: Fri, 07 Dec 2012 18:37:25 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9221187763800906256==" --===============9221187763800906256== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9202 Jared Camins-Esakov changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. --===============9221187763800906256==-- From bugzilla-daemon@bugs.koha-community.org Fri Dec 7 19:37:30 2012 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 9202] TT plugin to allow direct display of MARC::Records Date: Fri, 07 Dec 2012 18:37:27 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0230360675259861156==" --===============0230360675259861156== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9202 Jared Camins-Esakov changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13863|0 |1 is obsolete| | --- Comment #3 from Jared Camins-Esakov --- Created attachment 13949 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13949&action=edit Bug 9202: Add a MARC plugin for Template::Toolkit A Template::Toolkit plugin which given a MARC::Record object parses it into a hash that can be accessed directly in Template::Toolkit. === SYNOPSIS === [% USE record = MARC(mymarc) %]

[% record.f245.sa %]

[% record.f245.all %] [% FOREACH link IN record.f856s %] [% link.sy %] [% END %] [% FOREACH contents IN record.f505s %] [% FOREACH subf IN contents.subfields %] [% SWITCH subf.code %] [% CASE 'a' %] [% subf.value %] [% CASE 't' %] [% subf.value %] [% CASE 'r' %] [% subf.value %] [% END %] [% END %] [% END %] [% FOREACH subj IN record.f6xxs %] [% subj.sa %] [% END %] [% FOREACH field IN record.fields %] [% SWITCH field.tag %] [% CASE '600' %] Subject: [% field.all %] is what we are all about [% CASE '700' %] Co-author: [% field.all %], I presume? [% END %] [% END %] === ACCESSORS === By using some clever AUTOLOAD acrobatics, this plugin offers the user six types of accessors. ==== Direct accessors ==== [% record.f245.sa %] print $record->f245->sa; By prefixing field numbers with an 'f' and subfield codes with an 's', the first field/subfield with a given tag/code can be accessed. ==== Concatenated accessors ==== [% record.f245.all %] print $record->f245->all; A string consisting of all subfields concatenated together is accessible through the all member of field objects. ==== Subfield iterators ==== [% FOREACH subfield IN record.f245.subfields %] [% subfield.code %] = [% subfield.value %] [% END %] foreach my $subfield ($record->f245) { print $subfield->code, ' = ', $subfield->value; } Subfield iterators are accessible through the subfields member of field objects. ==== Field iterators ==== [% FOREACH field IN record.f500s %] [% field.all %] [% END %] foreach my $field ($record->f500s) { print $field->all; } Field iterators are accessible by adding an 's' to the end of field names: f500s, etc. ==== Section iterators ==== [% FOREACH field IN record.f5xxs %] [% field.all %] [% END %] foreach my $field ($record->f5xxs) { print $field->all; } All the fields in a section (identified by the first digit of the tag) can be accessed with 'fNxxs' and then iterated through. ==== Complete field list ==== [% FOREACH field IN record.fields %] [% field.all %] [% END %] foreach my $field ($record->fields) { print $field->all; } All the fields in a record can be accessed via the fields object method. -- You are receiving this mail because: You are watching all bug changes. --===============0230360675259861156==-- From bugzilla-daemon@bugs.koha-community.org Fri Dec 7 19:47:05 2012 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 9202] TT plugin to allow direct display of MARC::Records Date: Fri, 07 Dec 2012 18:47:02 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6246527700368136082==" --===============6246527700368136082== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9202 Mirko Tietgen changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |mirko@abunchofthings.net -- You are receiving this mail because: You are watching all bug changes. --===============6246527700368136082==-- From bugzilla-daemon@bugs.koha-community.org Fri Dec 7 20:02:39 2012 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 9202] TT plugin to allow direct display of MARC::Records Date: Fri, 07 Dec 2012 19:02:35 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7281583938022078178==" --===============7281583938022078178== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9202 Jared Camins-Esakov changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. --===============7281583938022078178==-- From bugzilla-daemon@bugs.koha-community.org Fri Dec 7 20:02:40 2012 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 9202] TT plugin to allow direct display of MARC::Records Date: Fri, 07 Dec 2012 19:02:37 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1580135614403760460==" --===============1580135614403760460== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9202 Jared Camins-Esakov changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13949|0 |1 is obsolete| | --- Comment #4 from Jared Camins-Esakov --- Created attachment 13950 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13950&action=edit Bug 9202: Add a MARC plugin for Template::Toolkit A Template::Toolkit plugin which given a MARC::Record object parses it into a hash that can be accessed directly in Template::Toolkit. === SYNOPSIS === [% USE record = MARC(mymarc) %]

[% record.f245.sa %]

[% record.f245.all %] [% FOREACH link IN record.f856s %] [% link.sy %] [% END %] [% FOREACH contents IN record.f505s %] [% FOREACH subf IN contents.subfields %] [% SWITCH subf.code %] [% CASE 'a' %] [% subf.value %] [% CASE 't' %] [% subf.value %] [% CASE 'r' %] [% subf.value %] [% END %] [% END %] [% END %] [% FOREACH subj IN record.f6xxs %] [% subj.sa %] [% END %] [% FOREACH field IN record.fields %] [% SWITCH field.tag %] [% CASE '600' %] Subject: [% field.all %] is what we are all about [% CASE '700' %] Co-author: [% field.all %], I presume? [% END %] [% END %] === ACCESSORS === By using some clever AUTOLOAD acrobatics, this plugin offers the user six types of accessors. ==== Direct accessors ==== [% record.f245.sa %] print $record->f245->sa; By prefixing field numbers with an 'f' and subfield codes with an 's', the first field/subfield with a given tag/code can be accessed. ==== Concatenated accessors ==== [% record.f245.all %] print $record->f245->all; A string consisting of all subfields concatenated together is accessible through the all member of field objects. ==== Subfield iterators ==== [% FOREACH subfield IN record.f245.subfields %] [% subfield.code %] = [% subfield.value %] [% END %] foreach my $subfield ($record->f245) { print $subfield->code, ' = ', $subfield->value; } Subfield iterators are accessible through the subfields member of field objects. ==== Field iterators ==== [% FOREACH field IN record.f500s %] [% field.all %] [% END %] foreach my $field ($record->f500s) { print $field->all; } Field iterators are accessible by adding an 's' to the end of field names: f500s, etc. ==== Section iterators ==== [% FOREACH field IN record.f5xxs %] [% field.all %] [% END %] foreach my $field ($record->f5xxs) { print $field->all; } All the fields in a section (identified by the first digit of the tag) can be accessed with 'fNxxs' and then iterated through. ==== Complete field list ==== [% FOREACH field IN record.fields %] [% field.all %] [% END %] foreach my $field ($record->fields) { print $field->all; } All the fields in a record can be accessed via the fields object method. -- You are receiving this mail because: You are watching all bug changes. --===============1580135614403760460==-- From bugzilla-daemon@bugs.koha-community.org Sun Dec 9 01:19:03 2012 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 9202] TT plugin to allow direct display of MARC::Records Date: Sun, 09 Dec 2012 00:18:58 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8009174589216856556==" --===============8009174589216856556== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9202 Mirko Tietgen changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13950|0 |1 is obsolete| | --- Comment #5 from Mirko Tietgen --- Created attachment 13964 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13964&action=edit Bug 9202: Add a MARC plugin for Template::Toolkit A Template::Toolkit plugin which given a MARC::Record object parses it into a hash that can be accessed directly in Template::Toolkit. === SYNOPSIS === [% USE record = MARC(mymarc) %]

[% record.f245.sa %]

[% record.f245.all %] [% FOREACH link IN record.f856s %] [% link.sy %] [% END %] [% FOREACH contents IN record.f505s %] [% FOREACH subf IN contents.subfields %] [% SWITCH subf.code %] [% CASE 'a' %] [% subf.value %] [% CASE 't' %] [% subf.value %] [% CASE 'r' %] [% subf.value %] [% END %] [% END %] [% END %] [% FOREACH subj IN record.f6xxs %] [% subj.sa %] [% END %] [% FOREACH field IN record.fields %] [% SWITCH field.tag %] [% CASE '600' %] Subject: [% field.all %] is what we are all about [% CASE '700' %] Co-author: [% field.all %], I presume? [% END %] [% END %] === ACCESSORS === By using some clever AUTOLOAD acrobatics, this plugin offers the user six types of accessors. ==== Direct accessors ==== [% record.f245.sa %] print $record->f245->sa; By prefixing field numbers with an 'f' and subfield codes with an 's', the first field/subfield with a given tag/code can be accessed. ==== Concatenated accessors ==== [% record.f245.all %] print $record->f245->all; A string consisting of all subfields concatenated together is accessible through the all member of field objects. ==== Subfield iterators ==== [% FOREACH subfield IN record.f245.subfields %] [% subfield.code %] = [% subfield.value %] [% END %] foreach my $subfield ($record->f245) { print $subfield->code, ' = ', $subfield->value; } Subfield iterators are accessible through the subfields member of field objects. ==== Field iterators ==== [% FOREACH field IN record.f500s %] [% field.all %] [% END %] foreach my $field ($record->f500s) { print $field->all; } Field iterators are accessible by adding an 's' to the end of field names: f500s, etc. ==== Section iterators ==== [% FOREACH field IN record.f5xxs %] [% field.all %] [% END %] foreach my $field ($record->f5xxs) { print $field->all; } All the fields in a section (identified by the first digit of the tag) can be accessed with 'fNxxs' and then iterated through. ==== Complete field list ==== [% FOREACH field IN record.fields %] [% field.all %] [% END %] foreach my $field ($record->fields) { print $field->all; } All the fields in a record can be accessed via the fields object method. Signed-off-by: Mirko Tietgen -- You are receiving this mail because: You are watching all bug changes. --===============8009174589216856556==-- From bugzilla-daemon@bugs.koha-community.org Sun Dec 9 01:20:26 2012 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 9202] TT plugin to allow direct display of MARC::Records Date: Sun, 09 Dec 2012 00:20:23 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1596095080585197325==" --===============1596095080585197325== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9202 Mirko Tietgen changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes. --===============1596095080585197325==-- From bugzilla-daemon@bugs.koha-community.org Fri Dec 21 01:06:00 2012 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 9202] TT plugin to allow direct display of MARC::Records Date: Fri, 21 Dec 2012 00:05:47 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8545619303943922469==" --===============8545619303943922469== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=3D9202 Jared Camins-Esakov changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |RESOLVED Resolution|--- |INVALID --- Comment #6 from Jared Camins-Esakov --- After discussion with Chris and some folks on the #evergreen IRC channel, I have decided that this feature is better as a standalone CPAN module and not built directly into Koha. I am in the process of uploading it, and will packa= ge it for Debian as well. --=20 You are receiving this mail because: You are watching all bug changes. --===============8545619303943922469==-- From bugzilla-daemon@bugs.koha-community.org Sat Feb 9 12:03:11 2013 From: bugzilla-daemon@bugs.koha-community.org To: koha-bugs@lists.koha-community.org Subject: [Koha-bugs] [Bug 9202] TT plugin to allow direct display of MARC::Records Date: Sat, 09 Feb 2013 11:03:03 +0000 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0599626529328044172==" --===============0599626529328044172== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9202 Magnus Enger changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@enger.priv.no --- Comment #7 from Magnus Enger --- Just for the record, the module is now on CPAN as Template::Plugin::MARC: http://search.cpan.org/dist/Template-Plugin-MARC/lib/Template/Plugin/MARC.pm -- You are receiving this mail because: You are watching all bug changes. --===============0599626529328044172==--