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

Have only JSON files #7

Open
szepeviktor opened this issue Jul 30, 2023 · 4 comments
Open

Have only JSON files #7

szepeviktor opened this issue Jul 30, 2023 · 4 comments

Comments

@szepeviktor
Copy link

szepeviktor commented Jul 30, 2023

Would you merge a PR that adds a command (jq) that converts Linode text to JSON?

# prefix, country, subdivision, city, zipcode, allocation_size
2600:3c00::/32,US,US-TX,Richardson,,
{
    "prefixes": [
        {
            "prefix": "2600:3c00::/32",
            "country": "US",
            "subdivision": "US-TX",
            "city": "Richardson",
            "zipcode": "",
            "allocation_size": ""
        }
    ]
}
@femueller
Copy link
Owner

Hey @szepeviktor, I was thinking in general of having a directory, which includes a normalized format of all files.

How would you implement what you suggested? Maybe you could add your proposal as a PR and we could continue the conversation from there.

@szepeviktor
Copy link
Author

@femueller When you say JSON I think of jq :)
https://github.com/jqlang/jq/wiki/Cookbook#convert-a-csv-file-with-headers-to-json

@femueller
Copy link
Owner

@szepeviktor Maybe just having all available as a JSON would be a good, simple first step, so there is a common format available. Then maybe standardizing the content across all provider IP ranges could be another next step.

@szepeviktor
Copy link
Author

szepeviktor commented Aug 3, 2023

would be a good, simple first step

I would skip the half-done step.

standardizing the content across all provider IP ranges

Organization levels

  1. Each provider in a separate JSON file with a uniform name
  2. Regions merged with availability zones
  3. Service names
  4. IP ranges properly sorted and other available attributes

This will make expert users happy. (they have jq and they are using it)

"Other" users may be interested in a flat array of IP ranges! (see low quality providers publishing CSV and text files)

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