On Fri, Jul 24, 2015 at 11:07 AM, Ricardo Wurmus <[email protected]> wrote: > Hi Guix, > > attached is a patch to add a new importer for R packages published on > CRAN. (I still have to add tests for this.) > > The importer fetches the HTML description of an R package from > http://cran.r-project.org, converts it to SXML, and then tries to > extract the relevant information from the SXML expression. > > When I finished I thought that maybe this could be done with less effort > by downloading the tarball from CRAN, extracting the plain text > DESCRIPTION file containing the same information and parse that instead. > But in order to get the tarball I’d have to parse the HTML anyway, so > maybe that’s not so much better after all. > > This generates package expressions using the r-build-system — this build > system does not yet exist, but I’ll prepare one soon, not least to test > the importer. > [...] > Without further ado: the patch.
It looks pretty good so far, IMO! I don't have the time to a thorough review, but one thing I thought of while perusing was that the regexp-substitute/global calls could be factorized into procedures with descriptive names to aid the readability of cran-sxml->sexp. - Dave
