Open leopoldek opened 6 years ago
Not all of the assets are plugins so not everything has a plugin.cfg
. It's also possible to have more than one plugin in the asset.
The asset library also don't look into the repository at all, it just provides the download links. It would need to clone the repository in the server (or maybe a download a direct link to the plugin.cfg
) before parsing it.
Couldn't the user maybe add a url to the plugin.cfg and the server would grab the info. I don't know about other storage providers but Github lets you access a file from a url (in the form of "https://raw.githubusercontent.com/(user)/(repo)/(path)"). And I never intended this to be mandatory since I'm aware that some assets aren't plugins. What could happen is an opt-in field where if you did specify the plugin.cfg url it would grab the data. Kind of like an autofill function. Otherwise, you would have to enter it in manually.
Workflow idea:
plugin.cfg
and addons/whatever/plugin.cfg
for info, maybe get metadata from GitHub, maybe parse the README too?That said, this is a low-priority.
Or perhaps detect the plugin.cfg in some standard locations (addons/<plugin>/plugin.cfg
). This would be supported with git repositories. If there's more than one plugin in the addons, then perhaps it's not an 'asset' that you're adding but multiple? Are multiple even allowed? Should they be? If so, then if multiple detected, grab all the plugin.cfg and list them all. If it's git, then automatic updating supported, otherwise perhaps not? Or manual URL?
When creating an asset, you have to update two sources of metadata, the asset page itself and
plugin.cfg
. In my opinion, the asset library should automatically scan the repo for a plugin.cfg and copy the information off it. Otherwise, this will create cases where the plugin creator forgets to update one or the other (which happened to me recently) and could lead to confusion. Although I'm not sure if this is even possible I think it's worth a thought at least.