Thread: [Refdb-users] marc2ris.pl
Status: Beta
Brought to you by:
mhoenicka
From: Liam M. H. <ln...@he...> - 2005-03-23 02:25:34
|
I have two issues with marc2ris.pl. The first is that I get an error Can't use an undefined value as a symbol reference at /usr/local/share/perl/5.8.4/RefDB/Log.pm line 271. when I try to use this script. I understand from http://sourceforge.net/mailarchive/message.php?msg_id=5406630 that this is due to a lack of write permissions on the log file. When I touch the log file as root and change permissions to 666, however, I get the same result. I actually would like the log file to go to stdout, but changing logdest stderr in marc2risrc worked for one of my clients but not on the other. If I do marc2ris.pl -L marc2ris.log kirk.usmarc > kirk.ris it works fine, and at the moment, it's the only way I can run this script on the second client. The second problem is that MARC tags are mixed in with RIS lines; it appears the -m flag is always on, and I can't shut it off. yaz-client z3950.loc.gov:7090/voyager find @attr 1=7 0486434842 set_marcdump kirk.usmarc format usmarc show quit marc2ris.pl -L marc2ris.log kirk.usmarc <marc>--- <marc>MARC-8 data TY - BOOK <marc>:Author(Ind1): 1 <marc>:Author($a): Kirk, Donald E., <marc>:Author($b): <marc>:Author($c): <marc>:Author($h): AU - Kirk, Donald E., <marc>Title($a): Optimal control theory : <marc>Title($b): an introduction / <marc>Title($c): Donald E. Kirk. TI - Optimal control theory: an introduction <marc>empty series title field SN - 0486434842 <marc>no issn found (022$a) <marc>Year (260$c): 2004. PY - 2004/// CY - Mineola, N.Y. PB - Dover Publications <marc>Field 650 subfield a:Control theory <marc>Field 650 subfield a:Mathematical optimization KW - Mathematical optimization KW - Control theory <marc>field 500 subfield a: Originally published: Englewood Cliffs, N.J. : Prentice-Hall, 1970 (Prentice-Hall networks series) <marc>field 504 subfield a: Includes bibliographical references and index. N1 - Originally published: Englewood Cliffs, N.J. : Prentice-Hall, 1970 (Prentice-Hall networks series); Includes bibliographical references and index ER - Any pointers appreciated. Liam |
From: Dan O'D. <dan...@ul...> - 2006-06-26 19:01:20
|
Hi, I'm sure this is a question I should be able to answer from the manual, but I don't seem able to. I've been going through the Tutorial model for converting marc to ris, but can't get marc2ris.pl to run. Here's what I get: 1) Trying the example exactly: dan@caedmon:~/downloads/yaz-2.1.22$ marc2ris.pl knuth.loc.usmarc > knuth.loc.ris -bash: marc2ris.pl: command not found 2) Specifying perl and perl5.8.7 dan@caedmon:~/downloads/yaz-2.1.22$ perl marc2ris.pl knuth.loc.usmarc > knuth.loc.ris Can't open perl script "marc2ris.pl": No such file or directory dan@caedmon:~/downloads/yaz-2.1.22$ perl5.8.7 marc2ris.pl knuth.loc.usmarc > knuth.loc.ris Can't open perl script "marc2ris.pl": No such file or directory 3) Trying with /usr/local/bin/marc2ris dan@caedmon:~/downloads/yaz-2.1.22$ /usr/local/bin/marc2ris knuth.loc.usmarc > knuth.loc.ris Can't locate object method "new" via package "MARC::Charset" at /usr/local/bin/marc2ris line 90. I'm sure I've missed something, but I have done my best to follow the manual here. Is this evidence of an obvious problem in my installation that I'm not seeing? -d |
From: Rich S. <rsh...@ap...> - 2006-06-26 19:28:02
|
On Mon, 26 Jun 2006, Dan O'Donnell wrote: > 1) Trying the example exactly: > dan@caedmon:~/downloads/yaz-2.1.22$ marc2ris.pl knuth.loc.usmarc > > knuth.loc.ris > -bash: marc2ris.pl: command not found Dan, You can use 'locate marc2ris.pl' to find the file on your system, correct? > 2) Specifying perl and perl5.8.7 > dan@caedmon:~/downloads/yaz-2.1.22$ perl marc2ris.pl knuth.loc.usmarc > > knuth.loc.ris > Can't open perl script "marc2ris.pl": No such file or directory The file is marked executable, yes? (chmod a+x marc2fis.pl) > dan@caedmon:~/downloads/yaz-2.1.22$ perl5.8.7 marc2ris.pl > knuth.loc.usmarc > knuth.loc.ris > Can't open perl script "marc2ris.pl": No such file or directory You have execute permissions on the directory where the file is located, yes? > 3) Trying with /usr/local/bin/marc2ris > dan@caedmon:~/downloads/yaz-2.1.22$ /usr/local/bin/marc2ris > knuth.loc.usmarc > knuth.loc.ris > Can't locate object method "new" via package "MARC::Charset" > at /usr/local/bin/marc2ris line 90. Did you use CPAN to install that module? I've no need to access on-line bibliographies so I've no real world experience with marc2ris. But, it looks like a permission or missing module problem to me. Rich -- Richard B. Shepard, Ph.D. | The Environmental Permitting Applied Ecosystem Services, Inc.(TM) | Accelerator <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 |
From: Dan O'D. <dan...@ul...> - 2006-06-26 19:49:15
|
On Mon, 2006-26-06 at 12:27 -0700, Rich Shepard wrote: > On Mon, 26 Jun 2006, Dan O'Donnell wrote: > > Dan, > > You can use 'locate marc2ris.pl' to find the file on your system, correct? Well no, it isn't showing up with locate, even after updating the database. I get /usr/bin/marc2ris, and an example configuration, but no .pl file. > > Did you use CPAN to install that module? Yes. MARC:Char is installed from CPAN. > I've no need to access on-line bibliographies so I've no real world > experience with marc2ris. But, it looks like a permission or missing module > problem to me. I'm thinking it is a module problem too, but can't see how to get round it if it lies in refdbperlmod. But, so far everything that's gone wrong has been my fault ;)! -d > > Rich > |
From: Rich S. <rsh...@ap...> - 2006-06-26 19:59:22
|
On Mon, 26 Jun 2006, Dan O'Donnell wrote: > Well no, it isn't showing up with locate, even after updating the database. > I get /usr/bin/marc2ris, and an example configuration, but no .pl file. Dan, Aha! Progress. If you look at /usr/bin/marc2ris (with a pager), does the first line contain: #!/usr/bin/perl ? I don't know if the perl interpreter wants the extension on the filename or doesn't care. Next thing I'd check is the reaction when I add .pl to /usr/bin/marc2ris. I suspect that perl cannot find or recognize the script you're asking it to run. Rich -- Richard B. Shepard, Ph.D. | The Environmental Permitting Applied Ecosystem Services, Inc.(TM) | Accelerator <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863 |
From: Markus H. <mar...@mh...> - 2006-06-26 21:06:43
|
Rich Shepard writes: > Aha! Progress. If you look at /usr/bin/marc2ris (with a pager), does the > first line contain: > > #!/usr/bin/perl > > ? I don't know if the perl interpreter wants the extension on the filename or > doesn't care. > > Next thing I'd check is the reaction when I add .pl to /usr/bin/marc2ris. I > suspect that perl cannot find or recognize the script you're asking it to > run. > I'm sorry for the confusion that I've caused here (once again). The Perl scripts used to have a .pl suffix as mentioned in the tutorial. However, I've been told that such a suffix causes scripts and other stuff to fail if you re-implement a tool in a different language. Hence I dropped the .pl suffix. You just have to run marc2ris instead of marc2ris.pl (and med2ris, en2ris and so on). regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
From: Dan O'D. <dan...@ul...> - 2006-06-26 21:22:23
|
On Mon, 2006-26-06 at 23:06 +0200, Markus Hoenicka wrote: > > I'm sorry for the confusion that I've caused here (once again). The > Perl scripts used to have a .pl suffix as mentioned in the > tutorial. However, I've been told that such a suffix causes scripts > and other stuff to fail if you re-implement a tool in a different > language. Hence I dropped the .pl suffix. > > You just have to run marc2ris instead of marc2ris.pl (and med2ris, > en2ris and so on). Yes, it is working both ways now. But not the new() problem. Any suggestions? > Can't locate object method "new" via package "MARC::Charset" > at /usr/local/bin/marc2ris line 90. > BTW. I don't thank you enough for this software, Markus. It really is quite neat now that I've mostly got it running. -d > > regards, > Markus > |
From: Markus H. <mar...@mh...> - 2006-06-27 07:32:07
|
Dan O'Donnell <dan...@ul...> was heard to say: > > Can't locate object method "new" via package "MARC::Charset" > > at /usr/local/bin/marc2ris line 90. > > > I missed that in your original post. I'm afraid the MARC::Charset module was rewritten entirely. I've checked out the latest version from CPAN (0.95), and it does not have much in common with the version I've got installed here (0.2). I think I'll have to rewrite marc2ris using the new version. The module used to allow to create a charset object, but the new version only exports two conversion functions. Please allow me a day or two to fix this. > BTW. I don't thank you enough for this software, Markus. It really is > quite neat now that I've mostly got it running. > Much appreciated! regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
From: Dan O'D. <dan...@ul...> - 2006-06-27 17:03:39
|
On Tue, 2006-27-06 at 09:30 +0200, Markus Hoenicka wrote: > Dan O'Donnell <dan...@ul...> was heard to say: > > > > Can't locate object method "new" via package "MARC::Charset" > > > at /usr/local/bin/marc2ris line 90. > > > > > > > I missed that in your original post. I'm afraid the MARC::Charset module was > rewritten entirely. I've checked out the latest version from CPAN (0.95), and > it does not have much in common with the version I've got installed here (0.2). > I think I'll have to rewrite marc2ris using the new version. The module used to > allow to create a charset object, but the new version only exports two > conversion functions. Please allow me a day or two to fix this. Oh that's good to hear (I mean that it wasn't me). I thought I'd messed up the paths perhaps somehow and was about to reinstall everything! -d > > > BTW. I don't thank you enough for this software, Markus. It really is > > quite neat now that I've mostly got it running. > > > > Much appreciated! > > regards, > Markus > > |
From: Markus H. <mar...@mh...> - 2006-06-27 20:57:40
|
Dan O'Donnell writes: > Oh that's good to hear (I mean that it wasn't me). I thought I'd messed > up the paths perhaps somehow and was about to reinstall everything! > No complete reinstall required this time :-) I've checked in a fixed version of marc2ris.in which works with the latest version of MARC::Charset as of today. If you use the Subversion version, please update your working copy. If you use a release tarball, please use the following link to download marc2ris.in: http://svn.sourceforge.net/viewcvs.cgi/refdb/refdb/trunk/scripts/marc2ris.in?view=markup&rev=43 (all in one long line, glue it back together if your mail agent chopped it). Please copy the file into the /scripts subdirectory of your sources and run make && make install. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
From: Daniel O'D. <dan...@ul...> - 2006-06-28 20:21:42
|
It's working Markus, thanks. -d On Tue, 2006-27-06 at 22:57 +0200, Markus Hoenicka wrote: > make && make install -- Daniel Paul O'Donnell, PhD Associate Professor and Chair Director, Digital Medievalist Project <http://www.digitalmedievalist.org/> Department of English University of Lethbridge Lethbridge AB T1K 3M4 Tel. +1 (403) 329-2378 Fax. +1 (403) 382-7191 :@wiglaf (dapper ubuntu) |
From: Markus H. <mar...@mh...> - 2005-03-23 10:41:19
|
"Liam M. Healy" <ln...@he...> was heard to say: > get the same result. I actually would like the log file to go to > stdout, but changing > logdest stderr > in marc2risrc worked for one of my clients but not on the other. Now what is the difference between these clients? Unfortunately I can't reproduce this problem. It works for me on FreeBSD as well as on Cygwin. > If I do > marc2ris.pl -L marc2ris.log kirk.usmarc > kirk.ris > it works fine, and at the moment, it's the only way I can run this > script on the second client. > > The second problem is that MARC tags are mixed in with RIS lines; it > appears the -m flag is always on, and I can't shut it off. > This is indeed a bug. I've switched the boolean config values from 0|1 to f|t at some time in the past, and the checks for the -m value did not survive this change. To fix this, please insert the following line as line 180 in marc2ris.pl.in: $marcprint = ($marcprint eq "t") ? $marcprint : undef; This should fix the problem. I've also checked in an updated version into CVS. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |
From: Markus H. <mar...@mh...> - 2005-03-29 11:30:24
|
"Liam M. Healy" <ln...@he...> was heard to say: > The only difference I can discern is that on the RefDB server itself, > it works, but on a non-server client it does not. > Great, that gives me a clue what I have to look for. I'll see what I can do. > > Another marc2ris question: > I generally like to keep the LofC call number in my database, and > currently, the call number in the MARC tag, > 050 00 $a QA402.3 $b .B47 2001 > is lost. Can this be converted? What would be appropriate RIS, N1? > It is usually not a big deal to retrieve additional information from the MARC record by fairly simple modifications of the marc2ris.pl script. The question is rather where to put that information. RIS does not have a field for call numbers of the originating library. It is probably best to use one of U1-U5 or M1-M3. I'll fiddle with the script as soon as time permits. regards, Markus -- Markus Hoenicka mar...@ca... (Spam-protected email: replace the quadrupeds with "mhoenicka") http://www.mhoenicka.de |