[QGIS-Developer] RES: Processing script to audit all projects in a directory and subdirectories

jorgealmerio at yahoo.com.br jorgealmerio at yahoo.com.br
Fri Jul 16 07:45:28 PDT 2021


Hi,

 

Hum, bizarre... Do you see all the projects which should be there, ie which are present in the directory(ies) but not listed in the output CSV file ?

 

Yes, All the files are listed correctly in CSV file. The only thing strange it has a blank line between each record (Qgs project).

 

Thanks for the others replies.

 

Cheers,

 

Jorge Almerio

 

 

De: kimaidou [mailto:kimaidou at gmail.com] 
Enviada em: sexta-feira, 16 de julho de 2021 10:55
Para: jorgealmerio at yahoo.com.br
Cc: qgis-developer <qgis-developer at lists.osgeo.org>
Assunto: Re: [QGIS-Developer] Processing script to audit all projects in a directory and subdirectories

 

Hi,

 

Thanks for your reply.

 

My answers:

Le ven. 16 juil. 2021 à 14:30, <jorgealmerio at yahoo.com.br <mailto:jorgealmerio at yahoo.com.br> > a écrit :

Hi, Michael,

 

Congratulations for the script!

 

thanks

 

 

These days I was looking for a script to list layers from Qgis projects with their respective sources (pathfile) and other info like, layer name, Invalid pathfile. I would be better if it is possible to do without really open the Qgis project file in Qgis.

 

I think this script you created do this, If am not wrong, but I did not figure out how to list layers from projects.

 

I have not listed all the layers and sources in the output, because it could be huge (some users have 200 layers in their projects....).

I created the plugin "Layer Board" some time ago, which you can use inside QGIS Desktop, to get a list of layers with their properties (name, title, datasource, CRS, feature count, etc.). It can export this data to CSV too. But you have to open the QGIS project.

 

The processing script "Audit QGIS projects" has not yet this capabilities. We could think of a new checkbox "Gather all the layers information", which would create one CSV file per QGIS project (or huge CSV file with all the layers of all the projects...).

 

 

I use Windows and Qgis 3.18. Do I have to install anything else?

 

Not really, I think. I have not tried it under Windows...

 

 

I got a CSV file like this:

"

path,basename,last_modified,crs,layer_count,invalid_layer_count,print_layout_count,print_layout_pictures_paths,print_layout_pictures_sizes,print_layout_pictures_total_size,print_layout_pictures_total_size_mb,trust_option_active,last_save_version

C:\Users\jorgealmerio\Documents\Mandu.qgz, Mandu,2021-07-15 16:46:55,EPSG:31984,126,5,1,,,0,0.0,False,31802

 

C:\Users\jorgealmerio\Documents\Mandu2.qgz, Mandu2,2021-07-16 16:46:55,EPSG:31984,126,5,1,,,0,0.0,False,31802

 

"

 

 

 

This seems to be a correct output.

 

Another thing, there are unnecessary blank lines in result CSV file.

 

Hum, bizarre... Do you see all the projects which should be there, ie which are present in the directory(ies) but not listed in the output CSV file ?

 

 

Regards,

 

Cheers !

Michaël

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20210716/cef333ce/attachment-0001.html>


More information about the QGIS-Developer mailing list