[PR #86] [MERGED] Add JSON for each Script and a metadata.json file #2463

Closed
opened 2026-02-05 04:57:11 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/86
Author: @newzealandpaul
Created: 11/6/2024
Status: Merged
Merged: 11/6/2024
Merged by: @MickLesk

Base: mainHead: newzealandpaul-json2


📝 Commits (2)

  • 1261342 Generated JSON from database with changes suggested by maintainers. Includes a categories.json file that contains all the possible categories
  • 193e9e5 Renamed categories.json to metadata.json

📊 Changes

208 files changed (+7474 additions, -0 deletions)

View changed files

json/actualbudget.json (+34 -0)
json/add-netbird-lxc.json (+43 -0)
json/add-tailscale-lxc.json (+43 -0)
json/adguard.json (+34 -0)
json/adventurelog.json (+34 -0)
json/agentdvr.json (+34 -0)
json/all-templates.json (+39 -0)
json/alpine.json (+34 -0)
json/apache-cassandra.json (+39 -0)
json/apache-couchdb.json (+39 -0)
json/apt-cacher-ng.json (+34 -0)
json/archivebox.json (+34 -0)
json/aria2.json (+39 -0)
json/audiobookshelf.json (+34 -0)
json/autobrr.json (+34 -0)
json/bazarr.json (+34 -0)
json/blocky.json (+39 -0)
json/bookstack.json (+39 -0)
json/bunkerweb.json (+34 -0)
json/caddy.json (+34 -0)

...and 80 more files

📄 Description

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:

  • Use null for values rather than ""
  • Has a metadata.json file with categories (IDs and a sort order). This file can be used for tags in the future as well.
  • Script JSON files now have IDs for categories.
  • Alerts has been renamed notes.
  • Notes can be type warning (the default, we can manually update these over time). Frontend devs can specify other note types.
  • Includes latest scripts as of the time this pull request has been submitted, using the database as at 11:40 pm Tuesday, 5 November UTC.

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

{
    "name": "A Test App",
    "slug": "atestapp",
    "categories": [
        45
    ],
    "date_created": "2024-05-02",
    "type": "ct",
    "updateable": true,
    "privileged": false,
    "interface_port": "8082",
    "documentation": null,
    "website": "https://www.example.com/",
    "logo": "https://raw.githubusercontent.com/Athou/commafeed/master/example/public/app-icon-144.png",
    "description": "A Test App is a Google Reader inspired self-hosted RSS reader.",
    "install_methods": [
        {
            "type": "default",
            "script": "ct/atestapp.sh",
            "resources": {
                "cpu": "2",
                "ram": "2048",
                "hdd": "4",
                "os": "debian",
                "version": "12"
            }
        }
    ],
    "default_credentials": {
        "username": "admin",
        "password": "admin"
    },
    "notes": [
        {
            "text": "Primary and Worker Private Keys Must Match.",
            "type": "warning"
        },
        {
            "text": "Configuration Path: `/opt/cronicle/conf/config.json`",
            "type": "warning"
        }
    ]
}

As of now metadata.json looks like this:

{
    "categories":
    [
        {"name": "Miscellaneous", "id": 0, "sort_order": 99.0},
        {"name": "Proxmox VE Tools", "id": 1, "sort_order": 1.0},
        {"name": "Home Assistant", "id": 2, "sort_order": 2.0},
        {"name": "Automation", "id": 3, "sort_order": 3.0},
        {"name": "MQTT", "id": 4, "sort_order": 4.0},
        {"name": "Database", "id": 5, "sort_order": 5.0},
        {"name": "Zigbee - Zwave", "id": 6, "sort_order": 6.0},
        {"name": "Monitoring - Analytics", "id": 7, "sort_order": 7.0},
        {"name": "Docker - Kubernetes", "id": 8, "sort_order": 8.0},
        {"name": "Operating System", "id": 9, "sort_order": 9.0},
        {"name": "TurnKey", "id": 10, "sort_order": 10.0},
        {"name": "Server - Networking", "id": 11, "sort_order": 11.0},
        {"name": "Media - Photo", "id": 12, "sort_order": 12.0},
        {"name": "AdBlocker - DNS", "id": 13, "sort_order": 13.0},
        {"name": "Document - Notes", "id": 14, "sort_order": 14.0},
        {"name": "Dashboards", "id": 15, "sort_order": 15.0},
        {"name": "File - Code", "id": 16, "sort_order": 16.0},
        {"name": "NVR - DVR", "id": 17, "sort_order": 17.0}
    ]
}

Notes

I found a couple of scripts that are in the database but no longer exist as scripts:

  1. scrutiny
  2. collabora-online

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

  • Bug fix (non-breaking change that resolves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (a fix or feature that would cause existing functionality to change unexpectedly)
  • New script (a fully functional and thoroughly tested script or set of scripts.)
  • Self-review performed (I have reviewed my code, ensuring it follows established patterns and conventions)
  • Documentation update required (this change requires an update to the documentation)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/86 **Author:** [@newzealandpaul](https://github.com/newzealandpaul) **Created:** 11/6/2024 **Status:** ✅ Merged **Merged:** 11/6/2024 **Merged by:** [@MickLesk](https://github.com/MickLesk) **Base:** `main` ← **Head:** `newzealandpaul-json2` --- ### 📝 Commits (2) - [`1261342`](https://github.com/community-scripts/ProxmoxVE/commit/12613422cd939cbedffe48e36770a01b2ee78e26) Generated JSON from database with changes suggested by maintainers. Includes a categories.json file that contains all the possible categories - [`193e9e5`](https://github.com/community-scripts/ProxmoxVE/commit/193e9e5823bf4e4a85162ba14ea38eb101bfc093) Renamed categories.json to metadata.json ### 📊 Changes **208 files changed** (+7474 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `json/actualbudget.json` (+34 -0) ➕ `json/add-netbird-lxc.json` (+43 -0) ➕ `json/add-tailscale-lxc.json` (+43 -0) ➕ `json/adguard.json` (+34 -0) ➕ `json/adventurelog.json` (+34 -0) ➕ `json/agentdvr.json` (+34 -0) ➕ `json/all-templates.json` (+39 -0) ➕ `json/alpine.json` (+34 -0) ➕ `json/apache-cassandra.json` (+39 -0) ➕ `json/apache-couchdb.json` (+39 -0) ➕ `json/apt-cacher-ng.json` (+34 -0) ➕ `json/archivebox.json` (+34 -0) ➕ `json/aria2.json` (+39 -0) ➕ `json/audiobookshelf.json` (+34 -0) ➕ `json/autobrr.json` (+34 -0) ➕ `json/bazarr.json` (+34 -0) ➕ `json/blocky.json` (+39 -0) ➕ `json/bookstack.json` (+39 -0) ➕ `json/bunkerweb.json` (+34 -0) ➕ `json/caddy.json` (+34 -0) _...and 80 more files_ </details> ### 📄 Description This is an updated pull request. The original is [here](https://github.com/community-scripts/ProxmoxVE/pull/70). The changes are: This incorporates feedback from maintainers on JSON structure. The changes/improvements are: - Use null for values rather than "" - Has a metadata.json file with categories (IDs and a sort order). This file can be used for tags in the future as well. - Script JSON files now have IDs for categories. - Alerts has been renamed notes. - Notes can be type warning (the default, we can manually update these over time). Frontend devs can specify other note types. - Includes latest scripts as of the time this pull request has been submitted, using the database as at 11:40 pm Tuesday, 5 November UTC. # 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): ```json { "name": "A Test App", "slug": "atestapp", "categories": [ 45 ], "date_created": "2024-05-02", "type": "ct", "updateable": true, "privileged": false, "interface_port": "8082", "documentation": null, "website": "https://www.example.com/", "logo": "https://raw.githubusercontent.com/Athou/commafeed/master/example/public/app-icon-144.png", "description": "A Test App is a Google Reader inspired self-hosted RSS reader.", "install_methods": [ { "type": "default", "script": "ct/atestapp.sh", "resources": { "cpu": "2", "ram": "2048", "hdd": "4", "os": "debian", "version": "12" } } ], "default_credentials": { "username": "admin", "password": "admin" }, "notes": [ { "text": "Primary and Worker Private Keys Must Match.", "type": "warning" }, { "text": "Configuration Path: `/opt/cronicle/conf/config.json`", "type": "warning" } ] } ``` As of now metadata.json looks like this: ```json { "categories": [ {"name": "Miscellaneous", "id": 0, "sort_order": 99.0}, {"name": "Proxmox VE Tools", "id": 1, "sort_order": 1.0}, {"name": "Home Assistant", "id": 2, "sort_order": 2.0}, {"name": "Automation", "id": 3, "sort_order": 3.0}, {"name": "MQTT", "id": 4, "sort_order": 4.0}, {"name": "Database", "id": 5, "sort_order": 5.0}, {"name": "Zigbee - Zwave", "id": 6, "sort_order": 6.0}, {"name": "Monitoring - Analytics", "id": 7, "sort_order": 7.0}, {"name": "Docker - Kubernetes", "id": 8, "sort_order": 8.0}, {"name": "Operating System", "id": 9, "sort_order": 9.0}, {"name": "TurnKey", "id": 10, "sort_order": 10.0}, {"name": "Server - Networking", "id": 11, "sort_order": 11.0}, {"name": "Media - Photo", "id": 12, "sort_order": 12.0}, {"name": "AdBlocker - DNS", "id": 13, "sort_order": 13.0}, {"name": "Document - Notes", "id": 14, "sort_order": 14.0}, {"name": "Dashboards", "id": 15, "sort_order": 15.0}, {"name": "File - Code", "id": 16, "sort_order": 16.0}, {"name": "NVR - DVR", "id": 17, "sort_order": 17.0} ] } ``` ## Notes I found a couple of scripts that are in the database but no longer exist as scripts: 1. scrutiny 2. collabora-online 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](https://gist.github.com/newzealandpaul/897f59fb04cec2dc90fad15084e5a7de). This wrangling job took quite a long time dealing with edge cases etc. ## Type of change Please check the relevant option(s): - [ ] Bug fix (non-breaking change that resolves an issue) - [x] New feature (non-breaking change that adds functionality) - [ ] Breaking change (a fix or feature that would cause existing functionality to change unexpectedly) - [ ] New script (a fully functional and thoroughly tested script or set of scripts.) - [ ] Self-review performed (I have reviewed my code, ensuring it follows established patterns and conventions) - [ ] Documentation update required (this change requires an update to the documentation) ## Related Pull Requests / Discussions - https://github.com/community-scripts/ProxmoxVE/pull/70 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 04:57:11 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#2463