Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancment: @metadata in ranges.json #115

Closed
lokal-profil opened this issue Aug 11, 2014 · 7 comments
Closed

Enhancment: @metadata in ranges.json #115

lokal-profil opened this issue Aug 11, 2014 · 7 comments

Comments

@lokal-profil
Copy link
Contributor

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)?

@edsu
Copy link
Owner

edsu commented Aug 11, 2014

Can you sketch out what this metadata might look like with an example or two?

@lokal-profil
Copy link
Contributor Author

E.g. Creeper.json

@lokal-profil
Copy link
Contributor Author

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.

@lokal-profil
Copy link
Contributor Author

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.

lokal-profil added a commit to lokal-profil/anon that referenced this issue Aug 20, 2014
lokal-profil added a commit to lokal-profil/anon that referenced this issue Sep 9, 2014
Delinting using http://www.coffeelint.org/

Adding throttle parameter to config (but set to false) to highlight
that it exists

Adding tripple mustaches to deal with issue edsu#116

Adding namespace logic to anon and config to support issue edsu#118
This allows filtering out edits in talk namespaces etc,
if namespace is left out of config all namespaces are accepted

Added logic to disregard @metadata entries in ranges to support issue edsu#115
this allows source, dates etc. to be added to the ranges
@edsu
Copy link
Owner

edsu commented Sep 29, 2014

Why not let the metadata live in a revision control system like git?

lokal-profil added a commit to lokal-profil/anon that referenced this issue Sep 29, 2014
@lokal-profil
Copy link
Contributor Author

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.

@edsu
Copy link
Owner

edsu commented Feb 16, 2015

I'm sorry I just haven't needed this functionality.

@edsu edsu closed this as completed Feb 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants