chore: initial commit
This commit is contained in:
commit
9fc90685c3
42
generate_pluginmaster.py
Normal file
42
generate_pluginmaster.py
Normal file
|
@ -0,0 +1,42 @@
|
|||
import yaml
|
||||
import json
|
||||
|
||||
DEFAULTS = {
|
||||
'IsHide': False,
|
||||
'IsTestingExclusive': False,
|
||||
'ApplicableVersion': 'any',
|
||||
}
|
||||
|
||||
DUPLICATES = {
|
||||
'DownloadLinkInstall': ['DownloadLinkTesting', 'DownloadLinkUpdate'],
|
||||
}
|
||||
|
||||
def main():
|
||||
# load in the source
|
||||
with open('pluginmaster.yaml') as f:
|
||||
snake_master = yaml.load(f, Loader=yaml.SafeLoader)
|
||||
# convert all keys to pascal case
|
||||
master = [ { snake_to_pascal(k): v for k, v in item.items() } for item in snake_master ]
|
||||
# generate the download link from the internal assembly name
|
||||
for item in master:
|
||||
item['DownloadLinkInstall'] = f'https://git.sr.ht/~jkcclemens/plugin_repo/blob/master/plugins/{item["InternalName"]}/latest.zip'
|
||||
# add default values if missing
|
||||
for k, v in DEFAULTS.items():
|
||||
for item in master:
|
||||
if k not in item:
|
||||
item[k] = v
|
||||
# duplicate keys as specified in DUPLICATES
|
||||
for item in master:
|
||||
for source, keys in DUPLICATES.items():
|
||||
for k in keys:
|
||||
if k not in item:
|
||||
item[k] = item[source]
|
||||
# write as pretty json
|
||||
with open('pluginmaster.json', 'w') as f:
|
||||
json.dump(master, f, indent=4)
|
||||
|
||||
def snake_to_pascal(name):
|
||||
return ''.join(part.title() for part in name.split('_'))
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
32
pluginmaster.json
Normal file
32
pluginmaster.json
Normal file
|
@ -0,0 +1,32 @@
|
|||
[
|
||||
{
|
||||
"Author": "ascclemens",
|
||||
"Name": "Macrology",
|
||||
"Description": "Adds a better macro system to the game.\nMacrology allows for macros of infinite length, adds looping, allows comments, supports pausing, allows you to run multiple macros at once, and supports fractional waits.",
|
||||
"InternalName": "Macrology",
|
||||
"AssemblyVersion": "0.1.0",
|
||||
"DalamudApiLevel": 2,
|
||||
"LastUpdate": "1608993444",
|
||||
"DownloadLinkInstall": "https://git.sr.ht/~jkcclemens/plugin_repo/blob/master/plugins/Macrology/latest.zip",
|
||||
"IsHide": false,
|
||||
"IsTestingExclusive": false,
|
||||
"ApplicableVersion": "any",
|
||||
"DownloadLinkTesting": "https://git.sr.ht/~jkcclemens/plugin_repo/blob/master/plugins/Macrology/latest.zip",
|
||||
"DownloadLinkUpdate": "https://git.sr.ht/~jkcclemens/plugin_repo/blob/master/plugins/Macrology/latest.zip"
|
||||
},
|
||||
{
|
||||
"Author": "ascclemens",
|
||||
"Name": "Python REPL",
|
||||
"Description": "Adds some commands for interacting with Dalamud from the chat box in Python.\nType a one-liner after /py to execute it. Dalamud, Dalamud.Plugin, Lumina, and Lumina.Excel.GeneratedSheets are all in scope by default. There is a variable named interface that is the DalamudPluginInterface for this plugin.",
|
||||
"InternalName": "DalamudPython",
|
||||
"AssemblyVersion": "1.0.0",
|
||||
"DalamudApiLevel": 2,
|
||||
"LastUpdate": "1608993444",
|
||||
"DownloadLinkInstall": "https://git.sr.ht/~jkcclemens/plugin_repo/blob/master/plugins/DalamudPython/latest.zip",
|
||||
"IsHide": false,
|
||||
"IsTestingExclusive": false,
|
||||
"ApplicableVersion": "any",
|
||||
"DownloadLinkTesting": "https://git.sr.ht/~jkcclemens/plugin_repo/blob/master/plugins/DalamudPython/latest.zip",
|
||||
"DownloadLinkUpdate": "https://git.sr.ht/~jkcclemens/plugin_repo/blob/master/plugins/DalamudPython/latest.zip"
|
||||
}
|
||||
]
|
25
pluginmaster.yaml
Normal file
25
pluginmaster.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
- author: ascclemens
|
||||
name: Macrology
|
||||
description: >-
|
||||
Adds a better macro system to the game.
|
||||
|
||||
Macrology allows for macros of infinite length, adds looping,
|
||||
allows comments, supports pausing, allows you to run multiple
|
||||
macros at once, and supports fractional waits.
|
||||
internal_name: Macrology
|
||||
assembly_version: '0.1.0'
|
||||
dalamud_api_level: 2
|
||||
last_update: '1608993444'
|
||||
- author: ascclemens
|
||||
name: Python REPL
|
||||
description: >-
|
||||
Adds some commands for interacting with Dalamud from the chat box in Python.
|
||||
|
||||
Type a one-liner after /py to execute it. Dalamud, Dalamud.Plugin,
|
||||
Lumina, and Lumina.Excel.GeneratedSheets are all in scope by
|
||||
default. There is a variable named interface that is the
|
||||
DalamudPluginInterface for this plugin.
|
||||
internal_name: DalamudPython
|
||||
assembly_version: '1.0.0'
|
||||
dalamud_api_level: 2
|
||||
last_update: '1608993444'
|
BIN
plugins/DalamudPython/latest.zip
Normal file
BIN
plugins/DalamudPython/latest.zip
Normal file
Binary file not shown.
BIN
plugins/Macrology/latest.zip
Normal file
BIN
plugins/Macrology/latest.zip
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user