1
0

Use new c# script to generate pluginmaster

This commit is contained in:
Liza 2023-10-12 17:38:40 +02:00
parent 8665457f4b
commit a76b1ed95b
Signed by: liza
GPG Key ID: 7199F8D727D55F67
3 changed files with 284 additions and 338 deletions

37
_config.json Normal file
View File

@ -0,0 +1,37 @@
{
"Plugins": [
{
"Name": "SliceIsRight"
},
{
"Name": "FishNotify"
},
{
"Name": "PalacePal",
"InternalName": "Palace Pal",
"RootFolder": "Pal",
"ProjectName": "Pal.Client"
},
{
"Name": "RetainerTrack"
},
{
"Name": "NewGamePlusAnywhere"
},
{
"Name": "ARDiscard"
},
{
"Name": "Deliveroo"
},
{
"Name": "ARControl"
},
{
"Name": "Workshoppa"
},
{
"Name": "Squadronista"
}
]
}

View File

@ -19,10 +19,9 @@
"IconUrl": "https://git.carvel.li/liza/plugin-repo/raw/branch/master/dist/SliceIsRight.png",
"Punchline": "Shows where Bamboo falls.",
"AcceptsFeedback": false,
"DownloadCount": 13843,
"DownloadCount": 13847,
"LastUpdate": 1696321802,
"DownloadLinkInstall": "https://git.carvel.li/liza/SliceIsRight/releases/download/v7.0/SliceIsRight-7.0.zip",
"DownloadLinkUpdate": "https://git.carvel.li/liza/SliceIsRight/releases/download/v7.0/SliceIsRight-7.0.zip",
"Changelog": "v7.0 (2023-10-03)\n- API 9\n\nv6.1 (2023-02-06)\n- Fix AoE markers generating new entries in dalamudUI.ini\n\nv6.0 (2023-01-11)\n- Dalamud API 8 update",
"IsHide": false,
"IsTestingExclusive": false
@ -46,10 +45,9 @@
"IconUrl": "https://git.carvel.li/liza/plugin-repo/raw/branch/master/dist/FishNotify.png",
"Punchline": "Plays a sound when a fish is caught",
"AcceptsFeedback": false,
"DownloadCount": 1721,
"DownloadCount": 1722,
"LastUpdate": 1696322287,
"DownloadLinkInstall": "https://git.carvel.li/liza/FishNotify/releases/download/v6.0/FishNotify-6.0.zip",
"DownloadLinkUpdate": "https://git.carvel.li/liza/FishNotify/releases/download/v6.0/FishNotify-6.0.zip",
"Changelog": "v6.0 (2023-10-03)\n- API 9\n\nv5.0 (2023-01-11)\n- Dalamud API 8 update",
"IsHide": false,
"IsTestingExclusive": false
@ -76,11 +74,10 @@
"IconUrl": "https://git.carvel.li/liza/plugin-repo/raw/branch/master/dist/Palace%20Pal.png",
"Punchline": "Shows possible trap & hoard coffer locations in Palace of the Dead & Heaven on High.",
"AcceptsFeedback": false,
"DownloadCount": 45403,
"DownloadCount": 45411,
"LastUpdate": 1696989392,
"DownloadLinkInstall": "https://git.carvel.li/liza/PalacePal/releases/download/v5.1/Palace%20Pal-5.1.zip",
"DownloadLinkUpdate": "https://git.carvel.li/liza/PalacePal/releases/download/v5.1/Palace%20Pal-5.1.zip",
"Changelog": "v5.1 (2023-10-11)\n- Fix config window size constraints\r\n- Replace outdated links\r\n- Add Patreon link\n\nv5.0 (2023-10-03)\n- API 9\n\nv4.6 (2023-07-31)\n- Update sever url\r\n- Cleanup\n\nv4.5 (2023-04-13)\n- Fix floor change regex (#18) not working anymore; the state of pomanders of sight/safety now gets updated properly again\r\n- Code cleanup\r\n- Server side optimizations\n\nv4.4 (2023-03-26)\n- Dependency Updates",
"Changelog": "v5.1 (2023-10-11)\n- Fix config window size constraints\n- Replace outdated links\n- Add Patreon link\n\nv5.0 (2023-10-03)\n- API 9\n\nv4.6 (2023-07-31)\n- Update sever url\n- Cleanup\n\nv4.5 (2023-04-13)\n- Fix floor change regex (#18) not working anymore; the state of pomanders of sight/safety now gets updated properly again\n- Code cleanup\n- Server side optimizations\n\nv4.4 (2023-03-26)\n- Dependency Updates",
"IsHide": false,
"IsTestingExclusive": false
},
@ -107,7 +104,6 @@
"DownloadCount": 44,
"LastUpdate": 1696519978,
"DownloadLinkInstall": "https://git.carvel.li/liza/RetainerTrack/releases/download/v2.0/RetainerTrack-2.0.zip",
"DownloadLinkUpdate": "https://git.carvel.li/liza/RetainerTrack/releases/download/v2.0/RetainerTrack-2.0.zip",
"Changelog": "v2.0 (2023-10-05)\n- API 9",
"IsHide": false,
"IsTestingExclusive": false
@ -131,7 +127,6 @@
"DownloadCount": 40,
"LastUpdate": 1696364047,
"DownloadLinkInstall": "https://git.carvel.li/liza/NewGamePlusAnywhere/releases/download/v2.0/NewGamePlusAnywhere-2.0.zip",
"DownloadLinkUpdate": "https://git.carvel.li/liza/NewGamePlusAnywhere/releases/download/v2.0/NewGamePlusAnywhere-2.0.zip",
"Changelog": "v2.0 (2023-10-03)\n- API 9",
"IsHide": false,
"IsTestingExclusive": false
@ -152,11 +147,10 @@
"IconUrl": "https://git.carvel.li/liza/plugin-repo/raw/branch/master/dist/ARDiscard.png",
"Punchline": "Discard items automatically via a command or as a post-venture task for AutoRetainer",
"AcceptsFeedback": false,
"DownloadCount": 244,
"DownloadCount": 252,
"LastUpdate": 1697011933,
"DownloadLinkInstall": "https://git.carvel.li/liza/ARDiscard/releases/download/v3.1/ARDiscard-3.1.zip",
"DownloadLinkUpdate": "https://git.carvel.li/liza/ARDiscard/releases/download/v3.1/ARDiscard-3.1.zip",
"Changelog": "v3.1 (2023-10-11)\n- Rename plugin to 'Discard Helper'\r\n- Add chat feedback when adding/removing items via context menu\r\n- Add Patreon link\n\nv3.0 (2023-10-04)\n- API 9\n\nv2.5 (2023-09-26)\n- Make it possible to auto-discard Onion Doublet/Gaskins/Patterns\n\nv2.4 (2023-09-21)\n- Add stack limit for items to discard\r\n- Context menu integration for armoury chest\n\nv2.3 (2023-09-18)\n- Fix itemId = 0 causing problems\r\n- Improve some conditions\r\n- Optimize gear set checks\r\n- Cleanup",
"Changelog": "v3.1 (2023-10-11)\n- Rename plugin to 'Discard Helper'\n- Add chat feedback when adding/removing items via context menu\n- Add Patreon link\n\nv3.0 (2023-10-04)\n- API 9\n\nv2.5 (2023-09-26)\n- Make it possible to auto-discard Onion Doublet/Gaskins/Patterns\n\nv2.4 (2023-09-21)\n- Add stack limit for items to discard\n- Context menu integration for armoury chest\n\nv2.3 (2023-09-18)\n- Fix itemId = 0 causing problems\n- Improve some conditions\n- Optimize gear set checks\n- Cleanup",
"IsHide": false,
"IsTestingExclusive": false
},
@ -176,11 +170,10 @@
"IconUrl": "https://git.carvel.li/liza/plugin-repo/raw/branch/master/dist/Deliveroo.png",
"Punchline": "Better Grand Company Deliveries",
"AcceptsFeedback": false,
"DownloadCount": 272,
"DownloadCount": 304,
"LastUpdate": 1697069414,
"DownloadLinkInstall": "https://git.carvel.li/liza/Deliveroo/releases/download/v2.8/Deliveroo-2.8.zip",
"DownloadLinkUpdate": "https://git.carvel.li/liza/Deliveroo/releases/download/v2.8/Deliveroo-2.8.zip",
"Changelog": "v2.8 (2023-10-12)\n- Add a button to use a priority seal allowance (if you have any in your inventory)\r\n- Add command line options to enable/disable the plugin while you're near the GC Turn-In (/deliveroo enable, /deliveroo disable)\n\nv2.7 (2023-10-11)\n- Add patreon link\r\n- Code cleanup\n\nv2.6 (2023-10-10)\n- Use IPC for Pandora's Box\r\n- Try to fix a potential issue around list not refreshing/turning in ghost items\r\n\n\nv2.5 (2023-10-09)\n- Try to fix a potential issue around list not refreshing/turning in ghost items\n\nv2.4 (2023-10-08)\n- Experimental support for non-english game languages\r\n- Use IAddonLifecycle for yes/no + select lists",
"Changelog": "v2.8 (2023-10-12)\n- Add a button to use a priority seal allowance (if you have any in your inventory)\n- Add command line options to enable/disable the plugin while you're near the GC Turn-In (/deliveroo enable, /deliveroo disable)\n\nv2.7 (2023-10-11)\n- Add patreon link\n- Code cleanup\n\nv2.6 (2023-10-10)\n- Use IPC for Pandora's Box\n- Try to fix a potential issue around list not refreshing/turning in ghost items\n\nv2.5 (2023-10-09)\n- Try to fix a potential issue around list not refreshing/turning in ghost items\n\nv2.4 (2023-10-08)\n- Experimental support for non-english game languages\n- Use IAddonLifecycle for yes/no + select lists",
"IsHide": false,
"IsTestingExclusive": false
},
@ -200,11 +193,10 @@
"IconUrl": "https://git.carvel.li/liza/plugin-repo/raw/branch/master/dist/ARControl.png",
"Punchline": "Better AutoRetainer Venture Planner",
"AcceptsFeedback": false,
"DownloadCount": 78,
"DownloadCount": 89,
"LastUpdate": 1697101680,
"DownloadLinkInstall": "https://git.carvel.li/liza/ARControl/releases/download/v2.2/ARControl-2.2.zip",
"DownloadLinkUpdate": "https://git.carvel.li/liza/ARControl/releases/download/v2.2/ARControl-2.2.zip",
"Changelog": "v2.2 (2023-10-12)\n- Don't open UI when loading the plugin\r\n- Change log levels\n\nv2.1 (2023-10-12)\nImportant: Your old venture list configuration was not migrated from v1.0 to v2.0. Please make sure you set up a new list for the items you're still wanting to get!\r\n\r\n- Complete Venture List overhaul\r\n - support for multiple lists\r\n - improved list editing\r\n - different venture list types\r\n- Characters can now be assigned to individual venture lists\r\n- Character Groups: multiple characters can be grouped together, and assigned shared venture lists\r\n- Retainers under Level 90 can now be enabled",
"Changelog": "v2.2 (2023-10-12)\n- Don't open UI when loading the plugin\n- Change log levels\n\nv2.1 (2023-10-12)\nImportant: Your old venture list configuration was not migrated from v1.0 to v2.0. Please make sure you set up a new list for the items you're still wanting to get!\n\n- Complete Venture List overhaul\n - support for multiple lists\n - improved list editing\n - different venture list types\n- Characters can now be assigned to individual venture lists\n- Character Groups: multiple characters can be grouped together, and assigned shared venture lists\n- Retainers under Level 90 can now be enabled",
"IsHide": false,
"IsTestingExclusive": false
},
@ -224,11 +216,10 @@
"IconUrl": "https://git.carvel.li/liza/plugin-repo/raw/branch/master/dist/Workshoppa.png",
"Punchline": "Better Company Workshop Turn-In",
"AcceptsFeedback": false,
"DownloadCount": 123,
"DownloadCount": 141,
"LastUpdate": 1697015130,
"DownloadLinkInstall": "https://git.carvel.li/liza/Workshoppa/releases/download/v2.2/Workshoppa-2.2.zip",
"DownloadLinkUpdate": "https://git.carvel.li/liza/Workshoppa/releases/download/v2.2/Workshoppa-2.2.zip",
"Changelog": "v2.2 (2023-10-11)\n- Automatically opens the Workshop UI when near a fabrication station\r\n- Fix an issue where the game's Company Project/Craft UI could sometimes not be found\n\nv2.1 (2023-10-05)\n- Enable support for Fabrication Stations in Mist/Goblet/Shiro/Empy\n\nv2.0 (2023-10-04)\n- Initial Public Release",
"Changelog": "v2.2 (2023-10-11)\n- Automatically opens the Workshop UI when near a fabrication station\n- Fix an issue where the game's Company Project/Craft UI could sometimes not be found\n\nv2.1 (2023-10-05)\n- Enable support for Fabrication Stations in Mist/Goblet/Shiro/Empy\n\nv2.0 (2023-10-04)\n- Initial Public Release",
"IsHide": false,
"IsTestingExclusive": false
},
@ -236,7 +227,7 @@
"Author": "Liza Carvelli",
"Name": "Squadronista",
"InternalName": "Squadronista",
"AssemblyVersion": "0.2",
"TestingAssemblyVersion": "0.2",
"Description": "",
"ApplicableVersion": "any",
"RepoUrl": "https://git.carvel.li/liza/Squadronista",
@ -248,12 +239,11 @@
"IconUrl": "https://git.carvel.li/liza/plugin-repo/raw/branch/master/dist/Squadronista.png",
"Punchline": "Simplified Squadron Calculator for Flagged Missions, heavily inspired by https://ffxivsquadron.com/",
"AcceptsFeedback": false,
"DownloadCount": 22,
"DownloadCount": 33,
"LastUpdate": 1697069153,
"DownloadLinkInstall": "https://git.carvel.li/liza/Squadronista/releases/download/v0.2/Squadronista-0.2.zip",
"DownloadLinkUpdate": "https://git.carvel.li/liza/Squadronista/releases/download/v0.2/Squadronista-0.2.zip",
"DownloadLinkTesting": "https://git.carvel.li/liza/Squadronista/releases/download/v0.2/Squadronista-0.2.zip",
"Changelog": "v0.2 (2023-10-12)\n- Squadron is now checked/reset more often to avoid stale data",
"IsHide": false,
"IsTestingExclusive": false
"IsTestingExclusive": true
}
]

