<div class="gmail_quote">2011/6/14 Chris Crook <span dir="ltr">&lt;<a href="mailto:ccrook@linz.govt.nz">ccrook@linz.govt.nz</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi<br>
<br>
The repository looks good, but I couldn&#39;t upload the plugin - it failed with the message<br>
<br>
    &quot;File upload must be a valid QGIS Python plugin compressed archive. Cannot find valid metadata in VectorFieldRenderer/__init__.py&quot;<br>
<br>
I suspect that this is because my __init__.py is structured as<br>
<br>
   from Plugin import Plugin<br>
<br>
   def name():<br>
       return Plugin.LongName<br>
<br>
   ...<br>
<br>
rather than just being specified as<br>
<br>
   def name():<br>
       return &quot;VectorFieldRenderer&quot;<br>
<br></blockquote><div><br></div><div>Yes, this is probably the reason.</div><div><br></div><div>For security reasons there is no &quot;eval&quot; on the python code, a simple regexp is used instead to extract the strings from the __init__ file.</div>
<div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Is there a document which describes how a plugin needs to be coded to be uploadable to the repository?<br>
<br></blockquote><div><br></div><div><br></div><div>This is one of the docs: <a href="http://www.qgis.org/wiki/Writing_Python_Plugins#__init__.py">http://www.qgis.org/wiki/Writing_Python_Plugins#__init__.py</a></div><div>
<br></div><div>while developing the new repo, some variations were introduced, like the icon (IIRC this has been discussed on the list).</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

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).<br>
</blockquote><div><br></div><div><br></div><div>I can&#39;t comment on this, I wasn&#39;t aware of this functionality. </div><div>You can file a feature request if you like.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
Also I&#39;m wondering how to specify plugin tags?<br></blockquote><div><br></div><div><br></div><div>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.</div>
<div><br></div></div><div><br></div><div>Thanks for your feedback.</div><br>-- <br>Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it">www.itopen.it</a><br>