Funny download count :)

This commit is contained in:
aRkker 2022-10-25 22:26:37 +03:00
parent 914e6375f3
commit 3782e6e8c0
2 changed files with 30 additions and 32 deletions

View File

@ -1,5 +1,5 @@
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;
/* /*
@ -36,9 +36,8 @@ const API_LEVEL = 6;
*/ */
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) {
@ -49,24 +48,23 @@ fs.readdir('./plugins', (err, files) => {
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, LastUpdate: updatedDate,
IsHide: "False", IsHide: "False",
DownloadCount: 0, DownloadCount: 69420,
IsTestingExclusive: "False", IsTestingExclusive: "False",
CategoryTags: pluginJson.CategoryTags ?? categoryFallbacks[pluginJson.InternalName], CategoryTags: pluginJson.CategoryTags ?? categoryFallbacks[pluginJson.InternalName],
DownloadLinkInstall: `https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/${pluginJson.InternalName}/latest.zip`, DownloadLinkInstall: `https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/${pluginJson.InternalName}/latest.zip`,
DownloadLinkTesting: `https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/${pluginJson.InternalName}/latest.zip`, DownloadLinkTesting: `https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/${pluginJson.InternalName}/latest.zip`,
DownloadLinkUpdate: `https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/${pluginJson.InternalName}/latest.zip` DownloadLinkUpdate: `https://raw.githubusercontent.com/aRkker/DalamudPlugins/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));
}) });

View File

@ -16,7 +16,7 @@
"Changelog": "0.0.0.1\nInitial release for testing", "Changelog": "0.0.0.1\nInitial release for testing",
"LastUpdate": "1666725609", "LastUpdate": "1666725609",
"IsHide": "False", "IsHide": "False",
"DownloadCount": 0, "DownloadCount": 69420,
"IsTestingExclusive": "False", "IsTestingExclusive": "False",
"DownloadLinkInstall": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/AntiDickheadChatmodule/latest.zip", "DownloadLinkInstall": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/AntiDickheadChatmodule/latest.zip",
"DownloadLinkTesting": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/AntiDickheadChatmodule/latest.zip", "DownloadLinkTesting": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/AntiDickheadChatmodule/latest.zip",
@ -40,7 +40,7 @@
"Changelog": "0.0.0.21\nSeason 2 game tracking fixed\n\n0.0.0.20\nFixed class selection, season 3\n\n0.0.0.19\nMissing json config\n\n0.0.0.18\nBugfixes left over\n0.0.0.17\nAPI 7, season 2\n\n0.0.0.16\nDefaulted to season 2 from all\n0.0.0.15\nAdded seasons support\n0.0.0.14\nRandom errors fix\n\n0.0.0.13\nToobig....\n\n0.0.0.12\nHelp-text replaced with a proper one lol\n\n0.0.0.11\nBETTER COLOURS\n\n0.0.0.10\nCOLOURS\n\n0.0.0.9\nCrash fixes\n\n0.0.0.7\nBugfixes\n\n0.0.0.6\nTotal wins tracked across all classes\n\n0.0.0.5\nNamechange", "Changelog": "0.0.0.21\nSeason 2 game tracking fixed\n\n0.0.0.20\nFixed class selection, season 3\n\n0.0.0.19\nMissing json config\n\n0.0.0.18\nBugfixes left over\n0.0.0.17\nAPI 7, season 2\n\n0.0.0.16\nDefaulted to season 2 from all\n0.0.0.15\nAdded seasons support\n0.0.0.14\nRandom errors fix\n\n0.0.0.13\nToobig....\n\n0.0.0.12\nHelp-text replaced with a proper one lol\n\n0.0.0.11\nBETTER COLOURS\n\n0.0.0.10\nCOLOURS\n\n0.0.0.9\nCrash fixes\n\n0.0.0.7\nBugfixes\n\n0.0.0.6\nTotal wins tracked across all classes\n\n0.0.0.5\nNamechange",
"LastUpdate": "1664642108", "LastUpdate": "1664642108",
"IsHide": "False", "IsHide": "False",
"DownloadCount": 0, "DownloadCount": 69420,
"IsTestingExclusive": "False", "IsTestingExclusive": "False",
"DownloadLinkInstall": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/CrystallineConflictWinsTracker/latest.zip", "DownloadLinkInstall": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/CrystallineConflictWinsTracker/latest.zip",
"DownloadLinkTesting": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/CrystallineConflictWinsTracker/latest.zip", "DownloadLinkTesting": "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/CrystallineConflictWinsTracker/latest.zip",
@ -66,7 +66,7 @@
"Changelog": "1.0.0.4\n API 71.0.0.3\n Testing changelog :)", "Changelog": "1.0.0.4\n API 71.0.0.3\n Testing changelog :)",
"LastUpdate": "1661419042", "LastUpdate": "1661419042",
"IsHide": "False", "IsHide": "False",
"DownloadCount": 0, "DownloadCount": 69420,
"IsTestingExclusive": "False", "IsTestingExclusive": "False",
"CategoryTags": [ "CategoryTags": [
"utility", "utility",