Skip to content

Commit

Permalink
Merge pull request #10 from caseneuve/better-readme-and-usage-statement
Browse files Browse the repository at this point in the history
Better README and usage statement
  • Loading branch information
daald authored Mar 25, 2022
2 parents b9c05d8 + e2ffc5a commit 5612919
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,22 @@ Sample output
ii alsa-utils 1.0.27.2-1ubuntu2 amd64 Utilities for configuring and using ALSA GPL-2
ii anacron 2.3-20ubuntu1 amd64 cron-like program that doesn't go by time GPL-2

The output quality on an average workspace Ubuntu installation looks like this
CSV format
-------------

To get parsable format without shortened fields, use `--csv` (`-c`) flag:

$ ./dpkg-licenses -c
"St","Name","Version","Arch","Description","Licenses"
"ii","accountsservice","0.6.35-0ubuntu7.2","amd64","query and manipulate user account information","GPL-2+ GPL-3+"
"ii","acl","2.2.52-1","amd64","Access control list utilities","GPL LGPL-2.1"
"ii","acpid","1:2.0.21-1ubuntu2","amd64","Advanced Configuration and Power Interface event daemon","GPL-2"
...

Output quality
-------------

The output quality on an average workspace Ubuntu installation looks like this:

$ ./dpkg-licenses >output.txt 2>errors.txt
$ cat output.txt | cut -c135- | wc -l
Expand Down
8 changes: 6 additions & 2 deletions dpkg-licenses
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ case "$1" in
cat >&2 <<.e
Lists all installed packages (dpkg -l similar format) and prints their licenses
Usage: $0
Usage: $0 [-c]
Options:
-c, --csv use comma separated values (CSV) output format
-h, --help print this message
.e
exit 1
;;
-c)
--csv|-c)
CSV=1
;;
esac
Expand Down

0 comments on commit 5612919

Please sign in to comment.