Re: [EP-tech] File Icons

James Kerwin via Eprints-tech <[email protected]>
Newsgroups gmane.comp.web.eprints.devel
Message-ID <EMEW3|39706806fa2b05bce409bbefbe64779dv3SFiu14eprints-tech-bounces|ecs.soton.ac.uk|CAKkNZ9CjkJvGBENaEEXyQ4hJRaBp0S7jeB8Jmwbfo7_mHBzSOw@mail.gmail.com>
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 <[email protected]> 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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fblob%2F3.3%2Flib%2Fdefaultcfg%2Fcitations%2Feprint%2Fsummary_page.xml%23L33&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5e3b21d95dd644d7d7fb08d6ccb139b1%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=ggDFid0zIQ79N3fIO2DdkUXk8%2Bec8E3OFwnz6W4WGIk%3D&amp;reserved=0
>
> 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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints%2Fblob%2F3.3%2Fperl_lib%2FEPrints%2FPlugin%2FConvert%2FThumbnails.pm%23L41&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5e3b21d95dd644d7d7fb08d6ccb139b1%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=Vc%2FaJojxsXjPHonGwp%2BMxByulRN5x01AL9VQOKZL6Xs%3D&amp;reserved=0
>
>
>
> 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:* [email protected] [mailto:
> [email protected]] *On Behalf Of *James Kerwin via
> Eprints-tech
> *Sent:* 26 April 2019 10:31
> *To:* [email protected]
> *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:
>
>
>
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FHow_to_write_plugins%23Convert_Plugin&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5e3b21d95dd644d7d7fb08d6ccb139b1%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=Ml90ORMasR3xNVpsJhIWBlPCagiF8k6FWJSD5fgASCo%3D&amp;reserved=0
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FHow_to_write_plugins%23Convert_Plugin&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5e3b21d95dd644d7d7fb08d6ccb139b1%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=Ml90ORMasR3xNVpsJhIWBlPCagiF8k6FWJSD5fgASCo%3D&amp;reserved=0>
>
>
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2Fw%2FAPI%3AEPrints%2FPlugin%2FConvert&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5e3b21d95dd644d7d7fb08d6ccb139b1%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=%2FCmyi619ze6pkUOEaQVphzUMxDyCJabc9o4uaEmENXY%3D&amp;reserved=0
> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2Fw%2FAPI%3AEPrints%2FPlugin%2FConvert&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5e3b21d95dd644d7d7fb08d6ccb139b1%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=%2FCmyi619ze6pkUOEaQVphzUMxDyCJabc9o4uaEmENXY%3D&amp;reserved=0>
>
>
>
>
> 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
>

*** 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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.