Skip to content

Instantly share code, notes, and snippets.

@samsalisbury
Last active March 13, 2019 18:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samsalisbury/43298a247bfe182a51e10f383976c17c to your computer and use it in GitHub Desktop.
Save samsalisbury/43298a247bfe182a51e10f383976c17c to your computer and use it in GitHub Desktop.
Generating spreadsheet of Sous manifests + owners
[
.[]
|
select(
.NumInstances != 0
and ( .SourceID.Location | startswith("github.com/sous") | not )
and ( .SourceID.Location | contains("hack") | not )
and ( .SourceID.Location | contains("demo") | not )
and ( .SourceID.Location | contains("sous") | not )
)
|
{
source: .SourceID.Location,
owners: .Owners | keys | sort | join("|"),
}
]
| unique
| .[] | "\(.source)|\(.owners)"
sous query gdm -format=json | tee gdm.json
jq -s -f query.jq < gdm.json | jq -r '.' | sed $'s/|/\t/g' > manifests.tsv
pbcopy < manifests.tsv # now paste into Google Sheets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment