# A simple interface to www.scholix.org # Takes a PID, eg a DOI, passes this to the scholix API for a list of related online resources # Renders the results as an HTML list # Designed for easy inclusion in other pages via an ajax call # # Justin Bradley, EPrints Servies, April 2020 use EPrints; use JSON; use strict; my $session = EPrints::Session->new(); $session->send_http_header( content_type => "text/html; charset=iso-8859-1" ); my $pid = $session->param( "pid" ); # eg 10.1016/j.quascirev.2019.106103 $pid =~ s/[ ";\\]+//g; my $json_text = `curl -s -X GET "http://api.scholexplorer.openaire.eu/v1/linksFromPid?pid=$pid" -H "accept: application/json"`; my $json = decode_json $json_text; if( !$json || ref($json) ne 'ARRAY' ) { $session->terminate(); exit; } my %seen; my $done_title = 0; # print "
\n"; # print "
\n"; $session->terminate();