[Koha-devel] Koha 3.22, Plack & EDS plugin

SUZUKI Arthur arthur.suzuki at univ-lyon3.fr
Wed Feb 8 11:30:30 CET 2017


Hello Hugo,

For my plugin I had to change some things in plack.psgi file, otherwise 
Perl code wouldn't get executed.

First add the plugins source directory to the cached perl files :

my $plugins = Plack::App::CGIBin->new( root => '/home/koha/var/lib/plugins/' )->to_app;

Secondly in the "builder" section of plack.psgi add a /plugins mount point:

mount '/plugins' => $plugins;

Then in nginx config you can add the following lines:

rewrite     ^/recommendations.pl$ /plugins/Koha/Plugin/Com/Liliputech/RecommenderEngine/recommendations.pl;

location /plugins {

          include /home/koha/etc/nginx.d/plack_proxy.conf;

}

And it works, pffeeewww! (don't forget to change files and dir according 
to your installation).

Now I changed the way my plugin works so as not to rely on such complex 
hacks though.
All data generated from my plugin is now available through the "Public 
Report" interface, which is much more convenient I must say :
https://calyx.net.au/enhancing-kohas-public-reports-feature/
If you want to check my source : 
https://github.com/liliputech/koharecommenderengine

Hope that may help.
All the best,
Arthur

Le 08/02/2017 à 08:13, Hugo Agud a écrit :
> Good morning
>
> There is any new on this? we have tried to install EDS plugin to Koha, 
> but it doesn't appear on the intranet (I guess because of plack) , but 
> there is on the plugin folder... I am going to contact ebsco, but if 
> any body wish to share some info on it... I will pass to EBSCO
>
> Kindest Regards
>
> 2016-11-22 16:33 GMT+01:00 SUZUKI Arthur <arthur.suzuki at univ-lyon3.fr 
> <mailto:arthur.suzuki at univ-lyon3.fr>>:
>
>     Some of the tricks used to integrate code from an intranet plugin
>     on OPAC are explained here.
>
>     https://github.com/bywatersolutions/koha-plugin-coverflow#setup
>     <https://github.com/bywatersolutions/koha-plugin-coverflow#setup>
>
>     This "Setup" part explains quite well the Apache config
>     modifications needed to let users access coverflow.pl
>     <http://coverflow.pl> from OPAC, and why does this "coverflow.pl
>     <http://coverflow.pl>" exist.
>
>     the EDS plugin documentation lacks this information about Apache conf.
>
>     (actually it doesn't but it is digged really deep :
>     https://github.com/ebsco/edsapi-koha-plugin/wiki/Apache-Setup
>     <https://github.com/ebsco/edsapi-koha-plugin/wiki/Apache-Setup>)
>
>     Le 22/11/2016 à 16:12, Paul Poulain a écrit :
>
>         Hi Arthur,
>
>         The intranet part of the "plugin" is a plugin, so yes, it goes
>         into the scope of Plack.
>
>         But the eds-*.pl files
>         (https://github.com/ebsco/edsapi-koha-plugin/tree/master/Koha/Plugin/EDS/opac
>         <https://github.com/ebsco/edsapi-koha-plugin/tree/master/Koha/Plugin/EDS/opac>)
>         don't. That's the OPAC part of the "plugin", that is not
>         really a plugin
>
>
>         Le 22/11/2016 à 15:49, SUZUKI Arthur a écrit :
>
>             Hello Paul,
>
>             I don't know much about EDS nor Plack but I've been
>             playing with koha plugin functionality lately.
>
>             I guess you're talking about this plugin :
>             https://github.com/ebsco/edsapi-koha-plugin
>             <https://github.com/ebsco/edsapi-koha-plugin>
>
>             does the koha plugin directory falls in the Plack scope?
>
>             If koha is installed from Source, this directory is
>             "$KOHA_USERDIR/var/lib/plugins/"
>
>             (I don't know for debian package, but probably something
>             like /var/lib/koha/plugins)
>
>             Hope this helps.
>
>             Arthur
>
>             Le 22/11/2016 à 15:17, Paul Poulain a écrit :
>
>                 Hello friends,
>
>                 We've deployed Koha 3.22, running Plack and the EDS
>                 plugin, and it appears that it does not work. We think
>                 it's because there are some .pl code that is out of
>                 plack scope, so it's not run. Is there anyone here who
>                 has some experience with koha / Plack / EDS ?
>
>                 (Frido will probably send a patch to Ebsco in the next
>                 days if there's no other ida)
>
>
>
>
>
>     -- 
>     Arthur SUZUKI
>     Service informatique des bibliothèques
>     BIBLIOTHÈQUES UNIVERSITAIRES
>     Université Jean Moulin Lyon 3
>     6 Cours Albert Thomas - B.P. 8242 – 69355
>     <tel:8242%20%E2%80%93%2069355> Lyon Cedex 08
>     ligne directe : +33 (0)4 78 78 79 16
>     <tel:%2B33%20%280%294%2078%2078%2079%2016> | http://bu.univ-lyon3.fr
>     L'Université Jean Moulin est membre fondateur de l'Université de Lyon
>
>     _______________________________________________
>     Koha-devel mailing list
>     Koha-devel at lists.koha-community.org
>     <mailto:Koha-devel at lists.koha-community.org>
>     http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
>     <http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel>
>     website : http://www.koha-community.org/
>     git : http://git.koha-community.org/
>     bugs : http://bugs.koha-community.org/
>     <http://bugs.koha-community.org/>
>
>

-- 
Arthur SUZUKI
Service informatique des bibliothèques
BIBLIOTHÈQUES UNIVERSITAIRES
Université Jean Moulin Lyon 3
6 Cours Albert Thomas - B.P. 8242 – 69355 Lyon Cedex 08
ligne directe : +33 (0)4 78 78 79 16 | http://bu.univ-lyon3.fr
L'Université Jean Moulin est membre fondateur de l'Université de Lyon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20170208/87694a66/attachment-0001.html>


More information about the Koha-devel mailing list