cabal-plan icon indicating copy to clipboard operation
cabal-plan copied to clipboard

Feature request: emit license-report as JSON

Open wenkokke opened this issue 2 years ago • 1 comments

For further processing, e.g., fetching all the license texts to build a license.txt file, it would be great if cabal-plan could emit the license-report as JSON.

Would it be possible to add a --json flag to the license-report subcommand?

I assume the implementation effort would be minimal, since we can presumable just convert the data structure used by the license report to json, rather than printing it as Markdown?

wenkokke avatar Dec 12 '22 15:12 wenkokke

This functionality is partly covered by the --licensedir flag, but:

  • it doesn't provide other information, such as the license name;
  • it doesn't provide an easy way to download licenses that are not included in the license directory, such as those packages that are bundled with GHC.

wenkokke avatar Dec 12 '22 15:12 wenkokke