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 an example of how to use the URL Rewrite trigger. | |
# In this case, specifically an archive that was initially configured with | |
# a base path (url) of '/usr/share/eprints3/data' rather than '' (no default path). | |
# | |
# This file should be saved to: | |
# <eprints_root>/archives/<archiveid>/cfg/cfg.d/z_rewrite_old_urls.pl | |
# | |
# This trigger will rewrite any requests that match: | |
# <host>/usr/share/eprints3/data/<something> | |
# to: |
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
# Open block | |
{ | |
# Write into EPrints::Script::Compiled | |
package EPrints::Script::Compiled; | |
use strict; | |
# Render event dates when used in citation | |
# This will not affect them when exported/in the database. |
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
#!/usr/bin/perl -w | |
###################################################################### | |
## 1. save file as <eprints_root>/bin/local/check_plugin | |
## 2. make it executable | |
## 3. run it: <eprints_root>/bin/local/check_plugin ARCHIVEID PLUGIN | |
## PLUGIN should be e.g. Export::OAI_DC or Screen::FirstTool | |
###################################################################### | |
use FindBin; | |
use lib "$FindBin::Bin/../../perl_lib"; |
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; |
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
package EPrints::Plugin::Core::EPrintsMetaFieldName; | |
use strict; | |
our @ISA = qw/EPrints::Plugin/; | |
package EPrints::MetaField::Name; | |
use strict; | |
no warnings 'redefine'; | |
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
=head1 NAME | |
EPrints::Plugin::Export::OAI_DC_ORCID | |
=cut | |
package EPrints::Plugin::Export::OAI_DC_ORCID; | |
use EPrints::Plugin::Export::OAI_DC; |
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
{ | |
name => 'referencetext', | |
type => 'longtext', | |
input_rows => 15, | |
render_value => sub { | |
my( $session , $field , $value ) = @_; # see: https://wiki.eprints.org/w/Category:EPrints_Metadata_Fields#Rendering_Properties | |
my $frag = $session->make_doc_fragment; | |
# split value on a double-new line (possibly with other whitespace in between |
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
# Render event dates when used in citation | |
# This will not affect them when exported/in the database. | |
{ | |
# Write into EPrints::Script::Compiled | |
package EPrints::Script::Compiled; | |
use strict; | |
sub run_custom_human_event_dates | |
{ |
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
# Based on EPrints::DataObj::Document::clone | |
# NB Code duplication with Symplectic::RepoProcess::MergeManager | |
# | |
# Cloning documents can result in: | |
# - two documents with the same 'pos' field - and therefore sharing the same folder | |
# - 'spaces' in the document structure (e.g. pos=1 and pos=3, but no pos=2) | |
# this isn't what is needed. The code below manages these scenarios. | |
# EPrints' default behaviour is to remove the 'pos' during a clone *only* when the doc is being cloned to the same parent. | |
sub clone_document | |
{ |
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
<!-- ##################### oa-policy-exceptions ##################### --> | |
<!-- | |
<pubs:oa-policy-exception> | |
<pubs:type>Access1</pubs:type> | |
<pubs:type-description>The output depends on the reproduction of | |
third party content for which open access rights could not be | |
granted (either within the specified timescales, or at all).</pubs:type-description> | |
<pubs:comment>This is a test exception</pubs:comment> | |
</pubs:oa-policy-exception> |
OlderNewer