View File

@ -1,81 +0,0 @@
import datetime
import json
import os
from zipfile import ZipFile
import requests
plugin_names = [
# [path, internal name, github repo]
["../SliceIsRight", "SliceIsRight", "SliceIsRight"],
["../FishNotify", "FishNotify", "FishNotify"],
["../Pal/Pal.Client", "Palace Pal", "PalacePal"],
["../RetainerTrack/RetainerTrack", "RetainerTrack", "RetainerTrack"],
["../NewGamePlusAnywhere/NewGamePlusAnywhere", "NewGamePlusAnywhere", "NewGamePlusAnywhere"],
["../ARDiscard/ARDiscard", "ARDiscard", "ARDiscard"],
["../Deliveroo/Deliveroo", "Deliveroo", "Deliveroo"],
["../ARControl/ARControl", "ARControl", "ARControl"],
["../Workshoppa/Workshoppa", "Workshoppa", "Workshoppa"],
["../Squadronista/Squadronista", "Squadronista", "Squadronista"],
]
def extract_manifests():
manifests = []
for plugin_name in plugin_names:
path = f"{plugin_name[0]}/dist/{plugin_name[1]}"
for filename in [item for item in os.listdir(path) if item.endswith(".zip") ]:
print(f"== {filename} ==")
with ZipFile(f"{path}/{filename}", "r") as z:
manifest = json.loads(z.read(f"{plugin_name[1]}.json").decode())
manifest['InternalName'] = plugin_name[1]
releases = requests.get(f"https://git.carvel.li/api/v1/repos/liza/{plugin_name[2]}/releases?limit=1000").json()
manifest['DownloadCount'] = 0
manifest['LastUpdate'] = int(datetime.datetime.fromisoformat(releases[0].get('published_at').replace('Z', '+00:00')).timestamp())
manifest['AcceptsFeedback'] = False
changelog_counter = 0
changelog = ''
for release in releases:
for asset in release.get('assets'):
if asset.get('name').endswith('.zip'):
manifest['DownloadCount'] += asset.get('download_count')
if 'DownloadLinkInstall' not in manifest:
manifest["DownloadLinkInstall"] = manifest["DownloadLinkUpdate"] = asset.get('browser_download_url')
if changelog_counter < 5 and release.get('body'):
changelog_counter += 1
changelog += f"{release.get('tag_name')} ({datetime.datetime.fromisoformat(release.get('published_at').replace('Z', '+00:00')).date()})\n{release.get('body')}\n\n"
changelog = changelog.strip()
if changelog:
manifest['Changelog'] = changelog
print(changelog)
manifests.append(manifest)
return manifests
def add_extra_fields(manifests):
DEFAULTS = {
"IsHide": False,
"IsTestingExclusive": False,
"ApplicableVersion": "any",
}
for manifest in manifests:
for k, v in DEFAULTS.items():
if k not in manifest:
manifest[k] = v
def dump_master(manifests):
with open(f"dist/pluginmaster.json", "w") as f:
json.dump(manifests, f, indent=4)
if __name__ == "__main__":
manifests = extract_manifests()
add_extra_fields(manifests)
dump_master(manifests)