EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #01081
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: Citation import plugin errors
- To: eprints-tech@ecs.soton.ac.uk
- Subject: [EP-tech] Re: Citation import plugin errors
- From: Thomas Haines <HainesT@cardiff.ac.uk>
- Date: Thu, 13 Sep 2012 13:34:15 +0100
Hi Paolo and Mark,
Thanks for your ideas and feedback - I incidentally discovered the same problem - the epdata_to_dataobj being amended in eprints 3.3, so I took the old versions of Import.pm and TextFile.pm from 3.2, renamed those to ImportOld.pm and TextFileOld.pm and inherited from those instead, so as not to break any other plugins. So far it is working!
In terms of Scopus, the new system needs an API key which you can sign up for (replaces the old developer ID), and to get the XML response (atom feed) you need to be a subscriber of their service. Otherwise it is a JSON feed which is available. If you are a subscriber, the code I amended in the Scopus.pm plugin was in the URI construction and sending section to add some posted headers:
# send the query to Scopus
my $ua = LWP::UserAgent->new;
$ua->default_header('X-ELS-APIKey' => "INSERT YOUR API KEY HERE");
$ua->default_header('X-ELS-ResourceVersion' => "XOCS");
$ua->default_header('ACCEPT' => "application/atom+xml");
my $response = $ua->get( $quri );
It may be that someone wants to look into a JSON based alternative for non subscribers.
Also in Scopus.pm I sometimes got unhandled errors when running the utf8::decode lines. I replaced this by adding use Encode and e.g.:
$title = decode_utf8( $title );
instead of
utf8::decode($title);
Still finishing up things and testing here but if anyone is interested in this or is looking into the ISI/WOS plugin update please let me know.
cheers,
Tom Haines
Electronic Information Resources Developer
Library Systems Team
INSRV
Cardiff University
hainest@cf.ac.uk
x70435
-----eprints-tech-bounces@ecs.soton.ac.uk wrote: -----
To: eprints-tech@ecs.soton.ac.uk
From: Paolo Tealdi
Sent by: eprints-tech-bounces@ecs.soton.ac.uk
Date: 13/09/2012 09:08
Subject: [EP-tech] Re: Citation import plugin errors
From: Paolo Tealdi
Sent by: eprints-tech-bounces@ecs.soton.ac.uk
Date: 13/09/2012 09:08
Subject: [EP-tech] Re: Citation import plugin errors
On 09/12/2012 06:23 PM, Paolo Tealdi wrote:
> On 09/12/2012 04:00 AM, Mark Gregson wrote:
>
> Hi Mark,
>
> Maybe it's simpler to patch import_citationdata commenting Handler
> definition,
>
> -- import_citationdata.original 2012-09-12 18:06:54.000000000 +0200
> +++ import_citationdata 2012-09-12 17:57:07.000000000 +0200
> @@ -230,7 +230,7 @@
> {
> $plugin = $session->plugin(
> $pluginmap->{$datasetid},
> - Handler => $handler,
> +# Handler => $handler,
> net_retry => {
> max => $net_retry_max,
> interval => $net_retry_interval,
>
> you can't log in a file, but for a batch STDERR is enough.
> In my test server this patch works ...
Hi Mark and all,
maybe this patch to LogHandler is even better.
--- LogHandler.pm.original 2012-09-13 09:59:33.000000000 +0200
+++ LogHandler.pm 2012-09-13 09:05:33.000000000 +0200
@@ -33,6 +33,9 @@
use strict;
+use EPrints::CLIProcessor;
+our @ISA = ( "EPrints::CLIProcessor" );
+
#
The only thing that it doesn't work no more is the output of the two strings
Item parsed.
Imported <source> <number>
It seems that EPrints::LogHandler::parsed() and
EPrints::LogHandler::output() method aren't anymore called by
epdata_to_dataobj().
Best regards,
Paolo Tealdi
--
Ing. Paolo Tealdi Area IT - Politecnico Torino
Telefono/Phone : +39-011-0906714 , FAX : +39-011-0906799
Indirizzo/Address : C.so Duca degli Abruzzi, 24 - 10129 Torino - ITALY
Skype : tealdi.paolo
Please consider your environmental responsibility before printing this e-mail
*** 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/
> On 09/12/2012 04:00 AM, Mark Gregson wrote:
>
> Hi Mark,
>
> Maybe it's simpler to patch import_citationdata commenting Handler
> definition,
>
> -- import_citationdata.original 2012-09-12 18:06:54.000000000 +0200
> +++ import_citationdata 2012-09-12 17:57:07.000000000 +0200
> @@ -230,7 +230,7 @@
> {
> $plugin = $session->plugin(
> $pluginmap->{$datasetid},
> - Handler => $handler,
> +# Handler => $handler,
> net_retry => {
> max => $net_retry_max,
> interval => $net_retry_interval,
>
> you can't log in a file, but for a batch STDERR is enough.
> In my test server this patch works ...
Hi Mark and all,
maybe this patch to LogHandler is even better.
--- LogHandler.pm.original 2012-09-13 09:59:33.000000000 +0200
+++ LogHandler.pm 2012-09-13 09:05:33.000000000 +0200
@@ -33,6 +33,9 @@
use strict;
+use EPrints::CLIProcessor;
+our @ISA = ( "EPrints::CLIProcessor" );
+
#
The only thing that it doesn't work no more is the output of the two strings
Item parsed.
Imported <source> <number>
It seems that EPrints::LogHandler::parsed() and
EPrints::LogHandler::output() method aren't anymore called by
epdata_to_dataobj().
Best regards,
Paolo Tealdi
--
Ing. Paolo Tealdi Area IT - Politecnico Torino
Telefono/Phone : +39-011-0906714 , FAX : +39-011-0906799
Indirizzo/Address : C.so Duca degli Abruzzi, 24 - 10129 Torino - ITALY
Skype : tealdi.paolo
Please consider your environmental responsibility before printing this e-mail
*** 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/
- References:
- [EP-tech] Citation import plugin errors
- From: Thomas Haines <HainesT@cardiff.ac.uk>
- [EP-tech] Re: Citation import plugin errors
- From: Tim Brody <tdb2@ecs.soton.ac.uk>
- [EP-tech] Re: Citation import plugin errors
- From: Mark Gregson <mark.gregson@qut.edu.au>
- [EP-tech] Re: Citation import plugin errors
- From: Paolo Tealdi <paolo.tealdi@polito.it>
- [EP-tech] Re: Citation import plugin errors
- From: Paolo Tealdi <paolo.tealdi@polito.it>
- [EP-tech] Citation import plugin errors
- Prev by Date: [EP-tech] Re: Is IRStats 1.0.3 compatible with EPrints 3.3.10?
- Next by Date: [EP-tech] Re: Is IRStats 1.0.3 compatible with EPrints 3.3.10?
- Previous by thread: [EP-tech] Re: Citation import plugin errors
- Next by thread: [EP-tech] Re: Citation import plugin errors
- Index(es):