Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically detect license links #739

Open
UpcraftLP opened this issue Jun 7, 2024 · 4 comments
Open

Automatically detect license links #739

UpcraftLP opened this issue Jun 7, 2024 · 4 comments
Labels
enhancement A new feature or improvement

Comments

@UpcraftLP
Copy link

UpcraftLP commented Jun 7, 2024

Currently, the only way to specify a custom license is to use "license": "https://some-url".
While this works fine, modmenu will display it verbatim without the link being clickable.

It would be nice to change this, maybe a simple check like "does the license start with http:// or https://"

@haykam821
Copy link
Contributor

Another solution could be to introduce a new key for the links object. For example:

"custom": {
	"modmenu": {
		"links": {
			"modmenu.license": "https://some-url"
		}
	}
}

The license is generally meant to be a SPDX identifier, which this format would allow. In addition, the license name and link could differ.

@UpcraftLP
Copy link
Author

The license is generally meant to be a SPDX identifier, which this format would allow. In addition, the license name and link could differ.

That is impossible for custom licenses.

@Prospector
Copy link
Member

I don't believe a link is a valid identifier of a license, the spec is vague and doesn't fully specify but it does recommend using SPDX identifiers. You can denote a custom license in SPDX format using LicenseRef-<some sort of identifier>.

I've brought it up with the Fabric team and I think in v2 they will add support for links and custom names for licenses. I'd be open to adding my own license link field in Mod Menu metadata until that happens though.

@UpcraftLP
Copy link
Author

I don't believe a link is a valid identifier of a license, the spec is vague and doesn't fully specify but it does recommend using SPDX identifiers. You can denote a custom license in SPDX format using LicenseRef-<some sort of identifier>.

That leads to a worse user experience, imo, as now you would somehow magically need to know where to find "MyCustomLicense".
Plus, the current situation is that people are already using links (the spec allows arbitrary strings, which includes strings that are valid URLs), and as such, I think modmenu should support that without needing extra work.

@haykam821 haykam821 added the enhancement A new feature or improvement label Jul 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or improvement
Projects
None yet
Development

No branches or pull requests

3 participants