<div dir="ltr">I agree that the cookbook is a great resource (which is why I put it first on my list), but I think it's better suited to general examples and giving a solid outline of the best practices. If it's not kept concise, it could become a bit of a convolutedĀ mess, in addition to all the broken code issues Richard raises.<div><br></div><div>As much as it provides a place for scripts that have common use cases, there are some scripts I feel are useful to the community that have no place there, nor do they warrant their own plugin.</div><div><br></div><div>For example, if you wanted to print out a list of all the typefaces used in a project, AFAIK there's a fair number of nested attributes you have to loop through which I expect a novice would find rather challenging. At the same time, this hardly seems a relevantĀ use case for the cookbook. In GIS, I find a lot of people who aren't developers find themselves with a need to leverage code, so having a way to support copy-paste programmers is beneficial in my view, but maybe that's just me.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 20 Oct 2020 at 10:59, Richard Duivenvoorde <<a href="mailto:rdmailings@duif.net">rdmailings@duif.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 10/20/20 10:48 AM, Jorge Gustavo Rocha wrote:<br>
> Hi,<br>
> <br>
> I think the PyQGIS Cookbook is the perfect place to share these scripts. The Cookbook is not the API reference documentation. It is the place to share solutions for common problems using the QGIS API.<br>
<br>
While I agree with this, note that it currently is not 'simple' to paste some scripts in the cookbook.<br>
<br>
Because the cookbook became ... uh a mess, because there were non-running old examples in it, the cookbook is now build in a way that the examples IN the cookbook are actually ran/tested (against/in a Docker QGIS instance). This means that if some api changes, the build of the cookbook of the examples using that api would make the build fail. Which is a good check.<br>
<br>
But... it also means that 'just copy pasting' some handy examples is not so easy. You have to make sure that there is data to work with, or make some mockup first to be able an example etc etc...<br>
<br>
So: yes, the cookbook is a good place to showoff use of PyQGIS examples (and to show the use of (sometimes not so intuitive) PyQGIS api)... but for practical examples, it takes (for an average PyQGIS user) maybe too much energy?<br>
<br>
OR (not sure if that is possible) we should add some 'sketchy' page where indeed people can add working examples and which are not tested... (and which will probably become stale and nobody cares to fix them... like the old cookbook examples)<br>
<br>
Not sure what others think about this though...<br>
<br>
Regards,<br>
<br>
Richard Duivenvoorde<br>
_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-user</a></blockquote></div>