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?
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?
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:
Pkg.Read.url
does pretty much exactly that
My function
I think Pkg.Read.url
does not exist in Julia v1.6…
That is a correct observation. This question and answer is almost four years old and were given for an obsolete major version of Julia, probably 0.5, and the package manager was completely rewritten for Julia 1.0.
If you have a question it is better to start a new post rather than reviving a years old thread.