I have some script that I would like to share easily.
I have read here that its possible to create a plugin using a set of scripts using "Scripts/Tools group in the Processing toolbox, double-click on the Create script collection plugin item"
Unfortunately I don't have this tools in scripts in ubuntu 16.04 with QGIS 2.14.3, or in windows.
Does anyone know how to solve this problem because if I go into QGIS source I have seen this code that is missing in my QGIS installation: CreateScriptCollectionPluginAction.py.
Now this tools is available in Qgis and works well when you apply the following change (@Joseph helped): C:\Program Files\QGIS 2.16.1\apps\qgis\python\plugins\processing\script And then change the line after the imports:
WIDGET, BASE = uic.loadUiType( os.path.join(pluginPath, 'ui', 'DlgConfig.ui')) with
WIDGET, BASE = uic.loadUiType( os.path.join(pluginPath, 'ui', 'scriptselector.ui')) Re/start QGIS and hopefully it will work:
It works well because when I go to plugin I can enable it. However, unfortunately, after that I am not able to see any new menu where to find the script, whatever in Plugins, processing option.
Did you know where to find the menu ?
4 Answers 4
After asking to 3liz team they explain me that this feature is for next release.
So I will try to build real processing provider plugin but I will also try installing dev build to see if i can try this new feature.
I also receive the error when trying to run the Create script collection plugin (plugin):
AttributeError: 'ScriptSelector' object has no attribute 'scriptsTree'
This post mentions that you need to edit the ScriptSelector.py file which for my Windows QGIS 2.16.1 standalone installation is found in:
C:\Program Files\QGIS 2.16.1\apps\qgis\python\plugins\processing\script
And then change the line after the imports:
WIDGET, BASE = uic.loadUiType(
os.path.join(pluginPath, 'ui', 'DlgConfig.ui'))
with
WIDGET, BASE = uic.loadUiType(
os.path.join(pluginPath, 'ui', 'scriptselector.ui'))
Re/start QGIS and hopefully it will work:
Now Qgis 2.16 release is available.
Unfortunatly, the tools "create script collection plugin" return an error when running whatever windows or Ubuntu Do you know what is the problem because this features is really interesting.
Best
Traceback (most recent call last): File "C:/PROGRA~1/QGIS2~1.16/apps/qgis/./python/plugins\processing\gui\ProcessingToolbox.py", line 276, in executeAlgorithm action.execute() File "C:/PROGRA~1/QGIS2~1.16/apps/qgis/./python/plugins\processing\script\CreateScriptCollectionPluginAction.py", line 83, in execute dlg = ScriptSelector() File "C:/PROGRA~1/QGIS2~1.16/apps/qgis/./python/plugins\processing\script\ScriptSelector.py", line 64, in init self.scriptsTree.addTopLevelItem(groupItem) AttributeError: 'ScriptSelector' object has no attribute 'scriptsTree'
-
2
The QGIS Resource Sharing plugin (http://qgis-contribution.github.io/QGIS-ResourceSharing) was made for this purpose (sharing resources, among them processing scripts, processing models, symbols, layer styles, SVGs, R scripts, expressions, ...).
You can place your Collection on github or elsewhere on the Web and share it, as long as you follow the required repository structure (processing scripts must for instance be placed in a sub-folder named processing
). Details about how to share QGIS resources using the plugin are found on the plugin's web page referenced above.
Explore related questions
See similar questions with these tags.
scripts
folder. If you put all of these into a new folder with an example name like "Hello" and move this into the/qgis2/python/plugins/
directory and re/start QGIS, you will see the "Hello" plugin from the menubar:Plugins > Manage and Install Plugins...
.