nix-olde
nix-olde copied to clipboard
Print json
Looks like this
{"attribute":["adwaita-icon-theme"],"nixpkgs_version":["46.0"],"repology_name":"adwaita-icon-theme","repology_version":"46.2"}
{"attribute":["alex","haskellPackages.alex"],"nixpkgs_version":["3.4.0.1"],"repology_name":"alex","repology_version":"3.5.1.0"}
{"attribute":["alsa-lib","alsa-lib-with-plugins"],"nixpkgs_version":["1.2.11"],"repology_name":"alsa-lib","repology_version":"1.2.12"}
{"attribute":["alsa-ucm-conf"],"nixpkgs_version":["1.2.11"],"repology_name":"alsa-ucm-conf","repology_version":"1.2.12"}
{"attribute":["libaom"],"nixpkgs_version":["3.9.1"],"repology_name":"aom","repology_version":"3.10.0"}
{"attribute":["libapparmor"],"nixpkgs_version":["4.0.1"],"repology_name":"apparmor","repology_version":"4.0.3"}
{"attribute":["appstream-glib"],"nixpkgs_version":["0.8.2"],"repology_name":"appstream-glib","repology_version":"0.8.3"}
{"attribute":["apr"],"nixpkgs_version":["1.7.4"],"repology_name":"apr","repology_version":"1.7.5"}
{"attribute":["audit"],"nixpkgs_version":["4.0"],"repology_name":"audit","repology_version":"4.0.2"}
{"attribute":["python312Packages.autopep8"],"nixpkgs_version":["2.0.4-unstable-2023-10-27"],"repology_name":"autopep8","repology_version":"2.3.1"}
{"attribute":["aws-c-auth"],"nixpkgs_version":["0.7.25"],"repology_name":"aws-c-auth","repology_version":"0.7.29"}
{"attribute":["aws-c-cal"],"nixpkgs_version":["0.6.15"],"repology_name":"aws-c-cal","repology_version":"0.7.4"}
{"attribute":["aws-c-common"],"nixpkgs_version":["0.9.27"],"repology_name":"aws-c-common","repology_version":"0.9.28"}
{"attribute":["aws-c-http"],"nixpkgs_version":["0.8.2"],"repology_name":"aws-c-http","repology_version":"0.8.8"}
Submitting this easy way first in case I don't come up with a better way to do it
My suggestions are:
- enable json output based on a commandline flag, say
--output=json/--output-tty(existing output) - consider dumping the output as a single json object: that way it might be easier to dissect with
jqand to add things like unhandled attributes as separate fields. it might require slightly rearranging top-level loop that gathers the results and outputs them