[Qgis-developer] Share some of my Processing Scripts

Victor Olaya volayaf at gmail.com
Mon Jun 2 14:00:01 PDT 2014


I have just uploaded a first version of a tool to manage Processing
resources (basically models and scripts)

You will find tools named "Get scripts/models from on-line repository" in
the scripts and models branches of the toolbox. They open a dialog where
you can select the elements to install/uninstall, similar to the plugin
manager

Scripts and models are stored in a repo named QGIS-Processing under the
QGIS organization. I recommend all people with scripts/models that they
want to share, to make pull requests against that repo.

I have added the scripts by Michael and Vincent there, to add some intitial
content (I haven't added any model yet). Please, let me know if you do not
want them to be shared there.

There is a list.txt with some info about the resources available. It's
created automatically by running the create_lists.py script, and it acts
like an easy to retrieve index, so there is no need to browse all the
content and extract metadata from the help files.

In the help files, there is now a ALG_VERSION element to indicate a
version, which is 1.0 if it is not provided. That allows the interface to
know if a script/model is up to date or not.

Notice that the format for help files is now json. That solves the issue
that some people reported, cause by trying to unpickle the help
description. I have converted the help files for the scripts that I added
to the repo, using the help_converter.py script. Feel free to use it for
your own scripts if needed (I might remove it from this repo, since i a not
sure it belongs here...maybe better put it as a gist)

Things to discuss from now: How do we classify the algorithms? How do we
allow people to add new scripts? The pull request mechanism might be too
complex for some people, and the GitHub API allows to add a new file and a
comit to a repo, so we can probably simplify it.

Ideas are welcome. This is just a first try done in a couple of nights so
there is plenty of room for improvement.

Thanks in advance!


2014-06-02 10:52 GMT+02:00 kimaidou <kimaidou at gmail.com>:

> Hi all
>
> Victor, thanks for your review, I will modify the scripts as soon as
> possible.
>
> Sharing scripts raises some questions :
>
> * How can we categorize the scripts to help the users find one particular
> among the many potential scripts that will be shared ? The "group" can
> help, but any script writer can at present use the group he wants to. For
> example, I used "3liz - Database" or "3liz - Vector", etc which makes sense
> for me, but surely not for other users.
>
> * How do we assure that the user has got the last version of each script ?
> As proposed before, I think some "git magic" could help.
>
> * Because it is more easy to create or modifiy, I usually create
> "scripts". We could on the contrary "force" people who share scripts to use
> the capability of Processing to integrate external algo via "provider".
> This supposes to create a plugin for a set of scripts, which is more
> complicated. But this would answer some of the questions above, for example
> "how do we update the scripts", because QGIS plugin architecture would do
> the job. I would also allow the user to temporarilly disable a set of
> script (by disabling the corresponding plugin).
>
> IMHO we should not add more plugins for sharing scripts, but instead use
> the same architecture : we could have a new Processing sub-menu
> "Manage/Install external scripts and models" which would show a similar
> interface as the plugin manager, and similar features : tagging, vote,
> categories, descriptions, etc.
>
> I confess sharing my scripts had a double objective :
> * share them :)
> * begin a discussion about the future workflow to share scripts and
> algorithms.
>
> Cheers
> Michael
>
>
>
>
> 2014-06-02 1:27 GMT+02:00 Giovanni Manghi <giovanni.manghi at faunalia.pt>:
>
> > - Contour : make contours around points at levels (based on the contour
>> plugin)
>> > - Buffer contour : make and merge circular buffer around points at
>> levels
>> > - Points at crossing / touching lines : make a point layer where lines
>> cross or touch each other (2 scripts)
>> > - Fill holes : remove holes in polygons under a certain area
>> > - Remove parts : delete parts in multi polygons under a certain area
>> > - cut by field : cut one polygon layer by another when 2 polygons share
>> a field value
>>
>>
>> very nice both sets of scripts! why not adding them into processing?
>>
>> cheers!
>>
>>
>> -- G --
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140602/1c14007d/attachment-0001.html>


More information about the Qgis-developer mailing list