Closed lokal-profil closed 9 years ago
Can you sketch out what this metadata might look like with an example or two?
E.g. Creeper.json
I've used something like
"@metadata": { "source": "URL", "fetch date":"DATE" }
but I can imagine many different fields which could be added in order to credit sources or increase transparency.
So my solution was simply to add the above to the top of my range files and then add:
delete account.ranges['@metadata']
as a new line after line 53 in anon.coffee to prevent the metadata from affecting the running of the program.
Why not let the metadata live in a revision control system like git?
People curious about which ranges are being used will often just look at the json file. If metadata is available there (I'm mainly thinking source etc.) then it is easy to spot where it is from and even easier to reuse the ranges.
The reason for adding the "last update"-date in the file is similarly that it makes it easier for others to highlight if the file is out of date/there has been an update in the original source.
I removed this from the patch in order not to block the other fixes.
I'm sorry I just haven't needed this functionality.
For a completely externalised ranges.json file it might be nice to add an "@metadata" object containing information such as source of ranges, last date they were verified etc.
I'm currently unsure how adding a field like this would be handled by the app since I can't figure out how it deals with incorrectly formatted range objects. If it does throw a wrench in the works would it be possible to make it skip name=@metadata (or some similar convention)?