EPrints Technical Mailing List Archive

Message: #07809


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

Re: [EP-tech] File Icons


Hi John,

Thank you for the guidance.

I've spent a couple of hours today looking through everything and not getting very far.

It turns out the imagemagick isn't installed. When I do:

"which convert"

I get nothing! A bit embarrassing that I didn't check this earlier, but there we are.

Thanks again for your help,
James

On Fri, Apr 26, 2019 at 12:14 PM John Salter <J.Salter@leeds.ac.uk> wrote:

Hi James,

In the default EPrints 'summary page' citation, the $doc.icon method is used to display a thumbnail if one exists. See: https://github.com/eprints/eprints/blob/3.3/lib/defaultcfg/citations/eprint/summary_page.xml#L33

The thumbnails are generated by the indexer - and this may not be enabled for your repository.

 

You're looking in the right place - the convert plugin.

If you want to test what the thumbnails will do by default, look at the 'call_convert' method in EPrints::Plugin::Convert::Thumbnails.

From this you should be able to deduce what command-line will be called to generate the thumbnails - and therefore be able to test it on your server.

 

Some of the parts might need explaining - e.g. what "$geom^" compared to "$geom>" means (it's in the ImageMagick documentation somewhere).

 

Most of the Thumbnail plugin is overridable in the repository configuration - so if you needed to change the thumbnail sizes, how they're cropped etc., you can do that without subclassing the module.

 

The most important piece might be the second half of this line:

https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/Plugin/Convert/Thumbnails.pm#L41

 

For our repo, in [EPRINTS_ROOT]/lib/syscfg.d/executables.pl, we have:

my %executables = (

    'convert' => '/usr/bin/convert',

    'ffmpeg' => '/usr/bin/ffmpeg',

);

 

Cheers,

John

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of James Kerwin via Eprints-tech
Sent: 26 April 2019 10:31
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] File Icons

 

Hi All,

 

The files in the repository currently display as generic icons, I think there is some difference depending on whether they're .docx,.pdf,.jpg etc.

 

I have noticed some other repositories have icons that are the front page of the document they represent. Can anybody please nudge me in the right direction for setting this up at Liverpool?

 

I've so far been reading about imagemagick, Convert plugins and these pages:

 

 

The wider scope of this is part of our PhD thesis digitisation project. I want to try to display the files in a nicer way and maybe place them in a carousel on their abstract pages. There is talk about each thesis chapter being its own file so I want to display them as neatly as possible.

 

Thanks,

James