[Qgis-user] processing script vs. processing plugin (Ari Jolma)

Ari Jolma ari.jolma at gmail.com
Mon Mar 13 05:38:32 PDT 2017


13.03.2017, 13:24, Andreas Plesch kirjoitti:
> Hi Ari,
>
> thanks for your providing your perspective.
>
> A difference is that a plugin can provide multiple processing 
> algorithms whereas a script only one.
>
> Another cosmetic difference is that a plugin can be managed and 
> published with the plugin manager.
>
> Do you think you could have written your processing algorithms using 
> Perl tools as a collection of processing scripts ?

I think I have made that... In the sense that the plugin

https://plugins.qgis.org/plugins/perlprocessing/

(still the initial version which is not much more than a proof-of-concept)

I wrote allows me to write processing algorithms as processing scripts. 
An example is this script

https://github.com/ajolma/GDALToolsWithPerl/blob/master/dijkstra.pl

which has a few comment lines in the beginning. Those make the script 
usable as a processing algorithm within QGIS. However, it can be used 
from the command line too.

>
> What is a good way of publishing, advertising and serving collections 
> of processing scripts ?

That depends on the provider. This repository

https://github.com/qgis/QGIS-Processing

is AFAIK used by the default (Python script) and R script provider.

>
> Gists ? GitHub repos and rawgit ?
>
> Is there a curated list of published scripts, like an awesome qgis repo ?

The above one. Or maybe you're referring to that one?

If there's interest for Perl scripts I guess we could work out something.

Ari

>
> Andreas
>
>
>     Message: 7
>     Date: Mon, 13 Mar 2017 09:24:17 +0200
>     From: Ari Jolma <ari.jolma at gmail.com <mailto:ari.jolma at gmail.com>>
>     To: qgis-user at lists.osgeo.org <mailto:qgis-user at lists.osgeo.org>
>     Subject: Re: [Qgis-user] processing script vs. processing plugin
>     Message-ID: <8950e763-af35-1135-9b5d-43c57bcd3d05 at gmail.com
>     <mailto:8950e763-af35-1135-9b5d-43c57bcd3d05 at gmail.com>>
>     Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
>     To me it seems that processing algorithm provider plugins are language
>     or tool specific plugins that add a new section to the processing.
>     Processing is itself a plugin (although a core one).
>
>     I don't think providers should add custom GUIs beyond what is
>     needed to
>     manage itself and the algorithms it provides. That is, its GUI is for
>     adding, possibly creating, etc. algorithms. It should mostly work
>     through the processing plugin.
>
>     The "algorithms" are processing tools (scripts, external programs,
>     etc)
>     that only have a thin wrapper so that the provider plugin can help the
>     processing plugin create a GUI for running it or linking it to other
>     tools to create models.
>
>     This is my understanding that I've gained by creating a provider
>     plugin
>     for Perl programs to be used as processing algorithms.
>
>     I'm actually a bit against listing the providers separately since the
>     user should not need to care what language or program the processing
>     tool is written as long as it does what the user wants.
>
>     Best regards,
>
>     Ari
>
>
>     13.03.2017, 04:48, Andreas Plesch kirjoitti:
>     > What are differences between processing algorithms provided as a
>     > processing script or as processing algorithm provider plugin ?
>     >
>     > A plugin can presumably have its own custom GUI but are there are
>     > other differences in available capabilities ?
>     >
>     > Andreas
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20170313/fa3451ef/attachment.html>


More information about the Qgis-user mailing list