[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C7390323e72134f1054a208d8e2d543e7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637508753334263382%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=F4exCMVzA8Yk2rw5DnFva3AlbueS5rtkNE%2BWq18bcCA%3D&reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C7390323e72134f1054a208d8e2d543e7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637508753334263382%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=bdP7Fh9K%2BwHxb5InSyJ5NYVsY68dQL6CwT8zpfVDfPY%3D&reserved=0


-- 
This email has been checked for viruses by AVG.
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avg.com%2F&data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C7390323e72134f1054a208d8e2d543e7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637508753334263382%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=zwoEzAp3dBpGgXEUfhaFBj8z3CFE7qwoONPr8smaWoE%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20210309/32958082/attachment-0001.html