Created
October 13, 2016 13:24
-
-
Save jesusbagpuss/1f553a6ef5540c2de57bceefff81fdf2 to your computer and use it in GitHub Desktop.
Add data to OAI-PMH export
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THIS IS UNTESTED | |
# try it on a test server first! | |
# | |
# Save file to: ~/archives/ARCHIVEID/cfg/plugins/EPrints/Plugin/Export/LocalDC.pm | |
# then run: | |
# > bin/epadmin test ARCHIVEID | |
# if there are no errors, add the file below and run it again. | |
# if there are still no errors, restart apache and test the OAI-PMH interface. | |
package EPrints::Plugin::Export::LocalDC; | |
@ISA = ( 'EPrints::Plugin::Export::DC' ); | |
use strict; | |
sub convert_dataobj | |
{ | |
my( $plugin, $eprint ) = @_; | |
my @dcdata = $plugin->SUPER::convert_dataobj( $eprint ); | |
# add isbn | |
push @dcdata, $plugin->simple_value( $eprint, isbn => "identifier" ); | |
# add doi/id_number (field usage may vary!) | |
push @dcdata, $plugin->simple_value( $eprint, id_number => "identifier" ); | |
push @dcdata, $plugin->simple_value( $eprint, doi => "identifier" ); | |
return \@dcdata | |
} | |
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# THIS IS UNTESTED | |
# try it on a test server first! | |
# | |
# Save file to: ~/archives/ARCHIVEID/cfg/cfg.d/z_plugins_oai.pl | |
# | |
# Alias the new plugin to the old one: | |
$c->{plugin_alias_map}->{"Export::DC"} = "Export::LocalDC"; | |
$c->{plugin_alias_map}->{"Export::LocalDC"} = undef; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, finally I tried but it doesn't work.
I had to change the main DC.pm file.