EPrints Technical Mailing List Archive

Message: #05104

< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: RIS plugin problems (utf8 and journal title)

Hi George,

I originally posted the plugin.  When I submitted it, I expected, and am happy, that others would want to reuse and adapt the code.  Please can you submit a patched version of the plugin back on to the http://files.eprints.org website with a version number?

Many thanks,

Stewart Brownrigg | Library Systems Officer
Learning and Research Systems Development, Information Services, University of Kent
Room SE05, Cornwallis South East
Canterbury, Kent, CT2 7NF, UK
Tel: +44 (0)1227 823621

http://www.kent.ac.uk/is | @ukclibraryit

-----Original Message-----
From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of George Mamalakis
Sent: 13 November 2015 10:12
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] RIS plugin problems (utf8 and journal title)

Hello everybody,

I tried to use the RIS import plugin from: 
http://files.eprints.org/741/. The plugin wouldn't accept the publication field from Google scholar exported entries, nor would it allow UTF8 encoded strings to be imported (both problems have been spotted from the web import functionality). So, I tried to resolve them myself, and I found the following corrections that seem to solve the problems.

diff -r d5f969263300 perl_lib/EPrints/Plugin/Import/RIS.pm
--- a/perl_lib/EPrints/Plugin/Import/RIS.pm     Fri Nov 06 11:22:06 2015 
+++ b/perl_lib/EPrints/Plugin/Import/RIS.pm     Fri Nov 13 11:57:54 2015 
@@ -34,7 +34,6 @@
      my( $plugin, %opts ) = @_;
      my @ids;
      my $fh = $opts{fh}; # File handle
+  binmode( $fh, ":utf8" );
      my @file = <$fh>;
      my ( %record, @records ) = ();
      my $lastkey = undef;
@@ -237,9 +236,6 @@
      # Publication title
      &_join_multiple_field_data($epdata, $entry, ['T2', 'JF'], 'publication', ', ');
+  &_join_multiple_field_data($epdata, $entry, ['T2', 'JO'],
'publication', ', ');
      # Series title
      &_join_field_data($epdata, $entry, 'T3', 'series', ', ');

What I've done was to change the binmode of the file (borrowed from BibTeX import plugin) to accept utf8 encoded strings, and I've added one more entry for the publication field (journal title if I'm not mistaken) to be based on JO rather than JF (which is how scholar returns it).

I am sending these changes to:

a) help anyone having the same problems with the specific plugin,
b) ask if these corrections are correct :), and
c) also to ask what is the proper procedure of reporting these "bugs" so they'll be corrected permanently (eg. contact the maintainer directly, indirectly, what?).

Thanks all for your answers in advance,


George Mamalakis

IT and Security Officer,
Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki), PhD (Aristotle Univ. of Thessaloniki), MSc (Imperial College of London)

School of Electrical and Computer Engineering Aristotle University of Thessaloniki

phone number : +30 (2310) 994379

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/