EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #03341


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Export plugin with views.pm features


Your example can be done via a 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

Searches can be exported (like any list of objects).

Otherwise you can write your own CGI (if your conditions are more complex) - something like (adapt to your needs):

my $list = $repo->dataset( 'archive' )->search(
    filters => [
           { meta_fields => [qw/ type /], value => 'article', match => 'EX', },
           { meta_fields => [qw/ refereed /], value => 'TRUE', match => 'EX', },
    ] );

binmode( STDOUT, ":utf8" );

$list->export( 'XML', fh => *STDOUT );

Seb.

On 30/07/14 17:01, Gaston.Fournier@etsmtl.ca wrote:

Here is an example of the Boolean expressions used in a cgi script to generate a subset of eprints for the output :                                     

 

if ( $eprint->get_value( "type" ) eq "article" && $eprint->get_value( "refereed" ) eq "TRUE" )

 

GF