Get url of package



I have the name of a registered package and I want to get its url. Currently I use the following hack:

function url(pkg)
    path = joinpath(Pkg.dir(), "METADATA", pkg, "url")

is there a better way?


What is the issue with this solution? I used the same code to retrieve the URL:

and plot data for all registered packages:


Pkg.Read.url does pretty much exactly that


My function

  • felt like something that is probably already implemented somewhere
  • uses implementation details of the package manager