Browse Source

replaces 'docker' with 'stevedore'; fixed minor cran checks

boB Rudis 1 year ago
parent
commit
36b748ba81
No known key found for this signature in database
56 changed files with 164 additions and 171 deletions
  1. 6
    6
      DESCRIPTION
  2. 4
    4
      NAMESPACE
  3. 5
    0
      NEWS.md
  4. 9
    12
      R/as-data-frame-har.R
  5. 28
    20
      R/docker-splash.r
  6. 1
    1
      R/splashr-package.R
  7. 7
    29
      README.Rmd
  8. 13
    14
      README.md
  9. 8
    10
      man/as_data_frame.harentry.Rd
  10. 1
    1
      man/as_har.Rd
  11. 1
    1
      man/as_httr_req.Rd
  12. 1
    1
      man/as_response.Rd
  13. 1
    1
      man/execute_lua.Rd
  14. 1
    1
      man/get_content_size.Rd
  15. 1
    1
      man/get_content_type.Rd
  16. 1
    1
      man/get_har_entry.Rd
  17. 1
    1
      man/get_request_type.Rd
  18. 1
    1
      man/get_request_url.Rd
  19. 1
    1
      man/get_response_body.Rd
  20. 1
    1
      man/har_entries.Rd
  21. 1
    1
      man/har_entry_count.Rd
  22. 2
    2
      man/install_splash.Rd
  23. 1
    1
      man/json_fromb64.Rd
  24. 1
    1
      man/killall_splash.Rd
  25. 6
    6
      man/render_har.Rd
  26. 5
    4
      man/render_html.Rd
  27. 7
    6
      man/render_jpeg.Rd
  28. 9
    8
      man/render_json.Rd
  29. 6
    6
      man/render_png.Rd
  30. 1
    1
      man/splash.Rd
  31. 1
    1
      man/splash_active.Rd
  32. 1
    1
      man/splash_add_lua.Rd
  33. 1
    1
      man/splash_click.Rd
  34. 1
    1
      man/splash_debug.Rd
  35. 1
    1
      man/splash_enable_javascript.Rd
  36. 1
    1
      man/splash_focus.Rd
  37. 1
    1
      man/splash_go.Rd
  38. 1
    1
      man/splash_har.Rd
  39. 1
    1
      man/splash_har_reset.Rd
  40. 1
    1
      man/splash_history.Rd
  41. 1
    1
      man/splash_html.Rd
  42. 1
    1
      man/splash_images.Rd
  43. 1
    1
      man/splash_perf_stats.Rd
  44. 1
    1
      man/splash_plugins.Rd
  45. 1
    1
      man/splash_png.Rd
  46. 1
    1
      man/splash_press.Rd
  47. 1
    1
      man/splash_private_mode.Rd
  48. 1
    1
      man/splash_release.Rd
  49. 1
    1
      man/splash_response_body.Rd
  50. 1
    1
      man/splash_send_keys.Rd
  51. 1
    1
      man/splash_send_text.Rd
  52. 1
    1
      man/splash_user_agent.Rd
  53. 1
    1
      man/splash_version.Rd
  54. 1
    1
      man/splash_wait.Rd
  55. 8
    3
      man/start_splash.Rd
  56. 1
    1
      man/stop_splash.Rd

+ 6
- 6
DESCRIPTION View File

@@ -1,8 +1,8 @@
1 1
 Package: splashr
2 2
 Type: Package
3 3
 Title: Tools to Work with the 'Splash' 'JavaScript' Rendering and Scraping Service
4
-Version: 0.5.0
5
-Date: 2018-08-13
4
+Version: 0.6.0
5
+Date: 2019-01-13
6 6
 Encoding: UTF-8
