Generate info dir#
Scans the RDF directory structure and generates filesystem counter files with the correct values based on existing entities.
Usage#
uv run python -m oc_meta.run.infodir.gen <rdf_directory> <info_dir>
Parameters#
Parameter |
Required |
Description |
|---|---|---|
|
Yes |
Path to the RDF directory (containing |
|
Yes |
Base path for the info_dir where counter files will be written |
The supplier prefix “060” is hardcoded.
Process#
For each entity type (
br,ra,ar,re,id), the script finds the highest numbered entity in each supplier prefix folderWrites the main counter for each entity type and prefix to the corresponding counter file
Scans all provenance files in parallel to find the highest snapshot number for each entity
Updates the provenance counter files in batch
Example#
uv run python -m oc_meta.run.infodir.gen /srv/oc_meta/rdf /srv/oc_meta/info_dir
This reads all RDF files under /srv/oc_meta/rdf and writes the counter files to /srv/oc_meta/info_dir.