EPrints Technical Mailing List Archive

Message: #08552


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

Re: [EP-tech] BibTeX importing


Hi Francis,

For EPrints 3.3 it can be found at [EPRINTS_PATH]/perl_lib/EPrints/Plugin/Import/BibTeX.pm on 3.4 it can be found at [EPRINTS_PATH]/flavours/pub_lib/plugins/EPrints/Plugin/Import/BibTeX.pm.  However, I would not advise editing this file directly.  Rather I would extend the class in your archive as cfg/plugins/EPrints/Plugin/Import/LocalBibTeX.pm and add the following lines to your archive's cfg/cfg.d/plugins.pl

$c->{plugin_alias_map}->{"Import::BibTeX"} = "Import::LocalBibTeX";

$c->{plugin_alias_map}->{"Import::LocalBibTeX"} = undef;

Then in LocalBibTeX.pm your code should look something like this:

package EPrints::Plugin::Import::LocalBibTeX;

use EPrints::Plugin::Import::BibTeX;
use strict;

our @ISA = qw/ EPrints::Plugin::Import::BibTeX /;

sub new
{
        my( $class, %params ) = @_;

        my $self = $class->SUPER::new( %params );

        # Alter plugin attributes if you want
        $self->{name} = "Local BibTeX";

        return $self;
}

sub convert_input
{
        my ( $plugin, $input_data ) = @_;

        my $epdata = $plugin->SUPER::convert_input( $input_data );

        # Add code to do extra BibTeX to epdata conversion here. 

        return $epdata;
}

1;

Regards

David Newman


On 09/03/2021 06:52, Francis Jayakanth via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.

Dear List Members, we import Scopus records of our institute to our
eprints repository every week. There is a need for us to import a few
additional fields like references and funding agency details. By
default, references and funding agency details are not imported
through the BibTeX plugin. Can someone please let me know where to
control the importing through the BibTex plugin?

Thanks and regards, Francis

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: https://eur03.safelinks.protection.outlook.com/?url="">
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url="">