perl.perl4lib https://www.nntp.perl.org/group/perl.perl4lib/ ... Copyright 1998-2025 perl.org Sun, 27 Apr 2025 21:23:29 +0000 ask@perl.org clustering module (2 messages) Greetings,<br/><br/>which module you would suggest one should use, in order to be able to<br/>create<br/><br/>clusters of the contents of a tag?<br/><br/>Mostly i guess one should use the key collision fingerprint method...<br/><br/>I plan to use https://metacpan.org/pod/Text::Fingerprint<br/><br/>but i would appreciate if anyone has a better idea,<br/><br/>thank you<br/> https://www.nntp.perl.org/group/perl.perl4lib/2018/05/msg3193.html Sat, 19 May 2018 13:03:31 +0000 Converting XML to MARC without reading a file? (12 messages) Hi -<br/><br/>I&#39;m pulling records from the WorldCat Search API in MARCXML, and need to<br/>convert them to binary MARC for further evaluation, which I&#39;ll do via<br/>MARC::Record.<br/><br/>Problem: Converting from MARCXML via MARC::File::XML seems to require<br/>reading the records from a file. I&#39;ve already got the XML stored in a<br/>variable, retrieved via LWP::Simple-&gt;get().<br/><br/>Do I have to write the XML to a file, then read it in again to convert it?<br/>Or am I just missing something obvious?<br/><br/>I&#39;ve tried things like:<br/>$xml = get($api_call); # also verified that $xml now contains MARCXML for 1<br/>or more records<br/>my $batch = MARC::File::XML-&gt;in($xml);<br/>while (my $record = $batch-&gt;next()) {<br/> print $record;<br/>}<br/>but I get the error: Can&#39;t call method &quot;next&quot; on an undefined value<br/><br/>Thanks --Andy<br/> https://www.nntp.perl.org/group/perl.perl4lib/2018/04/msg3181.html Thu, 19 Apr 2018 00:25:28 +0000 create a script out of many perl commands (1 message) perl script_one.pl file.txt<br/><br/>perl script_two.pl<br/><br/>perl script_three.pl<br/><br/>command file_one.log file_two.log<br/><br/>a perl one liner<br/><br/>for example<br/><br/>perl -lpe &#39;s/\s*$//&#39;<br/><br/>How could i combine all the above in a bash script?<br/><br/>i work on an ubuntu 16.04 machine<br/><br/>I have tried with the &amp;&amp; in linux, but i got errors<br/><br/>Thank you in advance for any help<br/> https://www.nntp.perl.org/group/perl.perl4lib/2017/07/msg3180.html Tue, 18 Jul 2017 09:00:53 +0000 MARC::Record 2.0.7 and MARC::File::XML 1.0.5 released (1 message) Hi,<br/><br/>I have uploaded MARC::Record 2.0.7 and MARC::File::XML 1.0.5 to CPAN.<br/>Both are minor bugfix and packaging update releases.<br/><br/>Here are the changes to MARC::Record:<br/><br/>2.0.7 Tue May 23 20:41:13 EDT 2017<br/> [FIXES]<br/> - RT#108123: clean up MANIFEST.SKIP<br/> - GH#1: marcdump now prints warnings (Johann Rolschewski)<br/> - remove a reference to SourceForge<br/> - fix a reference to the per4lib mailing list<br/><br/>And to MARC::File::XML (note that 1.0.4 is not publicly indexed in<br/>CPAN due to a change in how PAUSE validates distribution names):<br/><br/>1.0.5 Tue May 23 21:24:18 EDT 2017<br/> - adjust name of distribution to avoid colliding with<br/> MARC-XML, as PAUSE now enforces distribution name<br/> matching more strictly<br/><br/>1.0.4 Tue May 23 21:05:58 EDT 2017 (unreleased)<br/> - RT#111473: fix warning upon reaching end of XML<br/> stream (Johann Rolschewski)<br/> - remove extraneous diag from a test script (Florian Schlichting)<br/><br/>Regards,<br/><br/>Galen<br/>-- <br/>Galen Charlton<br/>gmcharlt@gmail.com<br/> https://www.nntp.perl.org/group/perl.perl4lib/2017/05/msg3179.html Wed, 24 May 2017 01:25:22 +0000 Job announcement - Systems Librarian (1 message) Skidmore College seeks a creative, user-oriented Systems Librarian to oversee library tools and systems that support collection maintenance and use, as well as related library and resource sharing services. The Systems Librarian will take a leadership role in implementing, maintaining, supporting, and enhancing a wide range of technologies and systems, and, in collaboration with key library staff and other campus partners, will investigate methods and best practices for assessing collections, patron experience, and library effectiveness. The College is particularly interested in candidates from underrepresented backgrounds and candidates who have had experience working with students from underserved populations. <br/> <br/> <br/> <br/>Based in the Lucy Scribner Library and reporting to the College Librarian, the Systems Librarian holds a 12-month contract and, as a non-tenured faculty member, participates in shared governance at the college. <br/> <br/> <br/> <br/>Scribner Library is looking for someone who is able to develop and administer a comprehensive technology plan that guides the library&#39;s adoption of next generation library systems. Projects on the horizon include transitioning to a new integrated library system, enhancing or replacing our digital collections platform, improving our library website, and improving or replacing our discovery services. <br/> <br/> <br/> <br/>Scope of Duties <br/> <br/>? Administer, maintain, and optimize library systems related to both in-house and consortial activities including, but not limited to, the integrated library system, discovery layer, electronic resource management tool, digital collections platform, interlibrary loan applications, institutional repository, and other resource sharing tools and platforms <br/> <br/>? Ensure accessibility to and stability of the library&#39;s online information resources and digital collections. Provide technical expertise for problem resolution <br/> <br/>? Oversee the functioning and maintenance of the library website, and provide leadership for future upgrades <br/> <br/>? Participate in analysis and assessment in order to determine patron satisfaction with library collections, services, and consortial arrangements <br/> <br/>? Collaborate with consortial partners on both an ongoing and as-needed basis (e.g., ConnectNY, New York 6, Eastern Academic Scholars&#39; Trust) <br/> <br/>? Perform regular periodic data analysis and migration between library systems. Assist and guide others to create and use effective reports for analysis <br/> <br/>? Develop, maintain, and document programs and scripts that extend system functionality and automate routine tasks <br/> <br/>? Collaborate closely with IT and library staff to ensure seamless service to users <br/> <br/>? Participate in reference and instruction/departmental liaison activities in line with the successful candidate&#39;s strengths, interests, and institutional needs <br/> <br/>? Demonstrate professional engagement and scholarship required for advancement through library faculty ranks <br/> <br/> <br/> <br/>Required Qualifications <br/> <br/>ALA-accredited MLS/MLIS, or equivalent education and experience. Advanced knowledge of emerging technologies and their impact on academic libraries. Demonstrated proficiency in at least one programming language, preferably Perl, experience with SQL, and experience working in a command line environment. Working knowledge of an integrated library system and discovery service. Practical familiarity with cataloging and metadata structures and relevant tools for data manipulation. Excellent analytical, organizational, and project management skills. Adeptness at problem-solving, and disposition to share technical knowledge with others. Ability to work as part of a team, as well as independently and flexibly in a changing environment. Highly effective communication and interpersonal skills <br/> <br/> <br/> <br/>Desired Qualifications <br/> <br/>Two years&#39; experience supporting an integrated library system, platforms, and software in an academic library setting. Familiarity with Voyager, Ebsco Discovery, WorldShare Management Services, WorldCat, ILLiad, Ares, EZProxy, CONTENTdm, BePress Digital Commons, authority control (Library Technologies, Inc.), Joomla. Experience transitioning major library systems. <br/> <br/> <br/>Review of applications begins May 1st and will continue until the position is filled. <br/>To learn more about and apply for this position please visit us online at: <br/>https://careers.skidmore.edu/applicants/Central?quickFind=58025 <br/>Skidmore College is committed to being an inclusive campus community and, as an Equal Opportunity Employer, does not discriminate in its hiring or employment practices on the basis of race, color, creed, religion, gender, age, national or ethnic origin, physical or mental disability, military or veteran status, marital status, sex, sexual orientation, gender identity or expression, genetic information, predisposition or carrier status, domestic violence victim status, familial status, dating violence, or stalking, or any other category protected by applicable federal, state or local laws. <br/>Employment at Skidmore College is contingent upon an acceptable background check result. <br/>CREATIVE THOUGHT MATTERS. <br/> <br/> <br/>Yvonne Kester <br/>Library Systems Analyst <br/>Lucy Scribner Library <br/>Skidmore College <br/>518-580-5518 <br/>pronouns: she/her/hers <br/>why it matters: http://sites.miis.edu/cacsresources/2016/02/29/gender-pronouns-and-a-young-womans-career/ <br/> <br/> https://www.nntp.perl.org/group/perl.perl4lib/2017/04/msg3178.html Tue, 25 Apr 2017 14:21:02 +0000 Re: split a huge json file in separate per object files (1 message) I haven&#39;t actually used the module, but I&#39;d at least take a look at<br/>JSON::Path.<br/>It&#39;s like XPath, but for JSON. I *have* used JSONpath before, just not in<br/>Perl. If you&#39;re interested in JSONPath, check out<br/>http://goessner.net/articles/JsonPath/.<br/><br/>On Fri, Mar 10, 2017 at 8:57 AM, Marios lyberak &lt;marios.lyberak@gmail.com&gt;<br/>wrote:<br/><br/>&gt; Hello community,<br/>&gt;<br/>&gt; i have a json file, with a structure like this:<br/>&gt;<br/>&gt; {<br/>&gt; &quot;106&quot; : {<br/>&gt; &quot;id54011&quot; : [<br/>&gt; {<br/>&gt; &quot;partno1&quot; : &quot;16690617&quot;<br/>&gt; },<br/>&gt; {<br/>&gt; &quot;partno2&quot; : &quot;5899180&quot;<br/>&gt; }<br/>&gt; ],<br/>&gt; &quot;parts&quot; : [<br/>&gt; &quot;0899180&quot;,<br/>&gt; &quot;16920617&quot;<br/>&gt; ],<br/>&gt; &quot;id5632&quot; : [<br/>&gt; {<br/>&gt; &quot;partno1&quot; : &quot;090699180&quot;<br/>&gt; }<br/>&gt; ]<br/>&gt; },<br/>&gt; &quot;560&quot; : {<br/>&gt; &quot;id9452&quot; : [<br/>&gt; {<br/>&gt; &quot;partno2&quot; : &quot;1569855&quot;<br/>&gt; }<br/>&gt; ],<br/>&gt; &quot;parts&quot; : [<br/>&gt; &quot;03653624&quot;,<br/>&gt; &quot;15899855&quot;<br/>&gt; ],<br/>&gt; &quot;id578&quot; : [<br/>&gt; {<br/>&gt; &quot;partno3&quot; : &quot;0366393624&quot;<br/>&gt; },<br/>&gt; {<br/>&gt; &quot;partno4&quot; : &quot;0363213624&quot;<br/>&gt; }<br/>&gt; ]<br/>&gt; }<br/>&gt; }<br/>&gt; I need to split this json, into files, like this:<br/>&gt;<br/>&gt; each json file, will consist of one object. 000106.json, and 000560.json.<br/>&gt; (all names, must gave 6 digits, so zeros must be added)<br/>&gt;<br/>&gt; I have tried to use eval for this, but no luck up to now...<br/>&gt;<br/>&gt; expected output: json file 1, named 000106.json:<br/>&gt;<br/>&gt; {<br/>&gt; &quot;106&quot; : {<br/>&gt; &quot;id54011&quot; : [<br/>&gt; {<br/>&gt; &quot;partno1&quot; : &quot;16690617&quot;<br/>&gt; },<br/>&gt; {<br/>&gt; &quot;partno2&quot; : &quot;5899180&quot;<br/>&gt; }<br/>&gt; ],<br/>&gt; &quot;parts&quot; : [<br/>&gt; &quot;0899180&quot;,<br/>&gt; &quot;16920617&quot;<br/>&gt; ],<br/>&gt; &quot;id5632&quot; : [<br/>&gt; {<br/>&gt; &quot;partno1&quot; : &quot;090699180&quot;<br/>&gt; }<br/>&gt; ]<br/>&gt; }<br/>&gt; and json file 2, named 000560.json:<br/>&gt;<br/>&gt; {<br/>&gt; &quot;560&quot; : {<br/>&gt; &quot;id9452&quot; : [<br/>&gt; {<br/>&gt; &quot;partno2&quot; : &quot;1569855&quot;<br/>&gt; }<br/>&gt; ],<br/>&gt; &quot;parts&quot; : [<br/>&gt; &quot;03653624&quot;,<br/>&gt; &quot;15899855&quot;<br/>&gt; ],<br/>&gt; &quot;id578&quot; : [<br/>&gt; {<br/>&gt; &quot;partno3&quot; : &quot;0366393624&quot;<br/>&gt; },<br/>&gt; {<br/>&gt; &quot;partno4&quot; : &quot;0363213624&quot;<br/>&gt; }<br/>&gt; ]<br/>&gt; }<br/>&gt; How would you handle this?<br/>&gt;<br/><br/><br/><br/>-- <br/>*Justin Rittenhouse*<br/>*Senior Application Development Technician, **Information Technology*<br/>*Hesburgh Libraries*<br/><br/>208 Hesburgh Library<br/>*o:* 574-631-3065<br/>*e: *jrittenh@nd.edu<br/><br/>&lt;http://library.nd.edu/&gt;<br/> https://www.nntp.perl.org/group/perl.perl4lib/2017/04/msg3177.html Thu, 13 Apr 2017 13:40:51 +0000 Getting started with Z39.50 (4 messages) Hello all....I haven&#39;t posted here for a long time, but have been doing lots of interesting stuff with MARC/Perl.... <br/>I would like to know an easy way to get started with Z39.50. (For example, how to get MARC records from the LC, NLM, etc. servers)Anyone have some program segments they would be willing to share? <br/>Thanks for your time and help. <br/>&nbsp;===Charles P. Hobbs cph1776@yahoo.com&nbsp;Author of _Hidden History of Transportation in Los Angeles_ (History Press) http://www.morethanredcars.com https://www.nntp.perl.org/group/perl.perl4lib/2017/04/msg3173.html Thu, 06 Apr 2017 20:44:38 +0000 split a huge json file in separate per object files (2 messages) Hello community,<br/><br/>i have a json file, with a structure like this:<br/><br/>{<br/>&quot;106&quot; : {<br/> &quot;id54011&quot; : [<br/> {<br/> &quot;partno1&quot; : &quot;16690617&quot;<br/> },<br/> {<br/> &quot;partno2&quot; : &quot;5899180&quot;<br/> }<br/> ],<br/> &quot;parts&quot; : [<br/> &quot;0899180&quot;,<br/> &quot;16920617&quot;<br/> ],<br/> &quot;id5632&quot; : [<br/> {<br/> &quot;partno1&quot; : &quot;090699180&quot;<br/> }<br/> ]<br/> },<br/> &quot;560&quot; : {<br/> &quot;id9452&quot; : [<br/> {<br/> &quot;partno2&quot; : &quot;1569855&quot;<br/> }<br/> ],<br/> &quot;parts&quot; : [<br/> &quot;03653624&quot;,<br/> &quot;15899855&quot;<br/> ],<br/> &quot;id578&quot; : [<br/> {<br/> &quot;partno3&quot; : &quot;0366393624&quot;<br/> },<br/> {<br/> &quot;partno4&quot; : &quot;0363213624&quot;<br/> }<br/> ]<br/> }<br/>}<br/>I need to split this json, into files, like this:<br/><br/>each json file, will consist of one object. 000106.json, and 000560.json.<br/>(all names, must gave 6 digits, so zeros must be added)<br/><br/>I have tried to use eval for this, but no luck up to now...<br/><br/>expected output: json file 1, named 000106.json:<br/><br/> {<br/> &quot;106&quot; : {<br/> &quot;id54011&quot; : [<br/> {<br/> &quot;partno1&quot; : &quot;16690617&quot;<br/> },<br/> {<br/> &quot;partno2&quot; : &quot;5899180&quot;<br/> }<br/> ],<br/> &quot;parts&quot; : [<br/> &quot;0899180&quot;,<br/> &quot;16920617&quot;<br/> ],<br/> &quot;id5632&quot; : [<br/> {<br/> &quot;partno1&quot; : &quot;090699180&quot;<br/> }<br/> ]<br/> }<br/>and json file 2, named 000560.json:<br/><br/>{<br/> &quot;560&quot; : {<br/> &quot;id9452&quot; : [<br/> {<br/> &quot;partno2&quot; : &quot;1569855&quot;<br/> }<br/> ],<br/> &quot;parts&quot; : [<br/> &quot;03653624&quot;,<br/> &quot;15899855&quot;<br/> ],<br/> &quot;id578&quot; : [<br/> {<br/> &quot;partno3&quot; : &quot;0366393624&quot;<br/> },<br/> {<br/> &quot;partno4&quot; : &quot;0363213624&quot;<br/> }<br/> ]<br/> }<br/>How would you handle this?<br/> https://www.nntp.perl.org/group/perl.perl4lib/2017/03/msg3171.html Fri, 10 Mar 2017 13:57:56 +0000 identify ISSN numbers in an mrc file (6 messages) Hello community,<br/><br/>how would you treat the following?<br/><br/>I need a way to identify all tags - subfields, that have stored an ISSN<br/>number in them.<br/><br/>What would you suggest as a clever approach for this?<br/><br/>Thank you<br/> https://www.nntp.perl.org/group/perl.perl4lib/2016/11/msg3165.html Wed, 02 Nov 2016 08:57:20 +0000 creating an index of files contents (2 messages) hello community,<br/><br/>Say we have the following structure in our filesystem:<br/><br/>dir1<br/>dir2<br/>dir3<br/>dir4<br/><br/>dir stands for directory of course.<br/><br/>In dir1, there is a file1.txt that has in it numbers, like below<br/><br/>6576576 898798789 5645436549 76567576576 876876876876<br/><br/>Same goes for dir2. In dir2, there is a file2.txt, that has in it numbers,<br/>like below<br/><br/>6576576 89879878963 56454365492 765675765763 8768768768765<br/><br/>And so with all the rest of the folders.<br/>What we need to do, is have a new file (like an index) out of all<br/>directories and files values, like below:<br/><br/>dir1;6576576,898798789,5645436549,76567576576,876876876876<br/>dir2;6576576,89879878963,56454365492,765675765763,8768768768765<br/><br/>And secondly, another index file, which will have the reverse info<br/><br/>6576576;dir1,dir2<br/><br/>Any ideas on how would you approach this?<br/><br/>Best<br/> https://www.nntp.perl.org/group/perl.perl4lib/2016/09/msg3163.html Fri, 23 Sep 2016 06:49:03 +0000 scripts imported into dancer (2 messages) Hello great minds,<br/><br/>not a perl hacker, so please bare with my questions...<br/><br/>i am trying to make my work served via Dancer. I have many scripts, that i<br/>run in the console:<br/><br/>perl somecommand filetobeprocessed.mrc<br/><br/>and then in the folder i ran the command, i get the result file.<br/><br/>My question is how i could improve this process,<br/><br/>a) how i could combine all scripts that take as input the same input file<br/>into a Dancer application.<br/><br/>When the last script finishes with creating the last output file, then i<br/>guess Dancer will redirect to another page, where one could download all<br/>output (produced) files.<br/><br/>b) in order to know when all scripts are finished, i need to use promises?<br/><br/>I would love to hear your pro approach, and if possible, if you could point<br/>me to a prototype dancer web app that works like this...<br/><br/>c) last, if you had any suggestions, on how i should arrange the folders in<br/>this web app, for example where it would be best to keep the input mrc<br/>files, where to keep the code, where to store the output files...<br/><br/>Looking forward to your collective wisdom answers,<br/><br/>Cheers<br/> https://www.nntp.perl.org/group/perl.perl4lib/2016/09/msg3161.html Sat, 10 Sep 2016 13:41:05 +0000 Save the date: Mashcat meeting in Atlanta, Georgia, 24 January 2017 (1 message) We are excited to announce that the second face-to-face Mashcat event<br/>in North America will be held on January 24th, 2017, in downtown<br/>Atlanta, Georgia, USA. We invite you to save the date. We will be<br/>sending out a call for session proposals and opening up registration<br/>in the late summer and early fall.<br/><br/>Not sure what Mashcat is? &quot;Mashcat&quot; was originally an event in the UK<br/>in 2012 aimed at bringing together people working on the IT systems<br/>side of libraries with those working in cataloguing and metadata. Four<br/>years later, Mashcat is a loose group of metadata specialists,<br/>cataloguers, developers and anyone else with an interest in how<br/>metadata in and around libraries can be created, manipulated, used and<br/>re-used by computers and software. The aim is to work together and<br/>bridge the communications gap that has sometimes gotten in the way of<br/>building the best tools we possibly can to manage library data. Among<br/>our accomplishments in 2016 was holding the first North American<br/>face-to-face event in Boston in January and running webinars. If<br/>you&#39;re unable to attend a face-to-face meeting, we will be holding at<br/>least one more webinar in 2016.<br/><br/>To learn more about Mashcat, visit http://mashcat.info.<br/><br/>Thanks for considering, and we hope to see you in January.<br/><br/>-- <br/>Galen Charlton<br/>gmcharlt@gmail.com<br/> https://www.nntp.perl.org/group/perl.perl4lib/2016/07/msg3160.html Tue, 12 Jul 2016 22:41:59 +0000 MARC::Spec and Catmandu::Fix::MARCspec (1 message) Dear list members! <br/> <br/>I like to announce the release of my first two Perl projects: <br/> <br/> <br/>&middot; MARC::Spec [1] parses a MARCspec [2] as string or can be used to build MARCspec objects. <br/> <br/>&middot; Catmandu::Fix::marc_spec [3] is a MARCspec interpreter for Catmandu [4]. <br/> <br/>Any comments and questions are welcome! Additional tests would be nice. Please report bugs at [5] and [6]. <br/> <br/>Cheers! <br/> <br/>Carsten <br/> <br/>[1] MARC::Spec - A MARCspec parser and builder &lt;https://metacpan.org/pod/MARC::Spec&gt; <br/>[2] MARCspec - A common MARC record path language &lt;http://marcspec.github.io/MARCspec/&gt; <br/>[3] Catmandu::Fix::marc_spec - reference MARC values via MARCspec - A common MARC record path language &lt;https://metacpan.org/pod/Catmandu::Fix::marc_spec&gt; <br/>[4] Catmandu - the data processing toolkit http://librecat.org/ <br/>[5] &lt;https://github.com/MARCspec/MARC-Spec/issues&gt; <br/>[6] &lt;https://github.com/cKlee/Catmandu-Fix-marc_spec/issues&gt; <br/> <br/> <br/>_______________________________________________ <br/>Carsten Klee <br/>Abt. &Uuml;berregionale Bibliographische Dienste IIE <br/>Staatsbibliothek zu Berlin - Preu&szlig;ischer Kulturbesitz <br/>Potsdamer Stra&szlig;e 33 <br/>10785 Berlin <br/> <br/>Fon: +49 30 266-43 44 02 <br/>Fax: +49 30 266-33 40 01 <br/>carsten.klee@sbb.spk-berlin.de <br/>www.zeitschriftendatenbank.de <br/> https://www.nntp.perl.org/group/perl.perl4lib/2016/07/msg3159.html Tue, 12 Jul 2016 07:27:10 +0000 identify encoding from a file (4 messages) &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; <br/>&lt;TABLE NAME=&quot;LIBGROUP.DB&quot;&gt; <br/> &lt;FIELDS COUNT=&quot;8&quot;&gt; <br/> &lt;FIELD TYPE=&quot;ftSmallint&quot; SIZE=&quot;2&quot;&gt;GroupID&lt;/FIELD&gt; <br/> &lt;FIELD TYPE=&quot;ftString&quot; SIZE=&quot;51&quot;&gt;GroupName&lt;/FIELD&gt; <br/> &lt;FIELD TYPE=&quot;ftSmallint&quot; SIZE=&quot;2&quot;&gt;Borrow&lt;/FIELD&gt; <br/> &lt;FIELD TYPE=&quot;ftSmallint&quot; SIZE=&quot;2&quot;&gt;BorrowDuration&lt;/FIELD&gt; <br/> &lt;FIELD TYPE=&quot;ftSmallint&quot; SIZE=&quot;2&quot;&gt;Reserve&lt;/FIELD&gt; <br/> &lt;FIELD TYPE=&quot;ftSmallint&quot; SIZE=&quot;2&quot;&gt;ReserveDuration&lt;/FIELD&gt; <br/> &lt;FIELD TYPE=&quot;ftSmallint&quot; SIZE=&quot;2&quot;&gt;Prolong&lt;/FIELD&gt; <br/> &lt;FIELD TYPE=&quot;ftSmallint&quot; SIZE=&quot;2&quot;&gt;ProlongDuration&lt;/FIELD&gt; <br/> &lt;/FIELDS&gt; <br/> &lt;INDICES COUNT=&quot;2&quot;&gt; <br/> &lt;PRIMARY&gt; <br/> &lt;FIELD&gt;GroupID&lt;/FIELD&gt; <br/> &lt;/PRIMARY&gt; <br/> &lt;INDEX NAME=&quot;libgroup-gropuname-idx&quot;&gt; <br/> &lt;FIELD&gt;GroupName&lt;/FIELD&gt; <br/> &lt;/INDEX&gt; <br/> &lt;/INDICES&gt; <br/> &lt;DATA RECORDS=&quot;6&quot;&gt; <br/> &lt;RECORD ID=&quot;1&quot;&gt; <br/> &lt;GROUPID&gt;2&lt;/GROUPID&gt; <br/> &lt;GROUPNAME&gt;Unlimited&lt;/GROUPNAME&gt; <br/> &lt;BORROW&gt;-1&lt;/BORROW&gt; <br/> &lt;BORROWDURATION&gt;-1&lt;/BORROWDURATION&gt; <br/> &lt;RESERVE&gt;-1&lt;/RESERVE&gt; <br/> &lt;RESERVEDURATION&gt;-1&lt;/RESERVEDURATION&gt; <br/> &lt;PROLONG&gt;-1&lt;/PROLONG&gt; <br/> &lt;PROLONGDURATION&gt;-1&lt;/PROLONGDURATION&gt; <br/> &lt;/RECORD&gt; <br/> &lt;RECORD ID=&quot;2&quot;&gt; <br/> &lt;GROUPID&gt;3&lt;/GROUPID&gt; <br/> &lt;GROUPNAME&gt;Typical&lt;/GROUPNAME&gt; <br/> &lt;BORROW&gt;5&lt;/BORROW&gt; <br/> &lt;BORROWDURATION&gt;2&lt;/BORROWDURATION&gt; <br/> &lt;RESERVE&gt;3&lt;/RESERVE&gt; <br/> &lt;RESERVEDURATION&gt;1&lt;/RESERVEDURATION&gt; <br/> &lt;PROLONG&gt;5&lt;/PROLONG&gt; <br/> &lt;PROLONGDURATION&gt;3&lt;/PROLONGDURATION&gt; <br/> &lt;/RECORD&gt; <br/> &lt;RECORD ID=&quot;3&quot;&gt; <br/> &lt;GROUPID&gt;4&lt;/GROUPID&gt; <br/> &lt;GROUPNAME&gt;Can&#39;t charge&lt;/GROUPNAME&gt; <br/> &lt;BORROW&gt;0&lt;/BORROW&gt; <br/> &lt;BORROWDURATION&gt;0&lt;/BORROWDURATION&gt; <br/> &lt;RESERVE&gt;5&lt;/RESERVE&gt; <br/> &lt;RESERVEDURATION&gt;5&lt;/RESERVEDURATION&gt; <br/> &lt;PROLONG&gt;0&lt;/PROLONG&gt; <br/> &lt;PROLONGDURATION&gt;0&lt;/PROLONGDURATION&gt; <br/> &lt;/RECORD&gt; <br/> &lt;RECORD ID=&quot;4&quot;&gt; <br/> &lt;GROUPID&gt;5&lt;/GROUPID&gt; <br/> &lt;GROUPNAME&gt;Can&#39;t reserve&lt;/GROUPNAME&gt; <br/> &lt;BORROW&gt;5&lt;/BORROW&gt; <br/> &lt;BORROWDURATION&gt;15&lt;/BORROWDURATION&gt; <br/> &lt;RESERVE&gt;0&lt;/RESERVE&gt; <br/> &lt;RESERVEDURATION&gt;0&lt;/RESERVEDURATION&gt; <br/> &lt;PROLONG&gt;5&lt;/PROLONG&gt; <br/> &lt;PROLONGDURATION&gt;15&lt;/PROLONGDURATION&gt; <br/> &lt;/RECORD&gt; <br/> &lt;RECORD ID=&quot;5&quot;&gt; <br/> &lt;GROUPID&gt;7&lt;/GROUPID&gt; <br/> &lt;GROUPNAME&gt;&#x321;&#x89F4;&#x772;&lt;/GROUPNAME&gt; <br/> &lt;BORROW&gt;5&lt;/BORROW&gt; <br/> &lt;BORROWDURATION&gt;10&lt;/BORROWDURATION&gt; <br/> &lt;RESERVE&gt;1&lt;/RESERVE&gt; <br/> &lt;RESERVEDURATION&gt;3&lt;/RESERVEDURATION&gt; <br/> &lt;PROLONG&gt;1&lt;/PROLONG&gt; <br/> &lt;PROLONGDURATION&gt;5&lt;/PROLONGDURATION&gt; <br/> &lt;/RECORD&gt; <br/> &lt;RECORD ID=&quot;6&quot;&gt; <br/> &lt;GROUPID&gt;8&lt;/GROUPID&gt; <br/> &lt;GROUPNAME&gt;&#x2A1;&#x89E3;&#x7D1D;&lt;/GROUPNAME&gt; <br/> &lt;BORROW&gt;5&lt;/BORROW&gt; <br/> &lt;BORROWDURATION&gt;10&lt;/BORROWDURATION&gt; <br/> &lt;RESERVE&gt;2&lt;/RESERVE&gt; <br/> &lt;RESERVEDURATION&gt;3&lt;/RESERVEDURATION&gt; <br/> &lt;PROLONG&gt;2&lt;/PROLONG&gt; <br/> &lt;PROLONGDURATION&gt;10&lt;/PROLONGDURATION&gt; <br/> &lt;/RECORD&gt; <br/> &lt;/DATA&gt; <br/>&lt;/TABLE&gt; https://www.nntp.perl.org/group/perl.perl4lib/2016/02/msg3155.html Sat, 06 Feb 2016 12:39:50 +0000 MARC/Perl moved to GitHub; GitHub perl4lib organization (1 message) Hi,<br/><br/>I have moved the main repository for MARC/Perl [1] from SourceForge to<br/>GitHub; it can now be found at<br/><br/>https://github.com/perl4lib/marc-perl<br/><br/>In the process of doing this, I have created a &quot;perl4lib&quot; organization<br/>in GitHub. Anybody who maintains a project coded in Perl that is<br/>relevant to libraries is welcome to use this organization as a &quot;home&quot;<br/>for their Git repositories. I am also seeking folks who are willing<br/>to act as co-owners of the organization; at present the owners are:<br/><br/>* Galen Charlton<br/>* Francis Kayiwa<br/><br/>If you are interested, please get in touch with me.<br/><br/>[1] I.e., MARC::Record, MARC::File::XML, MARC::Lint, MARC::Charset,<br/>and MARC::File::MiJ<br/><br/>Regards,<br/><br/>Galen<br/>-- <br/>Galen Charlton<br/>gmcharlt@gmail.com<br/> https://www.nntp.perl.org/group/perl.perl4lib/2016/01/msg3154.html Mon, 18 Jan 2016 16:40:48 +0000 Call for testers: next release of Net::OAI::Harvester Perl modulemay break legacy custom handlers (1 message) -----BEGIN PGP SIGNED MESSAGE-----<br/>Hash: SHA1<br/><br/>[Apologies for cross-posting]<br/><br/>The Perl module Net::OAI::Harvester implements a client framework for<br/>the OAI Protocol for Metadata Harvesting (OAI-PMH) and was authored<br/>and originally maintained by Ed Summers. It has been available on<br/>CPAN ever since 2003 and its last stable version 1.15 has been<br/>released almost four years ago:<br/> &lt; http://search.cpan.org/~thb/OAI-Harvester-1.15/ &gt;.<br/><br/>Since one of the repositories used for testing vanished from the web<br/>some time ago and this is breaking the test suite a new version has<br/>to be released fairly soon.<br/><br/>Over time I had been tackling various minor issues and published<br/>developer releases on CPAN, cf. the list at the end of this mail<br/>or the Changes document linked at the CPAN page for the current<br/>release 1.16_12: &lt; http://search.cpan.org/~thb/OAI-Harvester-1.16_12/ &gt;<br/><br/>However the sum of these changes is not negligible and specifically<br/>their impact on &quot;custom metadata handlers&quot; (which are to be used when<br/>processing other metadata formats than oai_dc) may affect<br/>applications using the module:<br/><br/>&gt;&gt;&gt;&gt;&gt;<br/>Up to version 1.15 the metadataHandler was inconsistently fed with input<br/>:<br/><br/> - GetRecord exposed the almost complete XML response to the Handler<br/> (including start_document/end_document events)<br/> - ListRecords exposed the (OAI)record element (header, metadata and<br/> optional about containers) but did not propagate start_document or<br/> end_document events.<br/><br/>In both cases the events for the header tags itself and for the optional<br/>setSpec subelements had not been forwarded<br/><br/>Version 1.20 introduces a modified behavior for metadataHandler and an<br/>additional recordHandler:<br/> - a metadataHandler will see only the (single) subelement of the OAI<br/> metadata element (so for an deleted record it might never be invoced<br/> at all)<br/> - a recordHandler will see the OAI record element and its subelements<br/><br/>Therefore a metadataHandler will now be confined to the metadata<br/>fragment(s) of the response, and the new recordHandler approximates the<br/>old behavior of ListRecords, however OAI-PMH:identifier and<br/>OAI-PMH:datestamp will now be properly encapsulated within their<br/>OAI-PMH:header element.<br/><br/>Additionally, two new methods responseDate() and request() allow access<br/>to the corresponding top-level OAI-PMH elements in all response types.<br/>A SAX filter of class Net::OAI::Record::DocumentHelper may be used to<br/>inject start_document and end_document events into the chain if they<br/>are needed.<br/><br/>As a temporary measure, you may set<br/> $Net::OAI::Harvester::OLDmetadataHandler =1<br/>to change the behavior of handlers passed as &quot;metadataHandler&quot; into<br/>that of a recordHandler.<br/>&lt;&lt;&lt;&lt;&lt;&lt;<br/><br/>Obviously the change of semantics for a metadataHandler to deal with the<br/>&quot;metadata&quot; elements of the response instead of the &quot;record&quot; elements<br/>is a design decision and may be questioned by users of the module.<br/><br/>The current version also contains several changes which solve<br/>deficiencies of Net::OAI::Harvester 1.15 but possibly break existing<br/>workarounds for these deficiencies. For example officially (per<br/>documentation) you never could acccess<br/>the responseDate of the OAI-PMH result, but due to a sloppy<br/>implementation of processing for the identify verb it was possible to<br/>extract it in this case by an undocumented method. The current version<br/>supplies a dedicated responseDate() accessor for all verbs but at the<br/>same time fixes the behavior in the identify case.<br/><br/>I may be overly optimistic but my impression is that the changes between<br/>the current 1.15 and the coming version (most probably numbered 1.20)<br/>do actually fix many issues but the fear is realistic (I experienced<br/>that myself with an old application of mine using the module) that<br/>these fixes may conflict with workarounds introduced by users to make<br/>things work before.<br/><br/> ***<br/><br/>So please, if you are currently using Net::OAI::Harvester *and* had<br/>been forced to introduce workarounds or tweak internals of the module,<br/>perform thorough testing before upgrading to the coming stable<br/>version, preferably already now with the developer version 1.16_12.<br/><br/>And, please, please: provide feedback if you should run into trouble,<br/>either via the CPAN request tracker for the module at<br/>&lt; https://rt.cpan.org/Public/Dist/Display.html?Name=OAI-Harvester &gt;<br/>or by direct mail.<br/><br/>Sorry for the inconvenience<br/>viele Gruesse<br/>Thomas Berger<br/><br/><br/>Changes to Net::OAI::Harvester since version 1.15<br/><br/>1.16_12 Tue, Jan 12 00:20:05 CET 2016<br/>- - dealing with CPANTS Kwalitee issues, esp. version number mess<br/>- - new filter class Net::OAI::Record::DocumentHelper for tweaking<br/><br/>1.16_11 Tue, Jan 12 00:20:05 CET 2016<br/>- - minor cleanup<br/><br/>1.16_10 Mon, Jan 11 01:29:46 CET 2016<br/>- - renamed alldata() method for accessing recordHandler results<br/> to recorddata()<br/>- - better propagation of namespace prefix mapping events<br/>- - Net::OAI::NamespaceFilter with a result() method<br/>- - Net::OAI::NamespaceFilter tested with XML::SAX::Writer<br/>- - AUTHOR formatting<br/><br/>1.16_09 Sun, Feb 14 17:29:39 CET 2014<br/>- - Net::OAI::NamespaceFilter as kind of generic metadata handler<br/>- - Queries are now constructed basing on a copy of the Harvester&#39;s<br/> baseURL<br/>- - pass parameters to URI-&gt;query_form() more reproducably,<br/> (esp. &quot;verb&quot; should now always be first to accommodate some<br/> allegedly broken repositories)<br/>- - temporary? tests for correctness of LWP operations<br/><br/>1.16_07 Tue, Apr 30 01:26:40 CEST 2013<br/>- - added new methods: response(), responseDate(), error()<br/>- - Smoke still tests failed on &#39;Bad Host&#39; tests (wrong error codes<br/> induced by HTTP proxies?)<br/>- - aligned behavior of metadataHandler for listRecords() and<br/> getRecord()<br/>- - introducing alternative recordHandler for listRecords() and<br/> getRecord()<br/>- - removed erroneous resumptionToken handling for identify()<br/><br/>1.16_04 Fri Dec 7 09:49:03 CET 2012<br/>- - consider HTTP proxies in design of t/003.error.t<br/>- - &#39;Bad Host&#39; tests failing b/c error code 500 is not the expected<br/> code 404 (due to some recent change in LWP)?<br/><br/>1.16_01 Mon Apr 2 23:14:35 CEST 2012<br/>- - Modules were not namespace aware.<br/>- - Add HTTPRetryAfter() method (catches HTTP Retry-After header)<br/>- - Check responses for Content-Type and charset before parsing<br/>- - Net::OAI::Header handed up (empty) header elements and other stuff<br/> to the request&#39;s metadataHandler<br/>- - SKIP tests when HTTP errors are encountered<br/><br/>-----BEGIN PGP SIGNATURE-----<br/>Version: GnuPG v1<br/>Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/<br/><br/>iJwEAQECAAYFAlaY2iYACgkQYhMlmJ6W47MMCwP/Yhij11TfEL1dfYtimdXG8hkf<br/>FYLvvXECzECPxKbHIC0dKvf5v4myW8oedlK3B+oOzIjjOY60pT7pdC4KB/xgU+a1<br/>N1djewSgT4hJ3IoacmUkLpnh81NSM1oA0osw48qVco4qpxDOY2HrR3bdBZksKBcI<br/>lQH10kIYqo/TZYGXHYQ=<br/>=v03A<br/>-----END PGP SIGNATURE-----<br/> https://www.nntp.perl.org/group/perl.perl4lib/2016/01/msg3153.html Fri, 15 Jan 2016 11:38:32 +0000 Opening & writing to UTF-8 files; copyright symbol again --solution (6 messages) I should probably say, &quot;apparent solution&quot; &#39;cause character set issues never seem to end. <br/> <br/>However, combining Jon Gorman&#39;s recommendation with some Googling, I get: <br/> <br/>my $outfile=&#39;4788022.edited.bib&#39;; <br/>open (my $output_marc, &#39;&gt;&#39;, $outfile) or die &quot;Couldn&#39;t open file $!&quot; ; <br/>binmode($output_marc, &#39;:utf8&#39;); <br/> <br/>The open statement may not be quite correct, as I am not familiar with the more current techniques for opening file handles that John mentioned. However, when I use those instructions to open the output file rather than what I had before, the copyright symbol does indeed come across as C2 A9 as it was in the original record. I didn&#39;t want to use the utf8, because I&#39;ve tried that before and ended up with double-encoding (and a real mess). But I&#39;ll continue testing. <br/> <br/>The results of the googling I referred to can be found at: https://groups.google.com/forum/#!topic/perl.perl4lib/sy7hqiBQ1yM <br/> <br/> <br/>Anne L. Highsmith <br/>Director, Consortia Systems <br/>TAMU Libraries <br/>5000 TAMU <br/>College Station, TX 77843-5000 <br/>979 862 4234 <br/>hismith@tamu.edu <br/> <br/> https://www.nntp.perl.org/group/perl.perl4lib/2015/11/msg3147.html Fri, 13 Nov 2015 22:05:13 +0000 Opening & writing to UTF-8 files; copyright symbol again (3 messages) This is related to my previous post (9/17/2015) about deleting 035 fields after RDA-ification. Jon Gorman solved that one for me by pointing out that I probably had a problem with my perl libraries. <br/> <br/>But now, instead of creating the record from the database and writing it back to the database, I am reading from a file exported from my database, which is UTF-8. Specifically, the blasted copyright symbol again. As stored in the database, the copyright symbol is encoded as C2 A9, which if I read the tables correctly, is the correct UTF-8 encoding for copyright. But when I read the record from a file and write it back to the file after deleting the problematic 035, the encoding for the copyright symbol has been turned into A9. <br/> <br/>This &quot;transformation&quot; happens both when running the perl program on my pc and on the unix server. Interestingly, complicated Unicode seems to be okay. I took a record with Hebrew vernacular characters and edited it using my program, then ran the source record and target record through xxd. I then diffed the files; it showed no difference. But the before and after of the record that has the copyright symbol munges the copyright by stripping the C2. <br/> <br/>Here&#39;s the program. If anybody can tell my what I&#39;m doing wrong I&#39;d really appreciate it. <br/>---------------------------------------------------------------------------------------------------------- <br/>use strict; <br/>use warnings; <br/>use MARC::Record; <br/>use MARC::Batch; <br/>my $infile=&#39;4788022.bib&#39;; <br/>my $batch = MARC::Batch-&gt;new(&#39;USMARC&#39;,&quot;$infile&quot;); <br/>my $outfile=&#39;4788022.edited.bib&#39;; <br/>open(OUTPUT, &quot;&gt;$outfile&quot;); <br/> <br/>while (my $record = $batch-&gt;next) { <br/> my $f001 = $record-&gt;field(&#39;001&#39;); <br/> my $bib_id = $f001-&gt;as_string(); <br/> <br/> my @a035 = $record-&gt;field(&#39;035&#39;); <br/> foreach my $f035 (@a035) { <br/> if (my $f035a = $f035-&gt;subfield(&#39;a&#39;)) { <br/> if ($f035a eq $bib_id) { <br/> $record-&gt;delete_field($f035); <br/> } <br/> } <br/> } <br/> print OUTPUT $record-&gt;as_usmarc(); <br/>} <br/> <br/> <br/> <br/>Anne L. Highsmith <br/>Director, Consortia Systems <br/>TAMU Libraries <br/>5000 TAMU <br/>College Station, TX 77843-5000 <br/>979 862 4234 <br/>hismith@tamu.edu <br/> https://www.nntp.perl.org/group/perl.perl4lib/2015/11/msg3144.html Fri, 13 Nov 2015 20:01:43 +0000 Editing marc records; program exits with Encode.pm error oncopyright symbol (2 messages) https://www.nntp.perl.org/group/perl.perl4lib/2015/09/msg3142.html Thu, 17 Sep 2015 18:53:45 +0000 script help list all files in folders and subfolders (2 messages) Hello friendly folks,<br/><br/>i would appreciate any help on the following:<br/><br/>say we have a folder with thousands of html files. Since the file browser<br/>crashes, i am looking at making a script that would do the following:<br/>Distribute all html files in folders, say 001, 002, 003, etc, sorted by the<br/>html files&#39; names. Then, i would like to create an index also an html file,<br/>that would exist in each folder, containing links to all the folder&#39;s<br/>stored html files. Also, if possible, a general index in the parent folder,<br/>that would allow for a tree like showing the directories as links, and in a<br/>tree like representation, below the links of the files contained in each<br/>folder.<br/><br/>Thank you in advance<br/><br/>p.s. we use Perl 5.18,in an ubuntu 14.04 server<br/> https://www.nntp.perl.org/group/perl.perl4lib/2015/03/msg3140.html Tue, 31 Mar 2015 07:59:23 +0000 Options for translating languages within perl scripts (3 messages) Hi,<br/><br/>I&#39;ve been tasked with massaging a large batch of French-language MARC<br/>records from a vendor. Aside from the usual MARC field<br/>manipulation/cleanup we usually do with perl, I&#39;ve been asked to run the<br/>520 field through a translation routine/API, etc. to convert (possibly<br/>crudely) from French to English. I thought that Babelfish or<br/>http://api.yandex.com/translate/doc/dg/reference/translate.xml might be<br/>options, but Babelfish appears to be dead, and when I clicked to get the<br/>required key for the yandex API, the link led to a dead end.<br/><br/>Is anyone incorporating POST queries or other methods to translate fields<br/>in MARC records? I&#39;d appreciate any leads or pointers.<br/><br/>Thanks in advance,<br/><br/>Eileen Pinto<br/>Library Systems Office<br/>University of California, Berkeley<br/>Berkeley, CA 94720-6000<br/> https://www.nntp.perl.org/group/perl.perl4lib/2015/02/msg3137.html Thu, 26 Feb 2015 22:29:24 +0000 UNICODE character identification (7 messages) Hello friendly folks,<br/><br/>follows what i am trying to do, and i am looking for your help in order to<br/>find the most clever way to achieve this:<br/><br/>We have records, that include typos like this: we have a word say Plato,<br/>where the last o is inputted with the keyboard set to Greek language, so we<br/>need something that would parse all metadata in a per character basis,<br/>check against what is the script language that the majority of characters<br/>the word belongs to have, and return the odd characters, the script they<br/>belong, and the record identifier they were found in, so as to be able to<br/>correct them<br/><br/>thank you in advance<br/> https://www.nntp.perl.org/group/perl.perl4lib/2015/02/msg3130.html Tue, 10 Feb 2015 12:27:03 +0000 UNIMARC example file? (4 messages) hello everybody,<br/><br/>could someone provide me with an example UNIMARC iso2709 file in order to<br/>test a module?<br/><br/>Thank you in advance<br/> https://www.nntp.perl.org/group/perl.perl4lib/2014/12/msg3126.html Thu, 11 Dec 2014 10:08:48 +0000 send emails via perl (12 messages) hello,<br/><br/>we need to use the easiest solution, if possible just use a perl module, to<br/>be able to send automated emails on an Ubuntu server. The scenario is this:<br/>we ran a cron job, and say we would like to send a message after<br/>completion, to a certain for example gmail account. The ideal would be to<br/>not use any mailer, is this possible? Or could you please suggest us the<br/>best - easiest approach?<br/><br/>Thank you<br/> https://www.nntp.perl.org/group/perl.perl4lib/2014/11/msg3114.html Wed, 19 Nov 2014 08:30:56 +0000 New version of MARC::Lint available (1 message) I have posted a new version of MARC::Lint to CPAN [1]. This version applies the changes found in MARC 21 updates 17 [2] and 18 [3]. <br/> <br/>[1] http://search.cpan.org/~eijabb/MARC-Lint_1.48/ <br/>[2] http://www.loc.gov/marc/up17bibliographic/bdapndxg.html <br/>[3] http://www.loc.gov/marc/bibliographic/bdapndxg.html <br/> <br/>Thank you for your time. <br/> <br/>Bryan Baldus <br/>bryan.baldus@quality-books.com <br/>eijabb@cpan.org <br/>http://home.comcast.net/~eijabb/ <br/> <br/> https://www.nntp.perl.org/group/perl.perl4lib/2014/07/msg3110.html Mon, 21 Jul 2014 13:39:13 +0000 Finding non-unicode characters (2 messages) Can someone suggest a way to identify if a MARC record, coded at LDR/09 = &acirc;&#128;&#152;a&acirc;&#128;&#153; has non-unicode characters in it? I tried the following, kind of grasping at straws, against a record that I know has non-unicode characters. It didn&acirc;&#128;&#153;t report any errors. <br/> <br/> # $bib_id is defined as 001 field <br/> my $bib_marc = [subroutine defined elsewhere to get a marc record string]; <br/> eval { <br/> $bib_rec = MARC::Record-&gt;new_from_usmarc($bib_marc); <br/> } ; <br/> <br/> if ($@) { <br/> print ERRORS &quot;$bib_id\t$@\n&quot;; <br/> next; <br/> } <br/> <br/>We have a group of records in our database that are mostly Unicode but have some erroneous characters. I&acirc;&#128;&#153;d like to have a script to run against them to see if they&acirc;&#128;&#153;ve been completely cleaned up after the catalogers work on them. <br/> <br/> <br/>Anne L. Highsmith <br/> <br/>Director of Consortia Systems <br/> <br/>Texas A&amp;M University <br/> <br/>5000 TAMU <br/> <br/>College Station, TX 77843-5000 <br/> <br/>Phone: 979 862 4234 <br/> <br/>Fax: 979 845 6238 <br/> <br/>Email: hismith@tamu.edu <br/> <br/> https://www.nntp.perl.org/group/perl.perl4lib/2014/06/msg3108.html Mon, 30 Jun 2014 14:51:13 +0000 Converting MARC fields with Catmandu - repeated subfields beingsquished together. (10 messages) I&#39;m using catmandu to JSON-ise MARC records for storage in <br/>Elasticsearch, and seem to have come up with something that I can&#39;t <br/>readily see how to fix (without getting down and dirty with fixers.) <br/> <br/>I have a record that has this: <br/> <br/>[&quot;650&quot;,&quot; &quot;,&quot;0&quot;,&quot;a&quot;,&quot;Time&quot;,&quot;v&quot;,&quot;Pictorial works&quot;,&quot;v&quot;,&quot;Juvenile <br/>literature.&quot;,&quot;9&quot;,&quot;15531&quot;] <br/> <br/>and a mapping: <br/> <br/>marc_map(&#39;650v&#39;, &#39;subject.$append&#39;) <br/> <br/>This works well enough in most cases, however when the subfield is <br/>doubled up, I end up with: <br/> <br/>&quot;subject&quot;:[&quot;Time&quot;,&quot;Pictorial worksJuvenile literature.&quot;] <br/> <br/>The $append doesn&#39;t seem to apply in this case. This only seems to <br/>happen to repeats within a field, other 650$v subfields are in their own <br/>strings, though suffer the same problem. <br/> <br/>Is this a bug in Catmandu-MARC? I&#39;ve tried reading the marc_map.pl file, <br/>but the lack of internal documentation, and the nature of what it&#39;s <br/>doing make it not the easiest thing to understand. <br/> <br/>-- <br/>Robin Sheat <br/>Catalyst IT Ltd. <br/>&acirc;&#156;&#134; +64 4 803 2204 <br/>GPG: 5FA7 4B49 1E4D CAA4 4C38 8505 77F5 B724 F871 3BDF <br/> https://www.nntp.perl.org/group/perl.perl4lib/2014/06/msg3098.html Fri, 06 Jun 2014 03:11:40 +0000 sending marc records into a script that uses MARC::Batch (7 messages) Hello, <br/>Two questions please: <br/> <br/> <br/>1. I&#39;ve written a script that opens a marc file for reading using this syntax: <br/> <br/>$file = $ARGV[0]; <br/>$batch = MARC::Batch-&gt;new(&#39;USMARC&#39;,$file); <br/> <br/>It then loops thru the records using this syntax: <br/>while ( $record = $batch-&gt;next()) { <br/> .....check position 6, 7 of leader and position 23 of 008 and make some changes <br/>} <br/> <br/>This works great. However, instead of accessing the file this way, I want to pipe the output of a previously run marc dump command directly into this script via the pipe. <br/>I understand that this can be done using this syntax: while ($line =&lt;STDIN&gt;){ ...}, but I don&#39;t understand how to use that STDIN with &quot;MARC::Batch-&gt;new(&#39;USMARC&#39;,$file);&quot; This does not work: $batch = MARC::Batch-&gt;new(&#39;USMARC&#39;,&lt;STDIN&gt;); <br/> <br/> <br/>2. My current script successfully reads and processes a marc file of over 5 gigs!....but exits entirely on record 160,585 with the error from MARC::Batch, &quot;Can&#39;t call method &quot;as_string&quot; on an undefined value at ./marc_batch.pl&quot;. Documentation on using MARC::Batch says that to tell it to continue processing even when errors are encountered one should use strict_off(), then print/report warnings at the bottom of the script. I don&#39;t think my particular error is being handled by the strict_off() setting. Doesn&#39;t anybody know what causes/how to fix &quot;Can&#39;t call method as_string?&quot; error? Full script below-it&#39;s pretty short, thanks to MARC::Batch. <br/> <br/>Thanks for ensights! <br/> <br/> <br/>use MARC::Batch; <br/> <br/>$file = $ARGV[0]; <br/>chomp($file); <br/> <br/>$batch = MARC::Batch-&gt;new(&#39;USMARC&#39;,$file); <br/>$batch-&gt;strict_off(); # otherwise script exits when encounters errors <br/> <br/>open(OUT,&#39;&gt;new_marc&#39;); <br/> <br/>while ( $record = $batch-&gt;next()) { <br/> $leader = $record-&gt;leader(); <br/> $leader_pos_6 = substr($leader,6,1); <br/> $leader_pos_7 = substr($leader,7,1); <br/> <br/> $field = $record-&gt;field(&#39;008&#39;); <br/> $field_008 = $field-&gt;as_string(); <br/> $field_008_position_23 = substr($field_008,23,1); <br/> <br/>if ( ($leader_pos_6 eq &quot;a&quot;) &amp;&amp; ($leader_pos_7 eq &quot;m&quot;) &amp;&amp; ($field_008_position_23 eq &quot;o&quot;) || ($field_008_position_23 eq &quot;s&quot;) ) { <br/> <br/> $control_num = $record-&gt;field(&#39;001&#39;); <br/> $control_num = $control_num-&gt;as_string(); <br/> <br/> print &quot;008 position 23: $field_008_position_23 \n&quot;; <br/> print &quot;OLD leader: $leader \n&quot;; <br/> $old_leader = $leader; <br/> substr($leader,6,1) = &#39;m&#39;; <br/> print &quot;NEW leader: $leader \n&quot;; <br/> <br/> print OUT $record-&gt;as_usmarc(); <br/> print &quot;$control_num|$old_leader|$leader|$field_008\n&quot;; <br/> <br/>} else { # not a match so just print this one unchanged... <br/> print OUT $record-&gt;as_usmarc(); <br/>} <br/> <br/>} <br/> <br/># handles errors: <br/>if (@warnings = $batch-&gt;warnings()) { <br/> print &quot;\n Warnings detected: \n&quot;, @warnings; <br/>} <br/> <br/>close(OUT); <br/>close(LOG); <br/> <br/> <br/> <br/>John Guillory <br/>Louisiana Library Network <br/>225.578.3758 <br/> <br/> https://www.nntp.perl.org/group/perl.perl4lib/2014/05/msg3091.html Thu, 29 May 2014 16:08:16 +0000 2 Bibliographic Software Engineering vacancies, University of Edinburgh (1 message) Hi folks, <br/> <br/>I hope you don&#39;t mind me bringing to your attention these two software <br/>engineering posts advertised at the University of Edinburgh in EDINA&#39;s <br/>Bibliographic and Multimedia Services team?: <br/> <br/>Software Engineer, Salary &pound;30,728 to &pound;36,661 <br/>http://edin.ac/1kAhdvZ <br/> <br/>Software Engineer, Salary &pound;25,759 - &pound;29,837 <br/>http://edin.ac/1kAhijw <br/> <br/>(If the links don&#39;t work, go to https://www.vacancies.ed.ac.uk/ and use <br/>references 026376 and 026399, respectively) <br/> <br/>Cheers, <br/> <br/>Ben <br/> <br/> <br/>From the job advertisements: <br/> <br/>Would you like to build online services to support higher and further <br/>education? <br/> <br/>We need a developer to help implement and maintain innovative virtual library <br/>services, delivered to higher education institutions across the UK. This is an <br/>excellent opportunity to join a talented and friendly group of software <br/>engineers, helping to develop our services further and contribute to new <br/>projects. We do object-oriented programming, keep our data in relational <br/>databases and search servers, and use web frameworks to design our interfaces. <br/>Most of us develop on Linux or Mac platforms, and our services are delivered <br/>from a mix of Red Hat Enterprise Linux and Enterprise Solaris servers. <br/> <br/>You should be a graduate in a computing-related discipline, or have relevant <br/>experience, with significant experience of web application development. Your <br/>skills will include object-oriented programming in a language such as Java or <br/>Perl. <br/> <br/>Knowledge of web services or machine-to-machine interfaces (e.g. SRU, OAI-PMH, <br/>REST), repository software (e.g. DSpace, Eprints), would be an advantage - but <br/>most important is initiative along with good analysis and problem-solving <br/>skills, so that you can react in an informed and creative way to problems and <br/>new requirements. <br/> <br/>Benefits of working at the University include flexible working, an excellent <br/>pension, career prospects and generous holiday provision. <br/> <br/>This post is on a fixed term basis for 2 years. <br/> <br/>Closing date: Thursday 20th March 2014 at 5pm <br/> https://www.nntp.perl.org/group/perl.perl4lib/2014/03/msg3090.html Thu, 06 Mar 2014 11:42:03 +0000 Basic questions -- skipping records that don't pass muster (2 messages) Through various programs, when I&#39;ve been processing MARC records and found 1 that didn&#39;t pass muster (couldn&#39;t pass structural or character set requirements) I generally slogged through, found it, and fixed it. But now I have passed on some of my code to someone who doesn&#39;t have the time or the expertise to do that, so I&#39;m asking for help on behalf of both of us. <br/> <br/>First, let&#39;s say I have a hash of record id numbers (voyager bib ids for those who speak voyager) And here&#39;s a code snippet: <br/> <br/>foreach my $bib (sort keys %list_of_docs_bibs) { <br/> # put the bits of the marc record back into a string marc string <br/> my $bib_marc = &amp;get_bib_string($dbh, $dbase, $bib); <br/> # create a marc record object from marc record string <br/> my $bib_rec = MARC::Record-&gt;new_from_usmarc($bib_marc); <br/> <br/> #do useful stuff to $bib_rec <br/>} <br/> <br/>Occasionally, this code will hit a bib record that has an invalid tag and will blow up with something like: <br/>&quot; Tag &quot;`1`&quot; is not a valid tag at ...USMARC.pm line 222&quot; <br/>What is an appropriate way to print out that record to an error file and go on to the next record, rather than having the program blow up and stop? <br/>------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- <br/>Second, related question. Although all of the records in the voyager database are SUPPOSED to be in Unicode, one occasionally encounters a record that has non-Unicode characters. So, pretty much same question -- What is an appropriate way to print out that record someplace and go on to the next record, rather than having the program blow up and stop? <br/> <br/>Suggestions gratefully appreciated <br/> <br/>Anne L. Highsmith <br/>Director of Consortia Systems <br/>Texas A&amp;M University <br/>5000 TAMU <br/>College Station, TX 77843-5000 <br/>Phone: 979 862 4234 <br/>Fax: 979 845 6238 <br/>Email: hismith@tamu.edu <br/> https://www.nntp.perl.org/group/perl.perl4lib/2014/02/msg3078.html Thu, 13 Feb 2014 21:20:19 +0000 MARC::File::XML 1.0.3 released (4 messages) Hi,<br/><br/>I have uploaded MARC::File::XML 1.0.3 to CPAN. This release fixes a<br/>test failure on Strawberry Perl. Here is the changelog:<br/><br/>1.0.3 Thu Jan 23 05:02:52 UTC 2014<br/> - fix t/external-entities.t to pass on Strawberry<br/><br/>Regards,<br/><br/>Galen<br/>-- <br/>Galen Charlton<br/>gmcharlt@gmail.com<br/> https://www.nntp.perl.org/group/perl.perl4lib/2014/01/msg3075.html Thu, 23 Jan 2014 05:14:58 +0000 SECURITY release: MARC::File::XML 1.0.2 (2 messages) Hi,<br/><br/>I have uploaded [1] version 1.0.2 of MARC::File::XML. This is a<br/>security release that repairs an XML external entity (XXE)<br/>vulnerability. I recommend that all uses of MARC::File::XML upgrade<br/>promptly.<br/><br/>Here is the change log entry:<br/><br/>1.0.2 Tue Jan 21 17:18:37 UTC 2014<br/> - MARC::File::XML will now die upon parsing a record that<br/> declares an external entity and tries to use it. This<br/> prevents the potential unwanted disclosure of the contents<br/> of files on the server by applications that embed this module.<br/> If, for some reason, an application needs to process MARCXML<br/> records that contain external entities, set_parser() can be<br/> used to force the use of an XML::LibXML parser that is<br/> configured to process external entities.<br/><br/> The issue was reported by John Lightsey.<br/><br/>[1] https://metacpan.org/release/GMCHARLT/MARC-XML-1.0.2<br/><br/>Regards,<br/><br/>Galen<br/>-- <br/>Galen Charlton<br/>gmcharlt@gmail.com<br/> https://www.nntp.perl.org/group/perl.perl4lib/2014/01/msg3073.html Tue, 21 Jan 2014 17:38:43 +0000 Re: AW: [librecat-dev] A common MARC record path language (10 messages) Hi Carsten <br/> <br/>Excuses for the late reply, it took some while to get the system booted <br/>after winter vacations. <br/> <br/>You are right in the discussion about which parts should be specified by a <br/>MARCspec language and which part should be implemented as operations on <br/>nodes found. I gave the examples not as a hit for the implementation <br/>language (e.g. if it requires regular expressions or not) but as a <br/>examples of MARC in the wild (non standard tags) and MARC combined with <br/>cataloging rules (where subfields and characters in front of a subfield <br/>have a special meaning). <br/> <br/>In daily work I often encounter mapping rules which involve these special <br/>subfield cases (&acirc;&#128;&#156;Take everything from the 245 until you hit the first / <br/>before a subfield&acirc;&#128;&#157;). These things can&acirc;&#128;&#153;t be easily (can it) expressed in <br/>Xpath when using XSTL or MARCspec when using tools like Catmandu..but are <br/>very common and can be shared across tools. I think this would be <br/>candidates to formalise . <br/> <br/> <br/>Cheers <br/>Patrick <br/> <br/>On 06/01/14 16:33, &quot;Klee, Carsten&quot; &lt;Carsten.Klee@sbb.spk-berlin.de&gt; wrote: <br/> <br/>&gt; <br/>&gt;On the other hand I could imagine something like &quot;100[0]&quot; for the first <br/>&gt;100 field (author) and &quot;100[1]&quot; for the second and so on. But what is <br/>&gt;about repeatable subfields? Maybe someone requires the first subfield &quot;a&quot; <br/>&gt;of the second 100 field. Besides the characters &quot;[&quot; and &quot;]&quot; are also <br/>&gt;valid subfield codes (see [2]). <br/>&gt; <br/>&gt;With substrings it is more complicated. I only could imagine using <br/>&gt;regular expressions. Maybe something like 245a[&Aring;&#146;\s(.*)]_10. But for <br/>&gt;usability reasons this might be better left to the applications. Isn&#39;t <br/>&gt;there something in Catmandu like <br/>&gt;marc_map(&#39;245&#39;,&#39;my.title&#39;, -substring-after =&gt; &#39;&Aring;&#146; &#39;); ?? <br/>&gt; <br/>&gt;Maybe you have another solution for that? <br/>&gt; <br/>&gt;Another issue I suspect with your last example under <br/>&gt;https://metacpan.org/pod/Catmandu::Fix::marc_map <br/>&gt; <br/>&gt;# Copy all 100 subfields except the digits to the &#39;author&#39; field <br/>&gt;marc_map(&#39;100^0123456789&#39;,&#39;author&#39;); <br/>&gt; <br/>&gt;In the current MARCspec this would be interpreted as &quot;a reference to <br/>&gt;subfields ^, 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9 of field 100&quot;. This is <br/>&gt;because &quot;^&quot; is a valid subfield code (see [2]). <br/>&gt; <br/>&gt;So far... I would be happy to read more comments on this. <br/>&gt; <br/>&gt;Cheers! <br/>&gt; <br/>&gt;Carsten <br/>&gt; <br/>&gt; <br/>&gt;[1] &lt;https://github.com/cKlee/marc-spec/issues&gt; <br/>&gt;[2] &lt;http://www.loc.gov/marc/specifications/specrecstruc.html#varifields&gt; <br/>&gt;_______________________________________________ <br/>&gt;Carsten Klee <br/>&gt;Abt. &Atilde;&#156;berregionale Bibliographische Dienste IIE <br/>&gt;Staatsbibliothek zu Berlin &acirc;&#128;&#147; Preu&Atilde;&#159;ischer Kulturbesitz <br/>&gt; <br/>&gt;Fon: +49 30 266-43 44 02 <br/>&gt; <br/>&gt;&gt; -----Urspr&Atilde;&frac14;ngliche Nachricht----- <br/>&gt;&gt; Von: Patrick Hochstenbach [mailto:Patrick.Hochstenbach@UGent.be] <br/>&gt;&gt; Gesendet: Freitag, 20. Dezember 2013 14:06 <br/>&gt;&gt; An: voss@gbv.de; librecat-dev@mail.librecat.org; perl4lib@perl.org <br/>&gt;&gt; Cc: Klee, Carsten <br/>&gt;&gt; Betreff: Re: [librecat-dev] A common MARC record path language <br/>&gt;&gt; <br/>&gt;&gt; Hi <br/>&gt;&gt; <br/>&gt;&gt; Thanks for this initiative to formalise the path language for MARC <br/>&gt;&gt; records. In Catmandu our path language is better described at: <br/>&gt;&gt; https://metacpan.org/pod/Catmandu::Fix::marc_map. It would be an easy <br/>&gt;&gt;fix <br/>&gt;&gt; for us to follow Carsten&Acirc;&sup1;s MARC spec rules and I will gladly implement <br/>&gt;&gt;it <br/>&gt;&gt; for our community. <br/>&gt;&gt; <br/>&gt;&gt; We see these type of MARC paths in programming libraries such as the <br/>&gt;&gt; projects mentioned below but also in products like XSTL, SolrMarc, <br/>&gt;&gt; ILS-vendors who need them to define how to index marc, standardisation <br/>&gt;&gt; bodies like e.g. that provide mapping rules (e.g. <br/>&gt;&gt; http://www.loc.gov/standards/mods/mods-mapping.html). I tried to make a <br/>&gt;&gt; small roundup in the past of these projects but it would be great to <br/>&gt;&gt;have <br/>&gt;&gt; more extensive look at all current pratices. <br/>&gt;&gt; <br/>&gt;&gt; In our Catmandu project we found that Xpaths are too verbose for our <br/>&gt;&gt; librarians to interpret and in practise tied to XSLT-programming which <br/>&gt;&gt; requires quite some programming skills to read and interpret. <br/>&gt;&gt; <br/>&gt;&gt; Our paths are very much simplified but still seem to lack some things <br/>&gt;&gt;that <br/>&gt;&gt; are available in the MARC data model which would be great to have <br/>&gt;&gt; available in the MARCspec syntax: <br/>&gt;&gt; <br/>&gt;&gt; - Notion of pointing to the first item (first author) <br/>&gt;&gt; - Supporting local defined MARC (sub)fields (e.g. Ex Libris exports <br/>&gt;&gt; contain all kind of Z30, CAT , etc fields) <br/>&gt;&gt; - Support for pointing to a subfields that follow a specific character <br/>&gt;&gt; (e.g. In titles I would like to point to everything after the &Aring;&#146;/&Aring;&#146; in a <br/>&gt;&gt;245 <br/>&gt;&gt; field). <br/>&gt;&gt; <br/>&gt;&gt; Cheers and have a nice holiday <br/>&gt;&gt; <br/>&gt;&gt; Patrick <br/>&gt;&gt; <br/>&gt;&gt; <br/>&gt;&gt; On 19/12/13 13:16, &quot;Jakob Vo&Atilde;&#159;&quot; &lt;voss@gbv.de&gt; wrote: <br/>&gt;&gt; <br/>&gt;&gt; &gt;Hi, <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt;Carsten Klee specified a simple path language for MARC records, called <br/>&gt;&gt; &gt;&quot;MARC spec&quot;. In short it is a formal syntax to refer to selected parts <br/>&gt;&gt; &gt;of a MARC record (similar to XPath for XML): <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt;http://collidoscope.de/lld/marcspec-as-string.html <br/>&gt;&gt; &gt;http://cklee.github.io/marc-spec/marc-spec.html#examples <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt;Similar languages have been invented before but not with a strict <br/>&gt;&gt; &gt;specification, as far as I know. For instance the perl Catmandu::MARC <br/>&gt;&gt; &gt;supports references to MARC fields: <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt;https://metacpan.org/pod/Catmandu::Fix::Inline::marc_map <br/>&gt;&gt; &gt;https://metacpan.org/source/NICS/Catmandu-MARC- <br/>&gt;&gt; 0.103/lib/Catmandu/Fix/Inli <br/>&gt;&gt; &gt;ne/marc_map.pm#L26 <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt;Could you please have a look at MARC spec and join forces to get a <br/>&gt;&gt; &gt;common syntax that can be used among different tools? So <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt;- If your tool does not support all aspects of MARC spec, please <br/>&gt;&gt; &gt;implement the missing parts. <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt;- If your tool supports more than included in MARC spec, help extending <br/>&gt;&gt; &gt;the syntax at https://github.com/cKlee/marc-spec/ <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt;- If you tool uses a different syntax to refer to parts of MARC, <br/>&gt;&gt; &gt;please think about modifying it to align with MARC spec. <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt;Cheers, <br/>&gt;&gt; &gt;Jakob <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt;-- <br/>&gt;&gt; &gt;Jakob Vo&Atilde;&#159; &lt;jakob.voss@gbv.de&gt; <br/>&gt;&gt; &gt;Verbundzentrale des GBV (VZG) / Common Library Network <br/>&gt;&gt; &gt;Platz der Goettinger Sieben 1, 37073 G&Atilde;&para;ttingen, Germany <br/>&gt;&gt; &gt;+49 (0)551 39-10242, http://www.gbv.de/ <br/>&gt;&gt; &gt; <br/>&gt;&gt; &gt;_______________________________________________ <br/>&gt;&gt; &gt;librecat-dev mailing list <br/>&gt;&gt; &gt;librecat-dev@mail.librecat.org <br/>&gt;&gt; &gt;http://mail.librecat.org/mailman/listinfo/librecat-dev <br/>&gt; <br/> <br/> https://www.nntp.perl.org/group/perl.perl4lib/2014/01/msg3072.html Tue, 21 Jan 2014 08:56:21 +0000 A common MARC record path language (3 messages) Hi,<br/><br/>Carsten Klee specified a simple path language for MARC records, called <br/>&quot;MARC spec&quot;. In short it is a formal syntax to refer to selected parts <br/>of a MARC record (similar to XPath for XML):<br/><br/>http://collidoscope.de/lld/marcspec-as-string.html<br/>http://cklee.github.io/marc-spec/marc-spec.html#examples<br/><br/>Similar languages have been invented before but not with a strict <br/>specification, as far as I know. For instance the perl Catmandu::MARC <br/>supports references to MARC fields:<br/><br/>https://metacpan.org/pod/Catmandu::Fix::Inline::marc_map<br/>https://metacpan.org/source/NICS/Catmandu-MARC-0.103/lib/Catmandu/Fix/Inline/marc_map.pm#L26<br/><br/>Could you please have a look at MARC spec and join forces to get a <br/>common syntax that can be used among different tools? So<br/><br/>- If your tool does not support all aspects of MARC spec, please <br/>implement the missing parts.<br/><br/>- If your tool supports more than included in MARC spec, help extending <br/>the syntax at https://github.com/cKlee/marc-spec/<br/><br/>- If you tool uses a different syntax to refer to parts of MARC,<br/>please think about modifying it to align with MARC spec.<br/><br/>Cheers,<br/>Jakob<br/><br/>-- <br/>Jakob Vo&szlig; &lt;jakob.voss@gbv.de&gt;<br/>Verbundzentrale des GBV (VZG) / Common Library Network<br/>Platz der Goettinger Sieben 1, 37073 G&ouml;ttingen, Germany<br/>+49 (0)551 39-10242, http://www.gbv.de/<br/> https://www.nntp.perl.org/group/perl.perl4lib/2013/12/msg3069.html Thu, 19 Dec 2013 12:16:14 +0000 MARC::Record 2.0.6 (1 message) Hi,<br/><br/>I have uploaded version 2.0.6 of MARC::Record to CPAN. This is a<br/>small functionality and bugfix release. Here are the changes since<br/>2.0.5:<br/><br/>[ENHANCEMENTS]<br/>- MARC::Field-&gt;as_string() now accepts an optional second<br/> parameter to specify the delimiter to use between<br/> subfields. (Tomas Cohen Arazi)<br/>- MARC::Field-&gt;delete_subfield() can now accept a regexp<br/> to specify the subfields to remove. For example, to<br/> remove all numeric subfields, one can say:<br/><br/> $field-&gt;delete_subfield(code =&gt; qr/\d/);<br/><br/> (Jason Stephenson)<br/>[FIXES]<br/>- the warnings pragma is now used throughout MARC::Record<br/>- $field-&gt;as_string(&#39;0&#39;) now returns the contents of<br/> subfield $0 rather than the contents of all of the<br/> subfields in the field.<br/>- RT#88421: add newline after printing warnings<br/> (Jason Stephenson)<br/>- RT#85804: fix spelling glitch (Gregor Herrmann)<br/><br/>Regards,<br/><br/>Galen<br/>-- <br/>Galen Charlton<br/>gmcharlt@gmail.com<br/> https://www.nntp.perl.org/group/perl.perl4lib/2013/10/msg3067.html Tue, 22 Oct 2013 16:53:00 +0000 Re: New perl module MARC::File::MiJ -- marc-in-json for perl (1 message) hello <br/><br/>&gt; It&#39;s currently supported across several implementations:<br/>&gt; * ruby&#39;s&Acirc; marc&Acirc; gem<br/>&gt; * php&#39;s File_MARC<br/>&gt; * java&#39;s marc4j<br/>&gt; * python&#39;s pymarc <br/><br/>just for the record: i was aware of MIJ when i wrote MARC::MIR. I just<br/>ignored it because of the problems i just mention on code4lib.<br/><br/>yet, a converter would be easy:<br/><br/>sub mir2mij (_) {<br/> my $mir = shift;<br/> { leader: $$mir[0]<br/> , fields: [ map {<br/> my ( $tag, $data ) = %$_;<br/> if ( ref $data ) {<br/> # data field<br/> [ $tag<br/> , [ map [%$_], @{$$data{subfields}} ]<br/> , [ @{$data}{qw&lt; ind1 ind2 &gt;} ] ]<br/> }<br/> else {<br/> # control field<br/> [ $tag, $data ]<br/> }<br/> } @{$$mir[1]} ] }<br/>}<br/><br/>regards<br/>-- <br/>Marc Chantreux<br/>Universit&eacute; de Strasbourg, Direction Informatique<br/>14 Rue Ren&eacute; Descartes,<br/>67084 STRASBOURG CEDEX<br/>&#x260E;: 03.68.85.57.40<br/>http://unistra.fr<br/>&quot;Don&#39;t believe everything you read on the Internet&quot;<br/> -- Abraham Lincoln<br/> https://www.nntp.perl.org/group/perl.perl4lib/2013/09/msg3066.html Tue, 24 Sep 2013 11:27:16 +0000 Perl module to transform XSL to JSON (2 messages) <br/> <br/>Greetings,&nbsp; <br/> <br/>could you please suggest me a tool in order to transform an xsl file i have manged to get from XML, into JSON? <br/> <br/>Thank you https://www.nntp.perl.org/group/perl.perl4lib/2013/09/msg3064.html Mon, 23 Sep 2013 08:06:25 +0000 MARC::Charset 1.35 (1 message) Hi,<br/><br/>I have uploaded version 1.35 of MARC::Charset to CPAN. This is a<br/>relatively significant bugfix release, particularly for folks who need<br/>to handle MARC-8 records containing extended Cyrillic and Arabic<br/>characters. Changes from 1.34 are:<br/><br/>- improve conversion of certain composed characters to MARC8<br/><br/> Some characters should not be fully decomposed<br/> before converting them to MARC8. This patch adds<br/> a table of such characters, based on Annex A of<br/> http://www.loc.gov/marc/marbi/2006/2006-04.html<br/> and on some sample records provided by Jason<br/> Stephenson of MVLC.<br/><br/>- recognize G0 and G1 characters properly<br/><br/> When converting from MARC8 to UTF8, MARC::Charset now<br/> properly recognizes if a (single-byte) MARC8 character falls<br/> in G0 or G1.<br/><br/> This is part of the fix for RT#63271 (converting characters<br/> in the Extended Cyrillic character set), but should also<br/> fix similar issues with converting characters in the extended<br/> Arabic set.<br/><br/> This commit also means that all MARC8 character sets that support<br/> both G0 and G1 wll be properly converted, regardless of whether<br/> they&#39;re currently set as the G0 or G1 character set. For example,<br/> it is now possible to convert Extended Latin as G0 or Basic Latin<br/> as G1.<br/><br/> This fixes RT#63271<br/><br/>- have MARC::Charset::Code-&gt;marc_value() handle G0/G1 conversion<br/><br/> Since there&#39;s at present no need to do things like have<br/> ANSEL be the G0 character set when converting from UTF8 to<br/> MARC8, this commit centralizes the logic for deciding<br/> whether to return the G0 or G1 MARC8 representation of a<br/> character.<br/><br/> Also add MARC::Charset::Code-&gt;g0_marc_value(), which returns<br/> the G0 representation of the character for use by the<br/> character DB.<br/><br/>- New test cases for converting Vietnamese and Extended Cyrillic<br/> text.<br/><br/>Regards,<br/><br/>Galen<br/>-- <br/>Galen Charlton<br/>gmcharlt@gmail.com<br/> https://www.nntp.perl.org/group/perl.perl4lib/2013/08/msg3063.html Wed, 14 Aug 2013 03:06:54 +0000 Catmandu and MODS::Record (3 messages) Hi all <br/> <br/>LibreCat <br/>-=-=-=-= <br/> <br/>LibreCat is an open collaboration of the university libraries of Lund, Ghent, and Bielefeld to create tools for library and research services. One of <br/>the toolkits we provide is called &#39;Catmandu&#39; (http://search.cpan.org/~nics/Catmandu-0.5004/lib/Catmandu.pm) which is a suite of tools to do ETL processing <br/>on library data. We provide tools to import data via JSON, YAML, CSV, MARC, SRU, OAI-PMH and more. To transform this data we created a small DSL <br/>language that librarians use in our institutions. Also we make it very easy to store the results in MongoDB, ElasticSearch, Solr or export it into various <br/>formats. <br/> <br/>We create also command line tools because we felt that in our daily jobs we were creating the same type of adhoc Perl scripts over and over for endless reports. <br/> <br/>E.g. to create a CSV file of all titles in a MARC export we say something like: <br/> <br/>$ catmandu convert MARC to CSV --fix &#39;marc_map(&quot;245&quot;,&quot;title&quot;); retain_field(&quot;record&quot;);&#39; &lt; records.mrc <br/> <br/>To get all titles from our institutional repository we say: <br/> <br/>$ catmandu convert OAI --url http://biblio.ugent.be/oai to JSON --fix &#39;retain_field(&quot;title&quot;)&#39; <br/> <br/>To store a MARC export into a MongoDB we do: <br/> <br/>$ catmandu import MARC to MongoDB --database_name mydb --bag data &lt; records.mrc <br/> <br/>Here is a blog post about the commands that are available: http://librecat.org/catmandu/2013/06/21/catmandu-cheat-sheet.html <br/> <br/>See our project page for more information about LibreCat and Catmandu : <br/> <br/>http://librecat.org <br/> <br/>and a tutorial how to work with the API <br/> <br/>http://librecat.org/tutorial/ <br/> <br/>MODS::Record <br/>-=-=-=-=-=-= <br/>In one of our Catmandu projects we created a Perl connector for Fedora Commons (http://search.cpan.org/~hochsten/Catmandu-FedoraCommons-0.24). One of our goals was to integrate <br/>better with the Islandora project. For this we needed a Perl MODS parser. As there was no module available on CPAN we provide a top level module like MARC::Record called MODS::Record <br/>http://search.cpan.org/~hochsten/MODS-Record-0.05/lib/MODS/Record.pm. I hope this will be of some help for the community. If there are coders here who would like to contribute to <br/>the MODS package please drop me a line. I think CPAN MODS support shouldn&#39;t be dependent on one coder, one institution. <br/> <br/>Greetings from a sunny Belgium, <br/>Patrick https://www.nntp.perl.org/group/perl.perl4lib/2013/08/msg3060.html Tue, 06 Aug 2013 07:04:10 +0000 New perl module MARC::File::MiJ -- marc-in-json for perl (1 message) The marc-in-json&lt;http://dilettantes.code4lib.org/blog/2010/09/a-proposal-to-serialize-marc-in-json/&gt;format <br/>is, as you might expect, a JSON serialization for MARC. A JSON <br/>serialization for MARC is potentially useful in the same places where <br/>MARC-XML would be useful (long records, utility of human-readable records, <br/>etc.) without what many perceive to be the relative pain of working with <br/>XML vs JSON. <br/> <br/>It&#39;s currently supported across several implementations: <br/> <br/> - ruby&#39;s *marc* gem <br/> - php&#39;s *File_MARC* <br/> - java&#39;s *marc4j* <br/> - python&#39;s *pymarc* <br/> <br/>There wasn&#39;t one for perl, so I wrote one :-) <br/> <br/>MARC::File::MiJ&lt;http://search.cpan.org/~gmcharlt/MARC-File-MiJ-0.01/lib/MARC/File/MiJ.pm&gt;is <br/>a perl module that allows MARC::Record to encode/decode marc-in-json. <br/>It <br/>also supplies a handler to MARC::File/MARC::Batch that will read <br/>marc-in-json records from a newline-delimited-json (ndj) file (where each <br/>line is a JSON object without unescaped newlines, ending with a newline). <br/> <br/>marc-in-json encoding/decoding tends to be pretty <br/>fast&lt;http://robotlibrarian.billdueber.com/sizespeed-of-various-marc-serializations-using-ruby-marc/&gt;, <br/>since json parsers tend to be pretty fast, and uncompressed filesizes <br/>occupy a middle-ground between binary marc and marc-xml. A sample file of <br/>about 18k marc records looks like this: <br/> <br/> 31M topics.mrc <br/> 56M topics.ndj (newline-delimited JSON) <br/> 93M topics.xml <br/> <br/> 8.9M topics.mrc.gz <br/> 7.9M topics.ndj.gz <br/> 8.7M topics.xml.gz <br/> <br/>&#x200B;...so obviously it compresses pretty well, too. <br/> <br/>I can take generic questions; bugs should go to <br/>https://rt.cpan.org/Public/Bug/Report.html?Queue=MARC-File-MiJ <br/> <br/>[ Note that there are many other possible JSON serializations for <br/>MARC&lt;http://jakoblog.de/2011/04/13/mapping-bibliographic-record-subfields-to-json/&gt;, <br/>including the (incompatible) one implemented in the <br/>MARC::File::JSON&lt;http://search.cpan.org/~cfouts/MARC-File-JSON-0.002/lib/MARC/File/JSON.pm&gt;module] <br/> <br/> <br/> <br/> <br/>-- <br/>Bill Dueber <br/>Library Systems Programmer <br/>University of Michigan Library <br/> https://www.nntp.perl.org/group/perl.perl4lib/2013/07/msg3059.html Mon, 15 Jul 2013 22:52:46 +0000