Skip to content

Instantly share code, notes, and snippets.

@mcintyre321
Last active January 2, 2016 09:49
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcintyre321/8285759 to your computer and use it in GitHub Desktop.
Save mcintyre321/8285759 to your computer and use it in GitHub Desktop.
void Main()
{
var x = XDocument.Load(@"...\packages.config")
.Document.Root.Elements().Select (r => r.Attribute("id").Value)
.Select (r => {
var cq = CsQuery.CQ.CreateFromUrl("https://www.nuget.org/packages/" + r);
return new{
Package = r,
License = cq[".licenseName"].Html(),
LicenseUrl = cq["a"].Single (el => el.InnerText == "License")["href"]
};
})
.Dump();
}
@mcintyre321
Copy link
Author

Oops, forgot the version numbers. An exercise for the reader...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment