new pluginmaster urls

This commit is contained in:
aRkker 2025-05-31 17:21:58 +03:00
parent 9b22080524
commit fd1d237797

View File

@ -1,70 +1,70 @@
const fs = require("fs"); const fs = require("fs");
var execSync = require("child_process").execSync; var execSync = require("child_process").execSync;
const API_LEVEL = 6; const API_LEVEL = 6;
/* /*
{ {
"Author": "aRkker", "Author": "aRkker",
"Name": "World Map Enhancer", "Name": "World Map Enhancer",
"InternalName": "WorldMapEnhancer", "InternalName": "WorldMapEnhancer",
"AssemblyVersion": "1.0.0.1", "AssemblyVersion": "1.0.0.1",
"Description": "Simply zoom out by right clicking the world map, like God intended it", "Description": "Simply zoom out by right clicking the world map, like God intended it",
"ApplicableVersion": "any", "ApplicableVersion": "any",
"Tags": [ "Tags": [
"world", "world",
"map", "map",
"enhance", "enhance",
"rightclick", "rightclick",
"zoom" "zoom"
], ],
"DalamudApiLevel": 6, "DalamudApiLevel": 6,
"LoadPriority": 0, "LoadPriority": 0,
"Punchline": "Right click to zoom out the big map", "Punchline": "Right click to zoom out the big map",
"IsHide": "False", "IsHide": "False",
"IsTestingExclusive": "False", "IsTestingExclusive": "False",
"DownloadCount": 0, "DownloadCount": 0,
"CategoryTags": [ "CategoryTags": [
"utility", "utility",
"other", "other",
"ui" "ui"
], ],
"LastUpdate": "1651838531", "LastUpdate": "1651838531",
"DownloadLinkInstall": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/WorldMapEnhancer/latest.zip", "DownloadLinkInstall": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/WorldMapEnhancer/latest.zip",
"DownloadLinkTesting": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/WorldMapEnhancer/latest.zip", "DownloadLinkTesting": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/WorldMapEnhancer/latest.zip",
"DownloadLinkUpdate": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/WorldMapEnhancer/latest.zip" "DownloadLinkUpdate": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/WorldMapEnhancer/latest.zip"
} }
*/ */
fs.readdir("./plugins", (err, files) => { fs.readdir("./plugins", (err, files) => {
const categoryFallbacks = JSON.parse(fs.readFileSync("./categoryfallbacks.json").toString()); const categoryFallbacks = JSON.parse(fs.readFileSync("./categoryfallbacks.json").toString());
let masterJson = []; let masterJson = [];
for (let d of files) { for (let d of files) {
console.log(d); console.log(d);
const pluginJsonPath = `plugins/${d}/${d}.json`; const pluginJsonPath = `plugins/${d}/${d}.json`;
const pluginJson = JSON.parse(fs.readFileSync(pluginJsonPath).toString()); const pluginJson = JSON.parse(fs.readFileSync(pluginJsonPath).toString());
console.log(pluginJson); console.log(pluginJson);
const updatedDate = execSync(`git log -1 --pretty="format:%ct" plugins/${pluginJson.InternalName}/latest.zip`).toString(); const updatedDate = execSync(`git log -1 --pretty="format:%ct" plugins/${pluginJson.InternalName}/latest.zip`).toString();
const masterJsonInsert = { const masterJsonInsert = {
...pluginJson, ...pluginJson,
LastUpdate: updatedDate.length < 2 ? Math.round(Date.now() / 1000) : updatedDate, LastUpdate: updatedDate.length < 2 ? Math.round(Date.now() / 1000) : updatedDate,
IsHide: "False", IsHide: "False",
DownloadCount: 69420, DownloadCount: 69420,
IsTestingExclusive: "False", IsTestingExclusive: "False",
CategoryTags: pluginJson.CategoryTags ?? categoryFallbacks[pluginJson.InternalName], CategoryTags: pluginJson.CategoryTags ?? categoryFallbacks[pluginJson.InternalName],
DownloadLinkInstall: `https://gitea.vrcp.pm/aRkker/aRkker-XIV-Plugins/raw/branch/master/plugins/${pluginJson.InternalName}/latest.zip`, DownloadLinkInstall: `https://gitty.vrcp.pm/aRkker/aRkker-XIV-Plugins/raw/branch/master/plugins/${pluginJson.InternalName}/latest.zip`,
DownloadLinkTesting: `https://gitea.vrcp.pm/aRkker/aRkker-XIV-Plugins/raw/branch/master/plugins/${pluginJson.InternalName}/latest.zip`, DownloadLinkTesting: `https://gitty.vrcp.pm/aRkker/aRkker-XIV-Plugins/raw/branch/master/plugins/${pluginJson.InternalName}/latest.zip`,
DownloadLinkUpdate: `https://gitea.vrcp.pm/aRkker/aRkker-XIV-Plugins/raw/branch/master/plugins/${pluginJson.InternalName}/latest.zip`, DownloadLinkUpdate: `https://gitty.vrcp.pm/aRkker/aRkker-XIV-Plugins/raw/branch/master/plugins/${pluginJson.InternalName}/latest.zip`,
}; };
masterJson.push(masterJsonInsert); masterJson.push(masterJsonInsert);
console.log(masterJsonInsert); console.log(masterJsonInsert);
} }
fs.writeFileSync("./pluginmaster.json", JSON.stringify(masterJson, null, 2)); fs.writeFileSync("./pluginmaster.json", JSON.stringify(masterJson, null, 2));
}); });