7 7
 Authors@R: c(
8 8
     person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"), 
@@ -16,8 +16,8 @@ Description: 'Splash' <https://github.com/scrapinghub/splash> is a 'JavaScript'
16 16
     multiple web pages in parallel; retrieving 'HTML' results and/or take screen shots; disabling 
17 17
     images or use 'Adblock Plus' rules to make rendering faster; executing custom 'JavaScript' in 
18 18
     page context; getting detailed rendering info in 'HAR' format.
19
-URL: http://github.com/hrbrmstr/splashr
20
-BugReports: https://github.com/hrbrmstr/splashr/issues
19
+URL: http://gitlab.com/hrbrmstr/splashr
20
+BugReports: https://gitlab.com/hrbrmstr/splashr/issues
21 21
 License: AGPL
22 22
 Suggests:
23 23
     testthat,
@@ -37,7 +37,7 @@ Imports:
37 37
     purrr,
38 38
     stats,
39 39
     utils,
40
-    docker,
40
+    stevedore,
41 41
     magick,
42 42
     scales,
43 43
     formatR,
@@ -46,5 +46,5 @@ Imports:
46 46
     HARtools,
47 47
     jsonlite,
48 48
     lubridate
49
-RoxygenNote: 6.0.1.9000
49
+RoxygenNote: 6.1.1
50 50
 VignetteBuilder: knitr

+ 4
- 4
NAMESPACE View File

@@ -3,14 +3,14 @@
3 3
 S3method(as.data.frame,har)
4 4
 S3method(as.data.frame,harentries)
5 5
 S3method(as.data.frame,harentry)
6
-S3method(as_data_frame,har)
7
-S3method(as_data_frame,harentries)
8
-S3method(as_data_frame,harentry)
9 6
 S3method(print,splash_debug)
10 7
 S3method(print,splash_json)
11 8
 export("%>%")
12 9
 export(HARviewer)
13 10
 export(HARviewerOutput)
11
+export(as_data_frame.har)
12
+export(as_data_frame.harentries)
13
+export(as_data_frame.harentry)
14 14
 export(as_har)
15 15
 export(as_httr_req)
16 16
 export(as_response)
@@ -90,10 +90,10 @@ export(ua_win7_chrome)
90 90
 export(ua_win7_firefox)
91 91
 export(ua_win7_ie11)
92 92
 export(writeHAR)
93
-import(docker)
94 93
 import(httr)
95 94
 import(magick)
96 95
 import(purrr)
96
+import(stevedore)
97 97
 importFrom(HARtools,HARviewer)
98 98
 importFrom(HARtools,HARviewerOutput)
99 99
 importFrom(HARtools,renderHARviewer)

+ 5
- 0
NEWS.md View File

@@ -1,3 +1,8 @@
1
+0.6.0
2
+
3
+* Switch Docker orchestration to the `stevedore` package
4
+* Fixed minor check on as.data.frame functions
5
+
1 6
 0.5.0
2 7
 
3 8
 * support Splash API basic auth

+ 9
- 12
R/as-data-frame-har.R View File

@@ -1,13 +1,14 @@
1 1
 #' Turns a "HAR"-like object into a data frame(tibble)
2 2
 #'
3 3
 #' @md
4
-#' @param harentry_obj A `harentry` object
4
+#' @param x A `harentry` object
5
+#' @param ... ignored
5 6
 #' @return data frame (tibble)
6 7
 #' @export
7
-as_data_frame.harentry <- function(harentry_obj) {
8
+as_data_frame.harentry <- function(x, ...) {
8 9
 
9
-  req <- harentry_obj$request
10
-  resp <- harentry_obj$response
10
+  req <- x$request
11
+  resp <- x$response
11 12
 
12 13
   data_frame(
13 14
     request_url = req$url,
@@ -35,20 +36,16 @@ as_data_frame.harentry <- function(harentry_obj) {
35 36
 
36 37
 }
37 38
 
38
-#' @md
39
-#' @param harentries_obj A `harentry` object
40 39
 #' @rdname as_data_frame.harentry
41 40
 #' @export
42
-as_data_frame.harentries <- function(harentries_obj) {
43
-  map_df(harentries_obj, as_data_frame)
41
+as_data_frame.harentries <- function(x, ...) {
42
+  map_df(x, as_data_frame)
44 43
 }
45 44
 
46
-#' @md
47
-#' @param har_obj A `har` object
48 45
 #' @rdname as_data_frame.harentry
49 46
 #' @export
50
-as_data_frame.har <- function(har_obj) {
51
-  as_data_frame(har_obj$log$entries)
47
+as_data_frame.har <- function(x, ...) {
48
+  as_data_frame(x$log$entries)
52 49
 }
53 50
 
54 51
 #' @export

+ 28
- 20
R/docker-splash.r View File

@@ -9,11 +9,9 @@
9 9
 #' splash_container <- start_splash()
10 10
 #' stop_splash(splash_container)
11 11
 #' }
12
-install_splash <- function(tag="3.0") {
13
-  client <- docker::docker$from_env()
14
-  res <- client$api$pull("scrapinghub/splash", tag)
15
-  res <- jsonlite::stream_in(textConnection(res), verbose=FALSE)
16
-  invisible(lapply(res$status, function(x) { message(x) }))
12
+install_splash <- function(tag="3.2") {
13
+  docker <- stevedore::docker_client()
14
+  res <- docker$image$pull("scrapinghub/splash", tag=tag, stream=stdout())
17 15
 }
18 16
 
19 17
 #' Start a Splash server Docker container
@@ -26,22 +24,29 @@ install_splash <- function(tag="3.0") {
26 24
 #'       [install_splash] for this to work. You should save the resultant
27 25
 #'       object for use in [stop_splash] otherwise you'll have to kill it from the
28 26
 #'       command line interface.
27
+#' @param container_name naem for the container. Defaults to "`splashr`".
28
+#' @param remove remove the Splash container instance after it's stopped?
29
+#'        Defaults to `FALSE`.
29 30
 #' @family splash_docker_helpers
30
-#' @return `docker` `container` object
31
+#' @return `stevedor` container object
31 32
 #' @export
32 33
 #' @examples \dontrun{
33 34
 #' install_splash()
34 35
 #' splash_container <- start_splash()
35 36
 #' stop_splash(splash_container)
36 37
 #' }
37
-start_splash <- function(tag="3.0") {
38
+start_splash <- function(tag="3.2", container_name = "splashr", remove=FALSE) {
38 39
 
39
-  client <- docker::docker$from_env()
40
+  docker <- stevedore::docker_client()
40 41
 
41
-  splash_inst <- client$containers$run(
42
-    sprintf("scrapinghub/splash:%s", tag), name="splashr",
43
-    detach=TRUE, ports=list('8050/tcp'='8050', '5023/tcp'='5023', '8051/tcp'='8051')
44
-  )
42
+  docker$container$run(
43
+    image = sprintf("scrapinghub/splash:%s", tag),
44
+    name = container_name,
45
+    ports = c("5023:5023", "8051:8051"),
46
+    detach = TRUE,
47
+    rm = remove,
48
+    tty = TRUE
49
+  ) -> splash_inst
45 50
 
46 51
   invisible(splash_inst)
47 52
 
@@ -63,6 +68,7 @@ start_splash <- function(tag="3.0") {
63 68
 stop_splash <- function(splash_container) {
64 69
   splash_container$stop()
65 70
   splash_container$remove()
71
+  invisible(NULL)
66 72
 }
67 73
 
68 74
 #' Prune all dead and running Splash Docker containers
@@ -76,14 +82,16 @@ stop_splash <- function(splash_container) {
76 82
 #' @export
77 83
 killall_splash <- function() {
78 84
 
79
-  client <- docker::docker$from_env()
80
-  x <- client$containers$list(all = TRUE)
81
-
82
-  for (cntnr in x) {
83
-    if (grepl("scrapinghub/splash", cntnr$image$tags[1])) {
84
-      message(sprintf("Pruning: %s...", cntnr$id))
85
-      if (cntnr$status == "running") cntnr$stop()
86
-      cntnr$remove()
85
+  docker <- stevedore::docker_client()
86
+  x <- docker$container$list(all=TRUE)
87
+  for (i in 1:nrow(x)) {
88
+    if (grepl("bin/splash", x$command[i])) {
89
+      message(sprintf("Pruning: %s...", x$id[i]))
90
+      if (x$state[i] == "running") {
91
+        cntnr <- docker$container$get(x$id[i])
92
+        cntnr$stop()
93
+        cntnr$remove()
94
+      }
87 95
     }
88 96
   }
89 97
 }

+ 1
- 1
R/splashr-package.R View File

@@ -14,7 +14,7 @@
14 14
 #' @name splashr
15 15
 #' @docType package
16 16
 #' @author Bob Rudis (bob@@rud.is)
17
-#' @import purrr httr magick docker
17
+#' @import purrr httr magick stevedore
18 18
 #' @importFrom stringi stri_split_regex stri_split_fixed stri_detect_regex stri_split_lines
19 19
 #' @importFrom HARtools writeHAR HARviewer renderHARviewer HARviewerOutput
20 20
 #' @importFrom xml2 read_html url_parse

+ 7
- 29
README.Rmd View File

@@ -6,15 +6,15 @@ output: rmarkdown::github_document
6 6
 [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/splashr)](https://cran.r-project.org/package=splashr)
7 7
 [![](http://cranlogs.r-pkg.org/badges/splashr)](http://cran.rstudio.com/web/packages/splashr/index.html)
8 8
 
9
-`splashr` : Tools to Work with the 'Splash' JavaScript Rendering Service
9
+# `splashr` : Tools to Work with the 'Splash' JavaScript Rendering Service
10 10
 
11 11
 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. 
12 12
 
13 13
 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.
14 14
 
15
-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`.
15
+It's also an alternative to the somewhat abandoned `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`.
16 16
 
17
-You can also get it running with two commands:
17
+The package uses the [`stevedore`](https://github.com/richfitz/stevedore) package to orchestrate Docker on your system (if you have Docker and more on how to use the `stevedore` integration below) but you can also do get it running in Docker on the command-line with two commands:
18 18
 
19 19
     sudo docker pull scrapinghub/splash:3.0
20 20
     sudo docker run -p 5023:5023 -p 8050:8050 -p 8051:8051 scrapinghub/splash:3.0
@@ -28,7 +28,7 @@ Folks super-new to Docker on Unix-ish platforms should [make sure to do](https:/
28 28
 
29 29
 (`$USER` is your username and shld be defined for you in the environment)
30 30
 
31
-If using the [`docker`](https://github.com/bhaskarvk/docker) package you can use the convience wrappers in this pacakge:
31
+If using the [`stevedore`](https://github.com/richfitz/stevedore) package you can use the convience wrappers in this pacakge:
32 32
 
33 33
     install_splash()
34 34
     splash_container <- start_splash()
@@ -119,12 +119,14 @@ Suggest more in a feature req!
119 119
 ### Installation
120 120
 
121 121
 ```{r eval=FALSE}
122
+devtools::install_git("https://sr.ht/~hrbrmstr/splashr.git")
123
+# or
122 124
 devtools::install_git("https://gitlab.com/hrbrmstr/splashr.git")
123 125
 # or
124 126
 devtools::install_github("hrbrmstr/splashr")
125 127
 ```
126 128
 
127
-```{r message=FALSE, warning=FALSE, error=FALSE}
129
+```{r message=FALSE, warning=FALSE, error=FALSE, include=FALSE}
128 130
 options(width=120)
129 131
 ```
130 132
 
@@ -223,30 +225,6 @@ splash_local %>%
223 225
 
224 226
 <img src="img/flash.png" width="50%"/>
225 227
 
226
-```{r echo=FALSE, eval=FALSE}
227
-library(htmlwidgets)
228
-library(DiagrammeR)
229
-
230
-  ### Rendering Widgets
231
-  {r eval=FALSE}
232
-  splash_vm <- start_splash(add_tempdir = TRUE)
233
-  
234
-DiagrammeR("
235
-  graph LR
236
-    A-->B
237
-    A-->C
238
-    C-->E
239
-    B-->D
240
-    C-->D
241
-    D-->F
242
-    E-->F
243
-") %>% 
244
-  saveWidget("/tmp/diag.html")
245
-
246
-render_file(url = "/tmp/diag.html", output="html")
247
-![](img/diag.png)
248
-```
249
-
250 228
 ```{r eval=FALSE}
251 229
 stop_splash(splash_vm)
252 230
 ```

+ 13
- 14
README.md View File

@@ -1,20 +1,20 @@
1 1
 
2 2
 [![Travis-CI Build Status](https://travis-ci.org/hrbrmstr/splashr.svg?branch=master)](https://travis-ci.org/hrbrmstr/splashr) [![Coverage Status](https://img.shields.io/codecov/c/github/hrbrmstr/splashr/master.svg)](https://codecov.io/github/hrbrmstr/splashr?branch=master) [![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/splashr)](https://cran.r-project.org/package=splashr) [![](http://cranlogs.r-pkg.org/badges/splashr)](http://cran.rstudio.com/web/packages/splashr/index.html)
3 3
 
4
-`splashr` : Tools to Work with the 'Splash' JavaScript Rendering Service
4
+# `splashr` : Tools to Work with the 'Splash' JavaScript Rendering Service
5 5
 
6 6
 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.
7 7
 
8 8
 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.
9 9
 
10
-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`.
10
+It's also an alternative to the somewhat abandoned `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`.
11 11
 
12
-You can also get it running with two commands:
12
+The package uses the [`stevedore`](https://github.com/richfitz/stevedore) package to orchestrate Docker on your system (if you have Docker and more on how to use the `stevedore` integration below) but you can also do get it running in Docker on the command-line with two commands:
13 13
 
14 14
     sudo docker pull scrapinghub/splash:3.0
15 15
     sudo docker run -p 5023:5023 -p 8050:8050 -p 8051:8051 scrapinghub/splash:3.0
16
-
17
-Do whatever you Windows ppl do with Docker on your systems to make ^^ work.
16
+    
17
+Do whatever you Windows ppl do with Docker on your systems to make ^^ work. 
18 18
 
19 19
 Folks super-new to Docker on Unix-ish platforms should [make sure to do](https://github.com/hrbrmstr/splashr/issues/3#issuecomment-280686494):
20 20
 
@@ -23,7 +23,7 @@ Folks super-new to Docker on Unix-ish platforms should [make sure to do](https:/
23 23
 
24 24
 (`$USER` is your username and shld be defined for you in the environment)
25 25
 
26
-If using the [`docker`](https://github.com/bhaskarvk/docker) package you can use the convience wrappers in this pacakge:
26
+If using the [`stevedore`](https://github.com/richfitz/stevedore) package you can use the convience wrappers in this pacakge:
27 27
 
28 28
     install_splash()
29 29
     splash_container <- start_splash()
@@ -31,7 +31,7 @@ If using the [`docker`](https://github.com/bhaskarvk/docker) package you can use
31 31
 and then run:
32 32
 
33 33
     stop_splash(splash_container)
34
-
34
+    
35 35
 when done. All of that happens on your localhost and you will not need to specify `splash_obj` to many of the `splashr` functions if you're running Splash in this default configuration as long as you use named parameters. You can also use the pre-defined `splash_local` object if you want to use positional parameters.
36 36
 
37 37
 Now, you can run Selenium in Docker, so this is not unique to Splash. But, a Docker context makes it so that you don't have to run or maintain icky Python stuff directly on your system. Leave it in the abandoned warehouse district where it belongs.
@@ -114,12 +114,11 @@ Suggest more in a feature req!
114 114
 ### Installation
115 115
 
116 116
 ``` r
117
-devtools::install_github("hrbrmstr/splashr")
118
-```
119
-
120
-``` r
121
-options(width=120)
122
-```
117
+devtools::install_git("https://sr.ht/~hrbrmstr/splashr.git")
118
+# or
119
+devtools::install_git("https://gitlab.com/hrbrmstr/splashr.git")
120
+# or
121
+devtools::install_github("hrbrmstr/splashr")```
123 122
 
124 123
 ### Usage
125 124
 
@@ -136,7 +135,7 @@ library(tidyverse)
136 135
 packageVersion("splashr")
137 136
 ```
138 137
 
139
-    ## [1] '0.4.0'
138
+    ## [1] '0.6.0'
140 139
 
141 140
 ``` r
142 141
 splash_active()

+ 8
- 10
man/as_data_frame.harentry.Rd View File

@@ -9,24 +9,22 @@
9 9
 \alias{as.data.frame.harentry}
10 10
 \title{Turns a "HAR"-like object into a data frame(tibble)}
11 11
 \usage{
12
-\method{as_data_frame}{harentry}(harentry_obj)
12
+as_data_frame.harentry(x, ...)
13 13
 
14
-\method{as_data_frame}{harentries}(harentries_obj)
14
+as_data_frame.harentries(x, ...)
15 15
 
16
-\method{as_data_frame}{har}(har_obj)
16
+as_data_frame.har(x, ...)
17 17
 
18
-\method{as.data.frame}{har}(har_obj)
18
+\method{as.data.frame}{har}(x, ...)
19 19
 
20
-\method{as.data.frame}{harentries}(harentries_obj)
20
+\method{as.data.frame}{harentries}(x, ...)
21 21
 
22
-\method{as.data.frame}{harentry}(harentry_obj)
22
+\method{as.data.frame}{harentry}(x, ...)
23 23
 }
24 24
 \arguments{
25
-\item{harentry_obj}{A \code{harentry} object}
25
+\item{x}{A \code{harentry} object}
26 26
 
27
-\item{harentries_obj}{A \code{harentry} object}
28
-
29
-\item{har_obj}{A \code{har} object}
27
+\item{...}{ignored}
30 28
 }
31 29
 \value{
32 30
 data frame (tibble)

+ 1
- 1
man/as_har.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/render-har.r
2
+% Please edit documentation in R/render-har.R
3 3
 \name{as_har}
4 4
 \alias{as_har}
5 5
 \title{Turn a generic Splash HAR response into a HAR object}

+ 1
- 1
man/as_httr_req.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/as_req.r
2
+% Please edit documentation in R/as_req.R
3 3
 \name{as_httr_req}
4 4
 \alias{as_httr_req}
5 5
 \title{Create an httr verb request function from an HAR request}

+ 1
- 1
man/as_response.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/as_request.r
2
+% Please edit documentation in R/as_request.R
3 3
 \name{as_response}
4 4
 \alias{as_response}
5 5
 \title{Return a HAR entry response as an httr::response object}

+ 1
- 1
man/execute_lua.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/execute.r
2
+% Please edit documentation in R/execute.R
3 3
 \name{execute_lua}
4 4
 \alias{execute_lua}
5 5
 \title{Execute a custom rendering script and return a result.}

+ 1
- 1
man/get_content_size.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/content.r
2
+% Please edit documentation in R/content.R
3 3
 \name{get_content_size}
4 4
 \alias{get_content_size}
5 5
 \alias{get_body_size}

+ 1
- 1
man/get_content_type.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/helpers.r
2
+% Please edit documentation in R/helpers.R
3 3
 \name{get_content_type}
4 4
 \alias{get_content_type}
5 5
 \alias{is_content_type}

+ 1
- 1
man/get_har_entry.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/helpers.r
2
+% Please edit documentation in R/helpers.R
3 3
 \name{get_har_entry}
4 4
 \alias{get_har_entry}
5 5
 \title{Retrieve an entry by index from a HAR object}

+ 1
- 1
man/get_request_type.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/helpers.r
2
+% Please edit documentation in R/helpers.R
3 3
 \name{get_request_type}
4 4
 \alias{get_request_type}
5 5
 \alias{is_get}

+ 1
- 1
man/get_request_url.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/helpers.r
2
+% Please edit documentation in R/helpers.R
3 3
 \name{get_request_url}
4 4
 \alias{get_request_url}
5 5
 \title{Retrieve request URL}

+ 1
- 1
man/get_response_body.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/helpers.r
2
+% Please edit documentation in R/helpers.R
3 3
 \name{get_response_body}
4 4
 \alias{get_response_body}
5 5
 \title{Retrieve the body content of a HAR entry}

+ 1
- 1
man/har_entries.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/helpers.r
2
+% Please edit documentation in R/helpers.R
3 3
 \name{har_entries}
4 4
 \alias{har_entries}
5 5
 \title{Retrieve just the HAR entries from a splashr request}

+ 1
- 1
man/har_entry_count.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/helpers.r
2
+% Please edit documentation in R/helpers.R
3 3
 \name{har_entry_count}
4 4
 \alias{har_entry_count}
5 5
 \title{Retrieves number of HAR entries in a response}

+ 2
- 2
man/install_splash.Rd View File

@@ -1,10 +1,10 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/docker-splash.r
2
+% Please edit documentation in R/docker-splash.R
3 3
 \name{install_splash}
4 4
 \alias{install_splash}
5 5
 \title{Retrieve the Docker image for Splash}
6 6
 \usage{
7
-install_splash(tag = "3.0")
7
+install_splash(tag = "3.2")
8 8
 }
9 9
 \arguments{
10 10
 \item{tag}{Splash Docker image tag to install}

+ 1
- 1
man/json_fromb64.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/utils.r
2
+% Please edit documentation in R/utils.R
3 3
 \name{json_fromb64}
4 4
 \alias{json_fromb64}
5 5
 \title{Convert a Base64 encoded string into an R object}

+ 1
- 1
man/killall_splash.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/docker-splash.r
2
+% Please edit documentation in R/docker-splash.R
3 3
 \name{killall_splash}
4 4
 \alias{killall_splash}
5 5
 \title{Prune all dead and running Splash Docker containers}

+ 6
- 6
man/render_har.Rd View File

@@ -1,14 +1,14 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/render-har.r
2
+% Please edit documentation in R/render-har.R
3 3
 \name{render_har}
4 4
 \alias{render_har}
5 5
 \title{Return information about Splash interaction with a website in HAR format.}
6 6
 \usage{
7
-render_har(splash_obj = splash_local, url, base_url, response_body = FALSE,
8
-  timeout = 30, resource_timeout, wait = 0, proxy, js, js_src, filters,
9
-  allowed_domains, allowed_content_types, forbidden_content_types,
10
-  viewport = "1024x768", images, headers, body, http_method, save_args,
11
-  load_args)
7
+render_har(splash_obj = splash_local, url, base_url,
8
+  response_body = FALSE, timeout = 30, resource_timeout, wait = 0,
9
+  proxy, js, js_src, filters, allowed_domains, allowed_content_types,
10
+  forbidden_content_types, viewport = "1024x768", images, headers, body,
11
+  http_method, save_args, load_args)
12 12
 }
13 13
 \arguments{
14 14
 \item{splash_obj}{Object created by a call to \code{\link[=splash]{splash()}}}

+ 5
- 4
man/render_html.Rd View File

@@ -1,13 +1,14 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/render-html.r
2
+% Please edit documentation in R/render-html.R
3 3
 \name{render_html}
4 4
 \alias{render_html}
5 5
 \title{Return the HTML of the javascript-rendered page.}
6 6
 \usage{
7 7
 render_html(splash_obj = splash_local, url, base_url, timeout = 30,
8
-  resource_timeout, wait = 0, proxy, js, js_src, filters, allowed_domains,
9
-  allowed_content_types, forbidden_content_types, viewport = "1024x768",
10
-  images, headers, body, http_method, save_args, load_args, raw_html = FALSE)
8
+  resource_timeout, wait = 0, proxy, js, js_src, filters,
9
+  allowed_domains, allowed_content_types, forbidden_content_types,
10
+  viewport = "1024x768", images, headers, body, http_method, save_args,
11
+  load_args, raw_html = FALSE)
11 12
 }
12 13
 \arguments{
13 14
 \item{splash_obj}{Object created by a call to \code{\link[=splash]{splash()}}}

+ 7
- 6
man/render_jpeg.Rd View File

@@ -1,14 +1,15 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/render-jpg.r
2
+% Please edit documentation in R/render-jpg.R
3 3
 \name{render_jpeg}
4 4
 \alias{render_jpeg}
5 5
 \title{Return a image (in JPEG format) of the javascript-rendered page.}
6 6
 \usage{
7
-render_jpeg(splash_obj = splash_local, url, base_url = NULL, quality = 75,
8
-  width, height, timeout = 30, resource_timeout, wait = 0,
9
-  render_all = TRUE, proxy, js, js_src, filters, allowed_domains,
10
-  allowed_content_types, forbidden_content_types, viewport = "full", images,
11
-  headers, body, http_method, save_args, load_args)
7
+render_jpeg(splash_obj = splash_local, url, base_url = NULL,
8
+  quality = 75, width, height, timeout = 30, resource_timeout,
9
+  wait = 0, render_all = TRUE, proxy, js, js_src, filters,
10
+  allowed_domains, allowed_content_types, forbidden_content_types,
11
+  viewport = "full", images, headers, body, http_method, save_args,
12
+  load_args)
12 13
 }
13 14
 \arguments{
14 15
 \item{splash_obj}{Object created by a call to \code{\link[=splash]{splash()}}}

+ 9
- 8
man/render_json.Rd View File

@@ -1,16 +1,17 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/render-json.r
2
+% Please edit documentation in R/render-json.R
3 3
 \name{render_json}
4 4
 \alias{render_json}
5 5
 \title{Return a json-encoded dictionary with information about javascript-rendered webpage.}
6 6
 \usage{
7
-render_json(splash_obj = splash_local, url, base_url = NULL, quality = 75,
8
-  width, height, timeout = 30, resource_timeout, wait = 0,
9
-  render_all = FALSE, proxy, js, js_src, filters, allowed_domains,
10
-  allowed_content_types, forbidden_content_types, viewport = "1024x768",
11
-  images, headers, body, http_method, save_args, load_args, html = TRUE,
12
-  png = FALSE, jpeg = FALSE, iframes = TRUE, script = TRUE,
13
-  console = TRUE, history = TRUE, har = TRUE, response_body = FALSE)
7
+render_json(splash_obj = splash_local, url, base_url = NULL,
8
+  quality = 75, width, height, timeout = 30, resource_timeout,
9
+  wait = 0, render_all = FALSE, proxy, js, js_src, filters,
10
+  allowed_domains, allowed_content_types, forbidden_content_types,
11
+  viewport = "1024x768", images, headers, body, http_method, save_args,
12
+  load_args, html = TRUE, png = FALSE, jpeg = FALSE,
13
+  iframes = TRUE, script = TRUE, console = TRUE, history = TRUE,
14
+  har = TRUE, response_body = FALSE)
14 15
 }
15 16
 \arguments{
16 17
 \item{splash_obj}{Object created by a call to \code{\link[=splash]{splash()}}}

+ 6
- 6
man/render_png.Rd View File

@@ -1,14 +1,14 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/render-png.r
2
+% Please edit documentation in R/render-png.R
3 3
 \name{render_png}
4 4
 \alias{render_png}
5 5
 \title{Return an image (in PNG format) of the javascript-rendered page.}
6 6
 \usage{
7
-render_png(splash_obj = splash_local, url, base_url = NULL, width, height,
8
-  timeout = 30, resource_timeout, wait = 0, render_all = TRUE, proxy, js,
9
-  js_src, filters, allowed_domains, allowed_content_types,
10
-  forbidden_content_types, viewport = "full", images, headers, body,
11
-  http_method, save_args, load_args)
7
+render_png(splash_obj = splash_local, url, base_url = NULL, width,
8
+  height, timeout = 30, resource_timeout, wait = 0,
9
+  render_all = TRUE, proxy, js, js_src, filters, allowed_domains,
10
+  allowed_content_types, forbidden_content_types, viewport = "full",
11
+  images, headers, body, http_method, save_args, load_args)
12 12
 }
13 13
 \arguments{
14 14
 \item{splash_obj}{Object created by a call to \code{\link[=splash]{splash()}}}

+ 1
- 1
man/splash.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/splashr.r
2
+% Please edit documentation in R/splashr.R
3 3
 \docType{data}
4 4
 \name{splash}
5 5
 \alias{splash}

+ 1
- 1
man/splash_active.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/splashr.r
2
+% Please edit documentation in R/splashr.R
3 3
 \name{splash_active}
4 4
 \alias{splash_active}
5 5
 \title{Test if a Splash server is up}

+ 1
- 1
man/splash_add_lua.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_add_lua}
4 4
 \alias{splash_add_lua}
5 5
 \title{Add raw lua code into DSL call chain}

+ 1
- 1
man/splash_click.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_click}
4 4
 \alias{splash_click}
5 5
 \title{Trigger mouse click event in web page.}

+ 1
- 1
man/splash_debug.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/splashr.r
2
+% Please edit documentation in R/splashr.R
3 3
 \name{splash_debug}
4 4
 \alias{splash_debug}
5 5
 \alias{print.splash_debug}

+ 1
- 1
man/splash_enable_javascript.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_enable_javascript}
4 4
 \alias{splash_enable_javascript}
5 5
 \title{Enable or disable execution of JavaSript code embedded in the page.}

+ 1
- 1
man/splash_focus.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_focus}
4 4
 \alias{splash_focus}
5 5
 \title{Focus on a document element provided by a CSS selector}

+ 1
- 1
man/splash_go.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_go}
4 4
 \alias{splash_go}
5 5
 \title{Go to an URL.}

+ 1
- 1
man/splash_har.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_har}
4 4
 \alias{splash_har}
5 5
 \title{Return information about Splash interaction with a website in HAR format.}

+ 1
- 1
man/splash_har_reset.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_har_reset}
4 4
 \alias{splash_har_reset}
5 5
 \title{Drops all internally stored HAR records.}

+ 1
- 1
man/splash_history.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/splashr.r
2
+% Please edit documentation in R/splashr.R
3 3
 \name{splash_history}
4 4
 \alias{splash_history}
5 5
 \title{Get information about requests/responses for the pages loaded}

+ 1
- 1
man/splash_html.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_html}
4 4
 \alias{splash_html}
5 5
 \title{Return a HTML snapshot of a current page.}

+ 1
- 1
man/splash_images.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_images}
4 4
 \alias{splash_images}
5 5
 \title{Enable/disable images}

+ 1
- 1
man/splash_perf_stats.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/splashr.r
2
+% Please edit documentation in R/splashr.R
3 3
 \name{splash_perf_stats}
4 4
 \alias{splash_perf_stats}
5 5
 \title{Get Splash performance-related statistics}

+ 1
- 1
man/splash_plugins.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_plugins}
4 4
 \alias{splash_plugins}
5 5
 \title{Enable or disable browser plugins (e.g. Flash).}

+ 1
- 1
man/splash_png.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_png}
4 4
 \alias{splash_png}
5 5
 \title{Return a screenshot of a current page in PNG format.}

+ 1
- 1
man/splash_press.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_press}
4 4
 \alias{splash_press}
5 5
 \title{Trigger mouse press event in web page.}

+ 1
- 1
man/splash_private_mode.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_private_mode}
4 4
 \alias{splash_private_mode}
5 5
 \title{Enable or disable execution of JavaSript code embedded in the page.}

+ 1
- 1
man/splash_release.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_release}
4 4
 \alias{splash_release}
5 5
 \title{Trigger mouse release event in web page.}

+ 1
- 1
man/splash_response_body.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_response_body}
4 4
 \alias{splash_response_body}
5 5
 \title{Enable or disable response content tracking.}

+ 1
- 1
man/splash_send_keys.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_send_keys}
4 4
 \alias{splash_send_keys}
5 5
 \title{Send keyboard events to page context.}

+ 1
- 1
man/splash_send_text.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_send_text}
4 4
 \alias{splash_send_text}
5 5
 \title{Send text as input to page context, literally, character by character.}

+ 1
- 1
man/splash_user_agent.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r, R/user-agents.R
2
+% Please edit documentation in R/dsl.R, R/user-agents.R
3 3
 \docType{data}
4 4
 \name{splash_user_agent}
5 5
 \alias{splash_user_agent}

+ 1
- 1
man/splash_version.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/splashr.r
2
+% Please edit documentation in R/splashr.R
3 3
 \name{splash_version}
4 4
 \alias{splash_version}
5 5
 \title{Get Splash version information}

+ 1
- 1
man/splash_wait.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/dsl.r
2
+% Please edit documentation in R/dsl.R
3 3
 \name{splash_wait}
4 4
 \alias{splash_wait}
5 5
 \title{Wait for a period time}

+ 8
- 3
man/start_splash.Rd View File

@@ -1,16 +1,21 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/docker-splash.r
2
+% Please edit documentation in R/docker-splash.R
3 3
 \name{start_splash}
4 4
 \alias{start_splash}
5 5
 \title{Start a Splash server Docker container}
6 6
 \usage{
7
-start_splash(tag = "3.0")
7
+start_splash(tag = "3.2", container_name = "splashr", remove = FALSE)
8 8
 }
9 9
 \arguments{
10 10
 \item{tag}{Splash Docker image tag to start}
11
+
12
+\item{container_name}{naem for the container. Defaults to "`splashr`".}
13
+
14
+\item{remove}{remove the Splash container instance after it's stopped?
15
+Defaults to `FALSE`.}
11 16
 }
12 17
 \value{
13
-`docker` `container` object
18
+`stevedor` container object
14 19
 }
15 20
 \description{
16 21
 If using this in an automation context, you should consider adding a

+ 1
- 1
man/stop_splash.Rd View File

@@ -1,5 +1,5 @@
1 1
 % Generated by roxygen2: do not edit by hand
2
-% Please edit documentation in R/docker-splash.r
2
+% Please edit documentation in R/docker-splash.R
3 3
 \name{stop_splash}
4 4
 \alias{stop_splash}
5 5
 \title{Stop a running a Splash server Docker container}

Loading…
Cancel
Save