The projects I work on usually end up having a lot of data generated in different contexts and I have to organize everything somehow.
Current solution I have is to decide upon a folder structure which segments the data up to some extend (in a folder I already know those files are supposed to share few properties), and then I encode the rest of the information in the file name, separating fields with "_" etc.
However I think this solution is bit hacky and not well organized. And if somehow someone(me) accidentally drops a file to a wrong folder, in specific cases it might go unnoticed etc. (or I have to encode every field to the file name). Another solution I thought of is to generate id's as file names and keep an index file translating an id (file name) to set of properties. However if I lose that file, that would have been a disaster.
For that reason, specifically, I am looking for a way to add metadata (eg arbitrary attributes in json format) to a file without changing its name, so name could still be a high level description/id. I use mac and see comments
when I click info on any file I have (see attachment). So if I can modify that field or do something similar (preferably something that would work in linux too), I could save a json as text there and parse it whenever I need that.
Is there a simple way to achieve that using python?
Note: solution I am looking for is not this answer, because the change is not saved with the file.