diff --git a/make-pluginmasterjson.js b/make-pluginmasterjson.js new file mode 100644 index 0000000..183a49e --- /dev/null +++ b/make-pluginmasterjson.js @@ -0,0 +1,72 @@ +const fs = require('fs'); +var execSync = require('child_process').execSync; + +const API_LEVEL = 6; +/* + { + "Author": "aRkker", + "Name": "World Map Enhancer", + "InternalName": "WorldMapEnhancer", + "AssemblyVersion": "1.0.0.1", + "Description": "Simply zoom out by right clicking the world map, like God intended it", + "ApplicableVersion": "any", + "Tags": [ + "world", + "map", + "enhance", + "rightclick", + "zoom" + ], + "DalamudApiLevel": 6, + "LoadPriority": 0, + "Punchline": "Right click to zoom out the big map", + "IsHide": "False", + "IsTestingExclusive": "False", + "DownloadCount": 0, + "CategoryTags": [ + "utility", + "other", + "ui" + ], + "LastUpdate": "1651838531", + "DownloadLinkInstall": "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" + } + +*/ + + +fs.readdir('./plugins', (err, files) => { + const categoryFallbacks = JSON.parse(fs.readFileSync('./categoryfallbacks.json').toString()); + + let masterJson = []; + for (let d of files) { + console.log(d); + const pluginJsonPath = `plugins/${d}/${d}.json`; + + const pluginJson = JSON.parse(fs.readFileSync(pluginJsonPath).toString()); + + console.log(pluginJson); + + + const updatedDate = execSync(`git log -1 --pretty="format:%ct" plugins/${pluginJson.InternalName}/latest.zip`).toString(); + + const masterJsonInsert = { + ...pluginJson, + LastUpdate: updatedDate, + IsHide: "False", + DownloadCount: 0, + IsTestingExclusive: "False", + CategoryTags: pluginJson.CategoryTags ?? categoryFallbacks[pluginJson.InternalName], + 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`, + DownloadLinkUpdate: `https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/${pluginJson.InternalName}/latest.zip` + } + + masterJson.push(masterJsonInsert); + console.log(masterJsonInsert); + } + + fs.writeFileSync('./pluginmaster.json', JSON.stringify(masterJson, null, 2)); +}) \ No newline at end of file diff --git a/pluginmaster.json b/pluginmaster.json index ae15d36..d72285e 100644 --- a/pluginmaster.json +++ b/pluginmaster.json @@ -3,7 +3,7 @@ "Author": "aRkker", "Name": "World Map Enhancer", "InternalName": "WorldMapEnhancer", - "AssemblyVersion": "1.0.0.1", + "AssemblyVersion": "1.0.0.2", "Description": "Simply zoom out by right clicking the world map, like God intended it", "ApplicableVersion": "any", "Tags": [ @@ -16,15 +16,15 @@ "DalamudApiLevel": 6, "LoadPriority": 0, "Punchline": "Right click to zoom out the big map", + "LastUpdate": "1651838531", "IsHide": "False", - "IsTestingExclusive": "False", "DownloadCount": 0, + "IsTestingExclusive": "False", "CategoryTags": [ "utility", "other", "ui" ], - "LastUpdate": "1651838531", "DownloadLinkInstall": "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" diff --git a/plugins/WorldMapEnhancer/WorldMapEnhancer.json b/plugins/WorldMapEnhancer/WorldMapEnhancer.json index 67bff0c..c8a96b5 100644 --- a/plugins/WorldMapEnhancer/WorldMapEnhancer.json +++ b/plugins/WorldMapEnhancer/WorldMapEnhancer.json @@ -2,7 +2,7 @@ "Author": "aRkker", "Name": "World Map Enhancer", "InternalName": "WorldMapEnhancer", - "AssemblyVersion": "1.0.0.1", + "AssemblyVersion": "1.0.0.2", "Description": "Simply zoom out by right clicking the world map, like God intended it", "ApplicableVersion": "any", "Tags": [ diff --git a/plugins/WorldMapEnhancer/latest.zip b/plugins/WorldMapEnhancer/latest.zip index 73349f1..d4da435 100644 Binary files a/plugins/WorldMapEnhancer/latest.zip and b/plugins/WorldMapEnhancer/latest.zip differ