<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
tt
        {mso-style-priority:99;
        font-family:"Courier New";}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body bgcolor="white" lang="FR-CA" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">That’s a good starting point and it is working well once you have added the following instructions just at the beginning of the cgi :<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">#!/usr/bin/perl<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">use strict;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">use warnings;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">use EPrints;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">my $eprints = EPrints->new;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">my $repo = $eprints->current_repository;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">exit( 0 ) unless defined $repo;<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">But the big question is : can we get an output with views.pm features (like INCLUDE) without rewriting views.pm? Is there an export plugin with such features (or close to)?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">At the end, the idea is to have a script, which the syntax is similar to the ones we use for harvesting, like :
<a href="http://espace-test.etsmtl.ca/cgi/oai2?verb=ListRecords&metadataPrefix=oai_dc">
http://espace-test.etsmtl.ca/cgi/oai2?verb=ListRecords&metadataPrefix=oai_dc</a> where<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">metadataPrefix calls the export plugin.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">GF<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="FR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:FR-CA">De :</span></b><span lang="FR" style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext;mso-fareast-language:FR-CA">
eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
<b>De la part de</b> Sebastien Francois<br>
<b>Envoyé :</b> 30 juillet 2014 12:39<br>
<b>À :</b> eprints-tech@ecs.soton.ac.uk<br>
<b>Objet :</b> [EP-tech] Re: Export plugin with views.pm features<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Your example can be done via a search:<br>
<br>
<a href="http://demoprints.eprints.org/cgi/search/archive/advanced?screen=Search&dataset=archive&type=article&refereed=TRUE&satisfyall=ALL&order=-date%2Fcreators_name%2Ftitle&_action_search=Search">http://demoprints.eprints.org/cgi/search/archive/advanced?screen=Search&dataset=archive&type=article&refereed=TRUE&satisfyall=ALL&order=-date%2Fcreators_name%2Ftitle&_action_search=Search</a><br>
<br>
Searches can be exported (like any list of objects).<br>
<br>
Otherwise you can write your own CGI (if your conditions are more complex) - something like (adapt to your needs):<br>
<br>
<tt><span style="font-size:10.0pt">my $list = $repo->dataset( 'archive' )->search(</span></tt><span style="font-size:10.0pt;font-family:"Courier New""><br>
<tt> filters => [</tt><br>
<tt> { meta_fields => [qw/ type /], value => 'article', match => 'EX', },</tt><br>
<tt> { meta_fields => [qw/ refereed /], value => 'TRUE', match => 'EX', },</tt><br>
<tt> ] );</tt><br>
<br>
<tt>binmode( STDOUT, ":utf8" );</tt><br>
<br>
<tt>$list->export( 'XML', fh => *STDOUT );</tt><br>
</span><br>
Seb.<br>
<br>
On 30/07/14 17:01, <a href="mailto:Gaston.Fournier@etsmtl.ca">Gaston.Fournier@etsmtl.ca</a> wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">Here is an example of the Boolean expressions used in a cgi script to generate a subset of eprints for the output :</span><span lang="EN-CA">
</span><span lang="EN-CA" style="color:#1F497D">
</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">if ( $eprint->get_value( "type" ) eq "article" && $eprint->get_value( "refereed" ) eq "TRUE" )</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D">GF</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-CA" style="color:#1F497D"> </span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";mso-fareast-language:FR-CA"><o:p> </o:p></span></p>
</div>
</body>
</html>