azubieta / AppImageInfo

Extracts metadata from a given AppImage.
GNU General Public License v3.0
4 stars 2 forks source link

Output YAML #4

Open probonopd opened 6 years ago

probonopd commented 6 years ago

Would it be possible to output YAML instead of and/or in addition to JSON?

azubieta commented 6 years ago

Possible it is. But I don't know if it would be convenient. This output is meant to be consumed by other apps not by people. So Json was chosen for being more machine friendly.

Would you mind to explain a bit the use cases you have in mind.

azubieta commented 6 years ago

By the way we should move the "AppInfo" spec to another place were we could discuss it.

probonopd commented 6 years ago

Currently I am using a crude script to produce https://github.com/AppImage/appimage.github.io/blob/master/apps/ and I was wondering if I could use appimage-releases-indexer instead.

Example: https://raw.githubusercontent.com/AppImage/appimage.github.io/master/apps/Addaps.md

If basically collects data from

probonopd commented 6 years ago

the "AppInfo" spec

Which spec do you mean?

azubieta commented 6 years ago

I mean this currently is just the output but I was thinking that it would be useful that every AppImage to include it's own. It could even be generated by a linuxdeploy-plugin at the end of the AppImage construction process. Also the plugin could include the functionality to push it (publish) to our listings server.

probonopd commented 6 years ago

Why should we do that as long as it can be constructed from the desktop file and the AppStream file that many apps already have?

azubieta commented 6 years ago

Good point. Against AppStream I just could say that is a bit complicated to fill. A nice editor with GUI could improve that in a major way. If the data contained in the AppStream format is enough for our purposes of keeping a nice listing of the AppImage available out there then we must use it. We should also keep encouraging people to use it and also to publish an AppStream file with every AppImage. To avoid us the work of downloading every single file to extract it's metadata.

azubieta commented 6 years ago

About the real topic of this issue: What about using something like this to properly transform the output to YAML? Or this one that doesn't require internet :smile: https://github.com/y13i/j2y

probonopd commented 6 years ago

If the data contained in the AppStream format is enough for our purposes of keeping a nice listing of the AppImage available out there then we must use it.

I agree that at the outside AppStream appears to be complicated, especially because it keeps changing (hence you are working against a moving target) and is XML (which is just a pain to deal with by hand). But apart from that, it has similar to objectives to what you are trying to build from scratch here, so maybe you could exchange some ideas with the AppStream guys.

cc @ximion

ximion commented 6 years ago

@probonopd AppStream has a YAML variant for it's collection metadata flavor (so, it can't be used by applications, but by people making software stores). You can run appstreamcli convert <xml-file-path> to get YAML.

As for AppStream being a moving target: The specification hasn't changed for a long time, the last breaking change was in 2016 and only affected the collection metadata. However, the validator gets much better with every release at catching mistakes automatically.

As for adding features to AppStream: Filing an issue about the desired feature is usually the best idea, coming with a patch is even better. However, adding new stuff usually comes with an extensive discussion and might take a while (unless it's completely uncontroversial).