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
{ | |
"type": "thesis", | |
"title": "This is a test thesis", | |
"publisher": "University of Leeds", | |
"publisher-place": "Leeds, UK", | |
"genre": "Doctoral thesis", | |
"source": "test.repository.leeds.ac.uk", | |
"abstract": "The abstract of the thesis.", | |
"URL": "https://test.repository.leeds.ac.uk/123456/", | |
"language": "en", |
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::WRRecaptcha; | |
use strict; | |
our @ISA = qw/ EPrints::Plugin /; | |
###################################################################### | |
# | |
# Use recaptcha.net instead of Google, so people in China can add their stuff | |
# | |
###################################################################### | |
# |
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; | |
# Example usage in citation file: | |
# |
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 the block from EPrints::DataObj::EPrint, but with: | |
# export_as_xml => 1 | |
# and | |
# replace_core => 1 (to overwrite the default field) | |
push @{ $c->{fields}->{eprint} }, | |
{ name=>"item_issues", type=>"compound", multiple=>1, | |
fields => [ | |
{ | |
sub_name => "id", |
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 | |
### SAVE FILE TO ~/bin/local/eprints_to_reindex, or edit the FindBin path below according to where you've saved it. | |
use FindBin; | |
use lib "$FindBin::Bin/../../perl_lib"; | |
use EPrints; | |
use strict; |
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 | |
# Usage: ~/bin/local/get_user_preferences ARCHIVEID USERID | |
# NOTE: If you save this to a location other that EPRINTS_ROOT/bin/local/ the 'use lib' statement | |
# below will need to be adjusted accordingly | |
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
{ | |
package EPrints::Script::Compiled; | |
use strict; | |
sub run_wrro_people_limited | |
{ | |
my( $self, $state, $value, $limit ) = @_; | |
my $session = $state->{session}; |
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 fix was submitted to Symplectic April 2018 | |
# As yet they haven't made a new release of the connector with it included :o\ | |
# | |
# | |
# The changes below consist of: | |
# - new method in Symplectic::RepoProcess::MergeManager | |
# - replace two method calls with calls to the new method | |
# |
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> |
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 | |
{ |