godot-asset-library icon indicating copy to clipboard operation
godot-asset-library copied to clipboard

Asset Library should automatically grab data from plugin.cfg

Open leopoldek opened this issue 6 years ago • 4 comments

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.

leopoldek avatar Jun 30 '18 07:06 leopoldek

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.

vnen avatar Jun 30 '18 16:06 vnen

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.

leopoldek avatar Jun 30 '18 17:06 leopoldek

Workflow idea:

  1. User has an asset uploaded to GitHub
  2. User clicks Submit Asset.
  3. A page is provided with only 3 things: a brief intro and link to the instructions, a text field for pasting the asset URL, and a "Next" or "Continue" etc button.
  4. User pastes the URL and clicks "Next".
  5. The asset library will search the repo for information, such as name, description, asset version, and more. It can search for plugin.cfg and addons/whatever/plugin.cfg for info, maybe get metadata from GitHub, maybe parse the README too?
  6. A second page is loaded with many fields already filled out from the above search.
  7. User looks over each field, fixes the problems, and submits the asset.

That said, this is a low-priority.

aaronfranke avatar Apr 14 '21 23:04 aaronfranke

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?

cyraid avatar Oct 10 '23 05:10 cyraid