Re: [Qgis-developer] Processing scripts in stand-alone Python scripts

2015-12-15 Thread Victor Olaya
I think this change that i just added should help with that https://github.com/qgis/QGIS/commit/08a8b6095f09ffc88b8bf034470b1c5a3cab3486 Now the default scripts folder will always be in the users folder, no matter how Processing is used/called. Hope this helps! 2015-12-15 10:36 GMT+01:00 Anita

Re: [Qgis-developer] Processing scripts in stand-alone Python scripts

2015-12-15 Thread Anita Graser
On Mon, Nov 30, 2015 at 5:16 PM, Victor Olaya wrote: > The issue is that the "default" folder is based on the location of the > parent app (if I am not wrong). I can probably move it to somewhere in > .qgis2 instead. But if there is a manually entered path, then it will > not use the default one

Re: [Qgis-developer] Processing scripts in stand-alone Python scripts

2015-11-30 Thread Victor Olaya
The issue is that the "default" folder is based on the location of the parent app (if I am not wrong). I can probably move it to somewhere in .qgis2 instead. But if there is a manually entered path, then it will not use the default one, that's only used if no custom configuration has been done. L

Re: [Qgis-developer] Processing scripts in stand-alone Python scripts

2015-11-30 Thread Anita Graser
On Fri, Nov 27, 2015 at 3:53 PM, Anita Graser wrote: > On Fri, Nov 27, 2015 at 8:58 AM, Victor Olaya wrote: > >> I think this must be related to the configuration of the plugins folder. >> >> The script provider reads scripts in the scripts folder, which is >> configured as an option. Maybe that

Re: [Qgis-developer] Processing scripts in stand-alone Python scripts

2015-11-27 Thread Anita Graser
On Fri, Nov 27, 2015 at 8:58 AM, Victor Olaya wrote: > I think this must be related to the configuration of the plugins folder. > > The script provider reads scripts in the scripts folder, which is > configured as an option. Maybe that setting is not available in your > stand-alone script...since

Re: [Qgis-developer] Processing scripts in stand-alone Python scripts

2015-11-27 Thread Seno Adiwicaksono
Hi, I think you can try calling ProcessingConfig.setSettingValue() to set the script dir before initializing. Here is how I did it with R scripts in R_SCRIPTS_FOLDER: from processing.core.ProcessingConfig import ProcessingConfig from processing.core.Processing import Processing ProcessingConfig.s

Re: [Qgis-developer] Processing scripts in stand-alone Python scripts

2015-11-26 Thread Victor Olaya
I think this must be related to the configuration of the plugins folder. The script provider reads scripts in the scripts folder, which is configured as an option. Maybe that setting is not available in your stand-alone script...since it is stored using QSettings. You can check it calling ScriptUt

Re: [Qgis-developer] Processing scripts in stand-alone Python scripts

2015-11-26 Thread Anita Graser
On Thu, Nov 26, 2015 at 11:17 PM, Luigi Pirelli wrote: > processing.alglist('script') to retrieve the list of commands with > "script" string inside it's name or description > e.g. > processing.alglist('ogr') > returns a lot of elements... if we get one of them > ​--- >8 -

Re: [Qgis-developer] Processing scripts in stand-alone Python scripts

2015-11-26 Thread Luigi Pirelli
processing.alglist('script') to retrieve the list of commands with "script" string inside it's name or description e.g. processing.alglist('ogr') returns a lot of elements... if we get one of them OGR default-->quickosm:ogrdefault I've the command name "q

Re: [Qgis-developer] Processing scripts in stand-alone Python scripts

2015-11-26 Thread Michael Kirk
Very excited to find the answer to this. It's exactly where I had to stop when trying to write some tests for processing. :) > On Nov 26, 2015, at 6:55 AM, qgis-developer-requ...@lists.osgeo.org wrote: > > Re: Processing scripts in stand-alone Pythonscripts __

Re: [Qgis-developer] Processing scripts in stand-alone Python scripts

2015-11-26 Thread Anita Graser
On Thu, Nov 26, 2015 at 2:44 PM, Anita Graser wrote: > HI Victor, > > On Thu, Nov 26, 2015 at 1:12 PM, Victor Olaya wrote: > >> does Processing.getAlgorithm("script:helloworld") work in a normal >> QGIS Python console? >> > > ​Yes it does​. > > Just in case, the name of the script is the name of

Re: [Qgis-developer] Processing scripts in stand-alone Python scripts

2015-11-26 Thread Anita Graser
HI Victor, On Thu, Nov 26, 2015 at 1:12 PM, Victor Olaya wrote: > does Processing.getAlgorithm("script:helloworld") work in a normal > QGIS Python console? > ​Yes it does​. Just in case, the name of the script is the name of the file (without > the extension) > > Maybe you can try > ​​ > Proce

Re: [Qgis-developer] Processing scripts in stand-alone Python scripts

2015-11-26 Thread Victor Olaya
does Processing.getAlgorithm("script:helloworld") work in a normal QGIS Python console? Just in case, the name of the script is the name of the file (without the extension) Maybe you can try Processing.alghelp("script") to get the name of available algorithms from the script provider Hope this h

[Qgis-developer] Processing scripts in stand-alone Python scripts

2015-11-26 Thread Anita Graser
Hi, I'm trying to run Processing scripts in a stand-alone Python script. The examples available online for calling default, e.g. QGIS algorithms, work fine but when I try to access a script instead, it cannot be found, i.e. getAlgorithm() returns None. Am I missing something or is this a bug? #