[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



Hmm I don't think so - INCLUDE's are static files generated on-disk. 
Searches etc do not generate such pages. But there must be some export 
formats that will output stuff that you can include somewhere else (like 
'HTML Citation').

It could be helpful to provide more examples of what you're trying to 
achieve. So far, your example is covered by the standard search (which 
has all the export functions you want).

Seb.


On 30/07/14 20:25, Gaston.Fournier at etsmtl.ca wrote:
>
> 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 :
>
> #!/usr/bin/perl
>
> use strict;
>
> use warnings;
>
> use EPrints;
>
> my $eprints = EPrints->new;
>
> my $repo = $eprints->current_repository;
>
> exit( 0 ) unless defined $repo;
>
> 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)?
>
> At the end, the idea is to have a script, which the syntax is similar 
> to the ones we use for harvesting, like : 
> http://espace-test.etsmtl.ca/cgi/oai2?verb=ListRecords&metadataPrefix=oai_dc 
> where
>
> metadataPrefix calls the export plugin.
>
> GF
>
> *De :*eprints-tech-bounces at ecs.soton.ac.uk 
> [mailto:eprints-tech-bounces at ecs.soton.ac.uk] *De la part de* 
> Sebastien Francois
> *Envoy? :* 30 juillet 2014 12:39
> *? :* eprints-tech at ecs.soton.ac.uk
> *Objet :* [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 at etsmtl.ca 
> <mailto:Gaston.Fournier at 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
>
>
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20140731/06101eb2/attachment.html