Add JSON for each Script and a metadata.json file #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an updated pull request. The original is here. The changes are:
This incorporates feedback from maintainers on JSON structure. The changes/improvements are:
Acknowledgments
I want to acknowledge @tteck who put this all together in the first pace, this just builds upon their work.
I also want to acknowledge the amazing work @BramSuurdje put the database together on the database and suggested the json schema. Having this in the first place made this job a lot easier.
Also @havardthom who consulted during this process and helped move things along.
Description
This merge adds a json/ directory with a .json file for each script.
The json structure is in the format proposed by @havardthom with some minor changes due to discovery of information as I wrangled the data.
The data is extracted from the pocketbase DB in consultation with @BramSuurdje. It also parses the scripts (ct, vm and misc) for details.
Here is an example JSON file (not a real script json file):
As of now metadata.json looks like this:
Notes
I found a couple of scripts that are in the database but no longer exist as scripts:
So I think keeping the database in the repo as static files that can be committed or changed in lock-step with the scripts is a good idea. In the future we can automate checking that new scripts have a correct json file.
The updated script that generated these json files can be found here.
This wrangling job took quite a long time dealing with edge cases etc.
Type of change
Please check the relevant option(s):
Related Pull Requests / Discussions