r - Render DESCRIPTION file to html -


i'm looking function used exact or similar website cran package html websites, example one: https://cran.r-project.org/web/packages/dbi/index.html can use

utils::packagedescription("dbi") 

in r print description. can start work strings here , try format html, know there quite lot of useful technical helpers in utils , other packages, maybe there utilize render description html?
downloads , reverse dependencies sections not necessary in html output.

please define markup desire or expect.

cranberries has been doing close decade -- below code 'new' package. parse description file , loop on it, setting fields in bold , value in normal text.

writenewblogentry <- function(curpkg, curver, reposurl) {     blogpost <- file.path(bloginputdir, "new",                            paste(curpkg, "_", curver, ".txt", sep=""))     con <- file(blogpost, "wt")     cat("new package", curpkg, "with initial version", curver,"\n\n", file=con)     dcf <- read.dcf( url(getdescriptionurl(curpkg, reposurl)) )     (i in 1:ncol(dcf)) {         cat("<strong>", colnames(dcf)[i], "</strong>: ",             htmlescape(dcf[1,i]), "<br>\n", sep="", file=con)     }     closeblogpost(con, reposurl, curpkg) } 

this old code, , in context of particular (static) text html/rss renderer use.


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -