Get url of package

question

#1

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")
    strip(readstring(path))
end

is there a better way?


#2

What is the issue with this solution? I used the same code to retrieve the URL: https://github.com/JuliaGraphs/JuliaGraphsTutorials/blob/master/DAG-Julia-Pkgs.ipynb

and plot data for all registered packages:


#3

Pkg.Read.url does pretty much exactly that


#4

My function

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