Difference between revisions of "Files/Export metadata in BIBTEX-format"

From EPrints Documentation
Jump to: navigation, search
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:EPrints 2 Plugins]]
For using this script you have to make some changes in
For using this script you have to make some changes in

Latest revision as of 17:36, 9 February 2010

For using this script you have to make some changes in

  • the citations-en.xml,
  • the phrases-en.xml,
  • the ArchiveConfig.pm,
  • the ArchiveRenderConfig.pm


two new entries in the citations-en.xml

<ep:citation type="eprint_bibtexitem">
        <ep:ifset name="title">BibTex</ep:ifset>
        <ep:ifnotset name="title">Untitled @eprintid@</ep:ifnotset>

I create a special citation type for a better parsing

<ep:citation type="eprint_bibtex">
   Citation-begin <ep:linkhere>
   <span class="citation">
   Aut-begin author = {@authors@} Aut-end
   <ep:ifset name="year"> Year-begin year = {@year@} Year-end</ep:ifset>
   Title-begin title = {@title@} Title-end
   <ep:ifset name="editors"> Editor-begin editor = {@editors@} Editor-end</ep:ifset>
   <ep:ifset name="volume"> Volumne-begin volume = {@volume@} Volumne-end</ep:ifset>
   <ep:ifset name="pages"> Pages-begin pages = {@pages@} Pages-endType-end</ep:ifset>
   <ep:ifset name="confloc">, @confloc@</ep:ifset>
   <ep:ifset name="confdates">, @confdates@</ep:ifset>
   <ep:ifset name="conference"> Conference-begin booktitle = {@conference@, @confloc@, @confdates@} Conference-end</ep:ifset>
   <ep:ifset name="chapter"> Chapter-begin chapter = {@chapter@} Chapter-end</ep:ifset>
   <ep:ifset name="publisher"> Publisher-begin publisher = {@publisher@} Publisher-end</ep:ifset>
   <ep:ifset name="publication"> Publication-begin journal = {@publication@} Publication-end</ep:ifset>
   <ep:ifset name="institution"> Institution-begin institution = {@institution@} Institution-end</ep:ifset>
   <ep:ifset name="number"> Number-begin number = {@number@} Number-end</ep:ifset> 


<ep:phrase ref="viewname_eprint_bibtex">Bibtex</ep:phrase>


<ep:phrase ref="page:BibTex">Display Formats</ep:phrase>


{ id=>"bibtex", fields=>"year", order=>"title/authors", citation=>"bibtex", nohtml=>1, nolink=>1, include=>1, nocount=>1},


The BIBTEX-Entry

my $bibtexid = new EPrints::EPrint(
       $eprint->get_value( "eprintid" ) );
   my $bibtex;
   $bibtex = $session->make_element( "a", 
       href=>$eprint->{session}->get_archive()->get_conf( "" )."/data/".$bibtexid->get_value( "eprintid" ).".bibtex", target=>'_blank');
       $bibtexid->render_citation( "bibtexitem") );
   $table->appendChild( _render_row(
       $session->html_phrase( "page:BibTex" ),
       $bibtex ) );