2011/6/14 Chris Crook <ccr...@linz.govt.nz> > Hi > > The repository looks good, but I couldn't upload the plugin - it failed > with the message > > "File upload must be a valid QGIS Python plugin compressed archive. > Cannot find valid metadata in VectorFieldRenderer/__init__.py" > > I suspect that this is because my __init__.py is structured as > > from Plugin import Plugin > > def name(): > return Plugin.LongName > > ... > > rather than just being specified as > > def name(): > return "VectorFieldRenderer" > > Yes, this is probably the reason.
For security reasons there is no "eval" on the python code, a simple regexp is used instead to extract the strings from the __init__ file. > Is there a document which describes how a plugin needs to be coded to be > uploadable to the repository? > > This is one of the docs: http://www.qgis.org/wiki/Writing_Python_Plugins#__init__.py while developing the new repo, some variations were introduced, like the icon (IIRC this has been discussed on the list). > Also some while ago I proposed a convention of putting plugin documentation > in an index.html file in the plugin directory (which is now supported by the > showPluginHelp function in utils.py). I wonder if it would be good provide > access to this from the plugin repository (ie make it available for viewing > if it is included in the zip file). > I can't comment on this, I wasn't aware of this functionality. You can file a feature request if you like. > > Also I'm wondering how to specify plugin tags? > Tags were introduced in Lisbon, at this time, they are only editable through the plugin web interface, there is currently no way to put them in the __init__ and have them automatically imported in the repo. Thanks for your feedback. -- Alessandro Pasotti w3: www.itopen.it
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer