diff --git a/DESCRIPTION b/DESCRIPTION index 3c39d4f..662458b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,20 +1,18 @@ Package: splashr Type: Package Title: Tools to Work with the 'Splash' 'JavaScript' Rendering Service -Version: 0.3.0 -Date: 2017-02-14 +Version: 0.4.0 +Date: 2017-08-26 Encoding: UTF-8 Author: Bob Rudis (bob@rud.is) Maintainer: Bob Rudis Description: 'Splash' is a 'JavaScript' rendering service. It’s a lightweight web browser with an 'HTTP' API, implemented in 'Python' using 'Twisted' and 'QT' and provides some of the core functionality of the 'RSelenium' or 'seleniumPipes' - R pacakges but with a Java-free footprint. The (twisted) 'QT' reactor is used to make the - sever fully asynchronous allowing to take advantage of 'webkit' concurrency via 'QT' main loop. - Some of 'Splash' features include the ability to process multiple webpages in parallel; - retrieving 'HTML' results and/or take screenshots; disabling images or use 'Adblock Plus' rules - to make rendering faster; executing custom 'JavaScript' in page context; getting detailed - rendering info in 'HAR' format. + R pacakges in a lightweight footprint. Some of 'Splash' features include the ability to process + multiple webpages in parallel; retrieving 'HTML' results and/or take screenshots; disabling + images or use 'Adblock Plus' rules to make rendering faster; executing custom 'JavaScript' in + page context; getting detailed rendering info in 'HAR' format. URL: http://github.com/hrbrmstr/splashr BugReports: https://github.com/hrbrmstr/splashr/issues License: AGPL diff --git a/NEWS.md b/NEWS.md index 50f12ef..184eb40 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +0.4.0 + +* moved to 'docker' pacakge since it's on CRAN +* temporarily removed `render_file()` support +* added code coverage + 0.3.0 * added basic pkg tests diff --git a/R/splashr-package.R b/R/splashr-package.R index 93d40ee..d0a6ab1 100644 --- a/R/splashr-package.R +++ b/R/splashr-package.R @@ -1,14 +1,12 @@ #' Tools to Work with the 'Splash' JavaScript Rendering Service #' -#' 'Splash' is a javascript rendering service. -#' It’s a lightweight web browser with an 'HTTP' API, implemented in Python using -#' 'Twisted'and 'QT' and provides some of the core functionality of the 'RSelenium' or -#' 'seleniumPipes'R packages but with a Java-free footprint. The (twisted) 'QT' reactor is -#' used to make the sever fully asynchronous allowing to take advantage of 'webkit' -#' concurrency via QT main loop. Some of Splash features include the ability to process -#' multiple webpages in parallel; retrieving HTML results and/or take screenshots; -#' disabling images or use Adblock Plus rules to make rendering faster; executing custom -#' JavaScript in page context; getting detailed rendering info in HAR format. +#' 'Splash' is a 'JavaScript' rendering service. +#' It’s a lightweight web browser with an 'HTTP' API, implemented in 'Python' using 'Twisted' +#' and 'QT' and provides some of the core functionality of the 'RSelenium' or 'seleniumPipes' +#' R pacakges in a lightweight footprint. Some of 'Splash' features include the ability to process +#' multiple webpages in parallel; retrieving 'HTML' results and/or take screenshots; disabling +#' images or use 'Adblock Plus' rules to make rendering faster; executing custom 'JavaScript' in +#' page context; getting detailed rendering info in 'HAR' format. #' #' @md #' @name splashr diff --git a/README.Rmd b/README.Rmd index 2e983ba..692b539 100644 --- a/README.Rmd +++ b/README.Rmd @@ -8,7 +8,7 @@ output: rmarkdown::github_document TL;DR: This package works with Splash rendering servers which are really just a REST API & `lua` scripting interface to a QT browser. It's an alternative to the Selenium ecosystem which was really engineered for application testing & validation. -Sometimes, all you need is a page scrape after javascript has been allowed to roam wild and free over your meticulously crafted HTML tags. So, this package does not do _everything_ Selenium can in pure R (the Lua interface is equally as powerful and accessible via R), but if you're just trying to get a page back that needs javascript rendering, this is a nice, lightweight, consistent alternative. +Sometimes, all you need is a page scrape after javascript has been allowed to roam wild and free over meticulously crafted HTML tags. So, this package does not do _everything_ Selenium can in pure R (though, the Lua interface is equally as powerful and accessible via R), but if you're just trying to get a page back that needs javascript rendering, this is a nice, lightweight, consistent alternative. It's also an alternative to `phantomjs` (which you can use in R within or without a Selenium context as it's it's own webdriver) and it may be useful to compare renderings between this package & `phantomjs`. @@ -133,8 +133,6 @@ library(splashr) library(magick) library(rvest) library(anytime) -library(htmlwidgets) -library(DiagrammeR) library(tidyverse) # current verison @@ -222,6 +220,9 @@ splash_local %>% ```{r echo=FALSE, eval=FALSE} +library(htmlwidgets) +library(DiagrammeR) + ### Rendering Widgets {r eval=FALSE} splash_vm <- start_splash(add_tempdir = TRUE) diff --git a/README.md b/README.md index c97a254..df1f685 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ TL;DR: This package works with Splash rendering servers which are really just a REST API & `lua` scripting interface to a QT browser. It's an alternative to the Selenium ecosystem which was really engineered for application testing & validation. -Sometimes, all you need is a page scrape after javascript has been allowed to roam wild and free over your meticulously crafted HTML tags. So, this package does not do *everything* Selenium can in pure R (the Lua interface is equally as powerful and accessible via R), but if you're just trying to get a page back that needs javascript rendering, this is a nice, lightweight, consistent alternative. +Sometimes, all you need is a page scrape after javascript has been allowed to roam wild and free over meticulously crafted HTML tags. So, this package does not do *everything* Selenium can in pure R (though, the Lua interface is equally as powerful and accessible via R), but if you're just trying to get a page back that needs javascript rendering, this is a nice, lightweight, consistent alternative. It's also an alternative to `phantomjs` (which you can use in R within or without a Selenium context as it's it's own webdriver) and it may be useful to compare renderings between this package & `phantomjs`. @@ -130,15 +130,13 @@ library(splashr) library(magick) library(rvest) library(anytime) -library(htmlwidgets) -library(DiagrammeR) library(tidyverse) # current verison packageVersion("splashr") ``` - ## [1] '0.3.0' + ## [1] '0.4.0' ``` r splash_active() @@ -159,7 +157,7 @@ splash_debug() ## ..$ LuaRuntime: int 1 ## ..$ QTimer : int 1 ## ..$ Request : int 1 - ## $ maxrss : int 75556 + ## $ maxrss : int 76308 ## $ qsize : int 0 ## $ url : chr "http://localhost:8050" ## - attr(*, "class")= chr [1:2] "splash_debug" "list" @@ -173,7 +171,7 @@ render_html(url = "http://marvel.com/universe/Captain_America_(Steve_Rogers)") ## {xml_document} ## - ## [1] \n