flathub-infra / website

Monorepo with website and API
https://flathub.org
Apache License 2.0
229 stars 88 forks source link

Generate .flatpakref #859

Closed darkdragon-001 closed 1 year ago

darkdragon-001 commented 1 year ago

It would be great if one could access/download the .flatpakref directly.

Suggestion:

razzeee commented 1 year ago

Not sure what you mean, you can access it directly? Here's an example:

https://dl.flathub.org/repo/appstream/io.github.brunoherbelin.Vimix.flatpakref

darkdragon-001 commented 1 year ago

Oh this is awesome!

Then it would be even easier to just add a redirect from one of my suggested URLs. The reason why I think those URLs are superior is because they can easier be generated automatically by just appending something instead of regex parsing the app id and then generating a completely different URL from this.

razzeee commented 1 year ago

It would be helpful to have the actual usecase documented here and not just do it for the sake of doing it.

darkdragon-001 commented 1 year ago

It would be helpful to have the actual usecase documented here and not just do it for the sake of doing it.

I have a database of Linux mobile applications at https://framagit.org/linmobapps/linmobapps.frama.io/-/blob/master/apps.csv based on which data a website is generated automatically. I would like to easily add an install command to copy for the user. I might also want to automatically install applications in a safe environment to parse AppStream files like https://gitlab.gnome.org/World/apps-for-gnome is doing (by the way it would also be nice to easily download the AppStream XML file directly without installing the application by appending .appstream or similar). The easiest way would be to just append something to the saved value instead of more thorough parsing.

This is common practice (e.g. Mastodon RSS feeds append .rss to the profile URL, Github/Gitlab append .diff/.patch to a PR/MR URL, ...), so it would be nice if Flathub supports appending .flatpakref to the app URL as wel.