Difference between revisions of "PreviewPlusInstallation"

From EPrints Documentation
Jump to: navigation, search
(Adding the preview to eprint render)
(Adding the preview to eprint render)
Line 32: Line 32:
 
In eprint render find where you want the preview to appear on the page and add:
 
In eprint render find where you want the preview to appear on the page and add:
 
  if($session->get_repository()->call("previews_exist", $eprint)){
 
  if($session->get_repository()->call("previews_exist", $eprint)){
                $page->appendChild($session->get_repository()->call("make_preview_plus", $session, $eprint, "horizontal"));
+
        $page->appendChild($session->get_repository()->call("make_preview_plus", $session, $eprint, "horizontal"));
 
   }
 
   }
  

Revision as of 10:45, 4 December 2009

Installation

Begin by downloading PreviewPlus from : SOMEWHERE

Prerequesit software

As prerequisits you will also require FFMPEG, LAME and OpenOffice. On Ubuntu/Debian you can install these from the package manager. On RedHat/Fedora you may have to install them by hand depending what repositories you have available.

FFMPEG:http://ffmpeg.org/index.html

LAME:http://lame.sourceforge.net/

OpenOffice:http://www.openoffice.org/

Plugin Installation

Instructions assume eprints is installed at /opt/eprints3

Extract the tarball into your local archive directory:

cd /opt/eprints3/archives/ARCHIVEID
tar xvzf PreviewPlus.VERSION.tgz

Configure office conversions

Depending what distribution of linux you are using you will find that open office installs in different places. You may need to edit cfg/cfg.d/office_conversions.pl so that $c->{office_path} points to you open office install.

Symlink CGI scripts

ln -s /opt/eprints3/archives/ARCHIVEID/cgi/get_preview_plus /opt/eprints3/cgi/

Adding the preview to eprint render

In eprint render find where you want the preview to appear on the page and add:

if($session->get_repository()->call("previews_exist", $eprint)){
       $page->appendChild($session->get_repository()->call("make_preview_plus", $session, $eprint, "horizontal"));
 }

Setting up cron

You will probably want to run the /opt/eprints3/archives/ARCHIVEID/bin/generate_video_previews and /opt/eprints3/archives/ARCHIVEID/bin/generate_audio_previews nightly. The easiest way to do this is to add them to the eprints users contab.

Currently there is no mechanism to stop these scripts snowballing so make sure you leave long enough in the crontab for one job to finish before the next starts.