A small Python tool for assigning permanent IDs into files metadata and tracking everything in ID_RECS.csv.
Useful for tracking items wich are constantly being renamed but needed an another pointer id.
- Scans
Input/for files - Injects a persistent ID into each file
- Reuses existing IDs on later scans
- Detects renamed files by embedded ID
- Removes deleted files from the CSV on each scan
- Opens files by ID
- Shows the current record list in a table
- Supports custom ID injection through a file picker]
| File | Purpose |
|---|---|
app\\test.py |
Main scan/inject command |
app\\open.py |
Opens a file by ID |
app\\show.py |
Displays the current CSV records |
app\\custom.py |
Lets you pick a file and inject a custom ID |
app\\metainject_core.py |
Shared logic used by all scripts |
run.bat |
Windows menu launcher |
ID_RECS.csv |
ID registry generated by the app |
.jpg.jpeg.png.pdf- Any other file type can still receive an ID using the fallback marker mode.
Install the required Python packages:
pip install Pillow piexif pypdfRun the Windows menu:
run.batpython app\\test.pyThis scans Input/, injects IDs, updates ID_RECS.csv, and prints a table of results.
python app\\open.py <ID>Example:
python open.py 3python app\\show.pypython app\\custom.pyThis opens a file picker, lets you choose a file, and then asks for the custom ID.
- JPG/JPEG: EXIF
ImageDescription - PNG:
ImageDescriptiontext chunk - PDF:
/Keywords - Other files: trailing
__METAID__:<id>:__END__marker
ID_RECS.csv always uses this schema:
actual_name,assigned_id
example.jpg,0
example2.png,1- Existing embedded IDs are preserved
- Renamed files are detected by ID, not by filename
- Deleted files are removed from the CSV on the next scan
show.pynever modifies filesopen.pyonly reads metadata and opens the matching file
Shared logic lives in metainject_core.py so the CLI scripts stay thin and easier to reuse in other tools.
project-root/
├── Input/
├── README.md
├── run.bat
├── app/
│ ├── custom.py
│ ├── metainject_core.py
│ ├── open.py
│ ├── show.py
│ └── test.py
└── ID_RECS.csv

