lockfale / OSINT-Framework

OSINT Framework
MIT License
7.18k stars 1.24k forks source link

Finding the next unused ID is a PITA #78

Closed QueerCodingGirl closed 5 years ago

QueerCodingGirl commented 6 years ago

I just created the PR #77 and it was a pain in the ass to find an ID thats not used. Lets discuss ways to make it easier for people to submit new content as a PR instead of just creating an issue.

bcoles commented 6 years ago

Agreed.

Choosing the next unused ID is difficult.

The JSON file is also difficult to navigate.

These issues increases the barrier to entry for would-be contributors and increase the chance of merge conflicts.

s0lray commented 6 years ago

For a temporary solution, I added a description field to the root OSINT Framework folder. The description field lists the next available ID for use. When adding a new entry, use the ID listed in the desc field and then update the field with the next ID.

Anyone have some thoughts on a better long term solution?

QueerCodingGirl commented 6 years ago

Yeah, remove the need of an ID in the json and have them generated at script runtime if necessary.

andrewpatrickca commented 6 years ago

Actually, I am pretty sure that the ID is not needed in the JSON file now.

Looking at line 54 in the arf.js file, it appears that and ID is assigned if one has not been read from the JSON file:

.data(nodes, function(d) { return d.id || (d.id = ++i); });

In fact, I have used your code (thank you very much) to start work on a similar project for a PETs Framework (Privacy Enhancing Technologies). The JSON file for this project does not contain ID numbers. Have a look at

https://github.com/andrewpatrickca/andrewpatrickca.github.io

Cheers

s0lray commented 5 years ago

Killed the IDs. Thanks for the suggestions.