Currently we have an organizing and tracking of files problem.

Right now we have our geodata organized in different geopackages (.GPKG files) for specific areas.

The problem is that the amount of geopackages is growing and it becomes harder and harder to track where each of the data are. Sure, we organized it logically but at the same time it still hard to keep track.

To keep better track of the data, we want to keep an inventory of the contents of the GPKG file (data tables, layer names) including its metadata.

[![Screenshot](https://i.stack.imgur.com/MBuO8.png)](https://i.stack.imgur.com/MBuO8.png)

Is there any way this can be done in QGIS itself or do we need to develop a separate script for it?

Contents:

[![enter image description here](https://i.stack.imgur.com/13WBs.png)](https://i.stack.imgur.com/13WBs.png)

---

I currently have found a way to extract the information of geopackage so far using SQL, or more specifically SQLite. So far I have created some querry's to extract the tables that are "common" in a geopackage. As for the shematics below, this is the one for Vector data:

[![enter image description here](https://i.stack.imgur.com/bMaCa.png)](https://i.stack.imgur.com/bMaCa.png)

And this is the one for raster data:
[![enter image description here](https://i.stack.imgur.com/a4Kfs.png)](https://i.stack.imgur.com/a4Kfs.png)

However, the problem I still have is the extraction of the sample\_feature\_table and the sameple\_title\_pyramid because depending on the geopackage the name of the feature table is different.

I know that the name of the feature table's are in the table name column, but I do not see a way to make this below assumption of code workable.

```
Select * from sample_feature_table;
Select * from sample_pyramid_title;
Where sample_feature_table = gpgk_contents.table_name?
Where sample_tile_pyramid= gpgk_tile_matrix.table_name column?

```

The sample\_feature\_table and its raster counterpart are "placeholder table names", the actual name of all the tables are in the table name column.