Function Reference: find_GHurls

pkg-octave-doc: pkgfcns = find_GHurls (pkgurl, pkgfcns)

Retrieve unique URLs to every function’s location within the package’s GitHub repository.

find_GHurls requires two input arguments, pkgurl, a char string with the URL to the root directory to the package’s GitHub repository and pkgfcns, a Nx2 cell array containing the package’s available functions (1st column) and their respective category (2nd column).

Note: find_GHurls explicitly works with repositories hosted on GitHub! pkgurl can be easily retrieved from the PKG_URL field of the info structure returned from package_texi2html.

find_GHurls returns a cell array, pkgfcns, by appending a third column to the input pkgfcns with the URLs to the source code location of each individual function listed in the 1st column of pkgfcns. find_GHurls relies on curl and tar, which must be installed and available to the system’s $PATH, and an active internet connection to download and extract the targeted repository to a temporary directory. If either curl or tar fail for any reason, find_GHurls returns a verbatim copy of the input pkgfcns.

Use the following example to obtain a cell array with each function’s URL to its source code location at GitHub:

 
 [pkgfcns, info] = package_texi2html ("pkg-octave-doc");
 pkgfcns = find_GHurls (info.PKG_URL, pkgfcns);
 

See also: function_texi2html

Source Code: find_GHurls