Browse Source

removed clipr

boB Rudis 2 years ago
parent
commit
36ce5660a6
No known key found for this signature in database

+ 6
- 6
DESCRIPTION View File

@@ -1,12 +1,13 @@
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.4.0
5
-Date: 2017-08-26
4
+Version: 0.4.1
5
+Date: 2018-01-16
6 6
 Encoding: UTF-8
7 7
 Authors@R: c(
8
-      person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"))
9
-    )
8
+    person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"), 
9
+           comment = c(ORCID = "0000-0001-5670-2640"))
10
+  )
10 11
 Maintainer: Bob Rudis <bob@rud.is>
11 12
 Description: 'Splash' <https://github.com/scrapinghub/splash> is a 'JavaScript' rendering service.
12 13
     It is a lightweight web browser with an 'HTTP' API, implemented in 'Python' using 'Twisted' 
@@ -32,7 +33,6 @@ Imports:
32 33
     xml2,
33 34
     curl,
34 35
     httr,
35
-    clipr,
36 36
     purrr,
37 37
     stats,
38 38
     utils,
@@ -45,5 +45,5 @@ Imports:
45 45
     jsonlite,
46 46
     HARtools,
47 47
     lubridate
48
-RoxygenNote: 6.0.1
48
+RoxygenNote: 6.0.1.9000
49 49
 VignetteBuilder: knitr

+ 0
- 1
NAMESPACE View File

@@ -92,7 +92,6 @@ importFrom(HARtools,HARviewer)
92 92
 importFrom(HARtools,HARviewerOutput)
93 93
 importFrom(HARtools,renderHARviewer)
94 94
 importFrom(HARtools,writeHAR)
95
-importFrom(clipr,read_clip)
96 95
 importFrom(curl,curl_unescape)
97 96
 importFrom(formatR,tidy_source)
98 97
 importFrom(jsonlite,fromJSON)

+ 4
- 0
NEWS.md View File

@@ -1,3 +1,7 @@
1
+0.4.1
2
+
3
+* removed clipr usage due to CRAN
4
+
1 5
 0.4.0
2 6
 
3 7
 * moved to 'docker' pacakge since it's on CRAN

+ 2
- 6
R/as_req.r View File

@@ -3,15 +3,13 @@
3 3
 #' This function is very useful if you used `splashr` to find XHR requests in a dynamic
4 4
 #' page and want to be able to make a call directly to that XHR resource. Once you
5 5
 #' identify the proper HAR entry, pass it to this function and fully working function
6
-#' that makes an `httr::VERB()` request will be created and returned. The text of the function
7
-#' will also be put onto the clipboad if `add_clip` is `TRUE``
6
+#' that makes an `httr::VERB()` request will be created and returned.
8 7
 #'
9 8
 #' @md
10 9
 #' @param entry HAR entry
11 10
 #' @param quiet quiet (no messages)
12
-#' @param add_clip add clip (paste the function text to the clipboard)
13 11
 #' @export
14
-as_httr_req <- function(entry, quiet=TRUE, add_clip=TRUE) {
12
+as_httr_req <- function(entry, quiet=TRUE) {
15 13
 
16 14
   req <- entry$request
17 15
 
@@ -82,8 +80,6 @@ as_httr_req <- function(entry, quiet=TRUE, add_clip=TRUE) {
82 80
   formatR::tidy_source(text=out, width.cutoff=30, indent=4, file=fil)
83 81
   tmp <- paste0(readLines(fil), collapse="\n")
84 82
 
85
-  if (add_clip) clipr::write_clip(tmp)
86
-
87 83
   if (!quiet) cat(tmp, "\n")
88 84
 
89 85
   # make a bona fide R function

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

@@ -20,7 +20,6 @@
20 20
 #' @importFrom xml2 read_html url_parse
21 21
 #' @importFrom jsonlite fromJSON unbox stream_in
22 22
 #' @importFrom openssl base64_decode
23
-#' @importFrom clipr read_clip
24 23
 #' @importFrom lubridate ymd_hms
25 24
 #' @importFrom scales comma
26 25
 #' @importFrom stats setNames

+ 6
- 44
cran-comments.md View File

@@ -1,8 +1,8 @@
1 1
 ## Test environments
2 2
 
3
-* local OS X install, R 3.4.1 on both 10.12 and 10.13 Beta 6
4
-* local ubuntu 3.4.1 and r-devel
5
-* ubuntu on travis-ci, R oldrel, 3.4.1 and r-devel
3
+* local OS X install, R 3.4.3 on both 10.12 and 10.13.2
4
+* local ubuntu 3.4.2 and r-devel
5
+* ubuntu on travis-ci, R oldrel, current and r-devel
6 6
 * win-builder (devel and release)
7 7
 
8 8
 ## R CMD check results
@@ -17,45 +17,7 @@ This is a new release, so there are no reverse dependencies.
17 17
 
18 18
 ---
19 19
 
20
-Hey folks,
20
+Submitting patch due to CRAN note.
21 21
 
22
-The tests skip on CRAN and the examples are \dontrun{} because
23
-they require an active Splash server running for the most 
24
-accurate results (mocking would not exercise the interaction with
25
-the Splash API server). The core functionality is much the same
26
-as RSelenium, but Splash is more designed for scraping
27
-than Selenium which is more geared towards web site automated
28
-testing. This will hopefully be a nice addition to the R web
29
-scraping world.
30
-
31
-It is fully tested on Travis: https://travis-ci.org/hrbrmstr/splashr
32
-with 2 different Python configurations across all three R versions. 
33
-It's an active test that spins up a local Docker container and runs
34
-on push and weekly. (It imports the 'docker' package, hence my
35
-mentioning the diverse python configs).
36
-
37
-Neither Appveyor (and, all other free Windows CI systems) nor
38
-rhub nor WinBuilder support co-runbninbg Docker linux containers 
39
-so the tests are not run there, but the package is built regularly 
40
-on WinBuilder and rhub's Windows and "CRAN" environments to 
41
-catch any other platform-related package errors.
42
-
43
-There are many Imports because this works with a diverse amount
44
-of web content and also tries to play well with 'httr' and 'rvest'
45
-as well as the 'hartools' package.
46
-
47
-There are three vignettes and I tried to reduce the image sizes
48
-for the figures in them as much as possible. I'll glady do some 
49
-cropping if you would like the total size to be even smaller. I 
50
-fully understand wanting to keep pacakges as small as possible.
51
-
52
-The package is also well-documented and has 44% code coverage:
53
-https://codecov.io/gh/hrbrmstr/splashr/tree/master/R
54
-I'm going to get that up closer to 80% for the next release which will 
55
-extend the "DSL" functions.
56
-
57
-Thx for your time & efforts!
58
-
59
--boB
60
-
61
-P.S. Hope you folks had a great summer!
22
+Removed clipboard functionality since that was the path of 
23
+least resistance. 

+ 2
- 5
man/as_httr_req.Rd View File

@@ -4,19 +4,16 @@
4 4
 \alias{as_httr_req}
5 5
 \title{Create an httr verb request function from an HAR request}
6 6
 \usage{
7
-as_httr_req(entry, quiet = TRUE, add_clip = TRUE)
7
+as_httr_req(entry, quiet = TRUE)
8 8
 }
9 9
 \arguments{
10 10
 \item{entry}{HAR entry}
11 11
 
12 12
 \item{quiet}{quiet (no messages)}
13
-
14
-\item{add_clip}{add clip (paste the function text to the clipboard)}
15 13
 }
16 14
 \description{
17 15
 This function is very useful if you used \code{splashr} to find XHR requests in a dynamic
18 16
 page and want to be able to make a call directly to that XHR resource. Once you
19 17
 identify the proper HAR entry, pass it to this function and fully working function
20
-that makes an \code{httr::VERB()} request will be created and returned. The text of the function
21
-will also be put onto the clipboad if \code{add_clip} is `TRUE``
18
+that makes an \code{httr::VERB()} request will be created and returned.
22 19
 }

+ 1
- 0
man/execute_lua.Rd View File

@@ -58,3 +58,4 @@ Other splash_renderers: \code{\link{render_har}},
58 58
   \code{\link{render_html}}, \code{\link{render_jpeg}},
59 59
   \code{\link{render_json}}, \code{\link{render_png}}
60 60
 }
61
+\concept{splash_renderers}

+ 1
- 0
man/get_content_size.Rd View File

@@ -26,3 +26,4 @@ Other splash_har_helpers: \code{\link{get_content_type}},
26 26
   \code{\link{get_response_body}},
27 27
   \code{\link{har_entry_count}}
28 28
 }
29
+\concept{splash_har_helpers}

+ 1
- 0
man/get_content_type.Rd View File

@@ -61,3 +61,4 @@ Other splash_har_helpers: \code{\link{get_content_size}},
61 61
   \code{\link{get_response_body}},
62 62
   \code{\link{har_entry_count}}
63 63
 }
64
+\concept{splash_har_helpers}

+ 1
- 0
man/get_har_entry.Rd View File

@@ -22,3 +22,4 @@ Other splash_har_helpers: \code{\link{get_content_size}},
22 22
   \code{\link{get_response_body}},
23 23
   \code{\link{har_entry_count}}
24 24
 }
25
+\concept{splash_har_helpers}

+ 1
- 0
man/get_request_type.Rd View File

@@ -26,3 +26,4 @@ Other splash_har_helpers: \code{\link{get_content_size}},
26 26
   \code{\link{get_response_body}},
27 27
   \code{\link{har_entry_count}}
28 28
 }
29
+\concept{splash_har_helpers}

+ 1
- 0
man/get_request_url.Rd View File

@@ -20,3 +20,4 @@ Other splash_har_helpers: \code{\link{get_content_size}},
20 20
   \code{\link{get_response_body}},
21 21
   \code{\link{har_entry_count}}
22 22
 }
23
+\concept{splash_har_helpers}

+ 1
- 0
man/get_response_body.Rd View File

@@ -26,3 +26,4 @@ Other splash_har_helpers: \code{\link{get_content_size}},
26 26
   \code{\link{get_request_url}},
27 27
   \code{\link{har_entry_count}}
28 28
 }
29
+\concept{splash_har_helpers}

+ 1
- 0
man/har_entry_count.Rd View File

@@ -20,3 +20,4 @@ Other splash_har_helpers: \code{\link{get_content_size}},
20 20
   \code{\link{get_request_url}},
21 21
   \code{\link{get_response_body}}
22 22
 }
23
+\concept{splash_har_helpers}

+ 1
- 0
man/install_splash.Rd View File

@@ -23,3 +23,4 @@ stop_splash(splash_container)
23 23
 Other splash_docker_helpers: \code{\link{start_splash}},
24 24
   \code{\link{stop_splash}}
25 25
 }
26
+\concept{splash_docker_helpers}

+ 1
- 0
man/render_har.Rd View File

@@ -77,3 +77,4 @@ Other splash_renderers: \code{\link{execute_lua}},
77 77
   \code{\link{render_html}}, \code{\link{render_jpeg}},
78 78
   \code{\link{render_json}}, \code{\link{render_png}}
79 79
 }
80
+\concept{splash_renderers}

+ 1
- 0
man/render_html.Rd View File

@@ -78,3 +78,4 @@ Other splash_renderers: \code{\link{execute_lua}},
78 78
   \code{\link{render_har}}, \code{\link{render_jpeg}},
79 79
   \code{\link{render_json}}, \code{\link{render_png}}
80 80
 }
81
+\concept{splash_renderers}

+ 1
- 0
man/render_jpeg.Rd View File

@@ -82,3 +82,4 @@ Other splash_renderers: \code{\link{execute_lua}},
82 82
   \code{\link{render_har}}, \code{\link{render_html}},
83 83
   \code{\link{render_json}}, \code{\link{render_png}}
84 84
 }
85
+\concept{splash_renderers}

+ 1
- 0
man/render_json.Rd View File

@@ -114,3 +114,4 @@ Other splash_renderers: \code{\link{execute_lua}},
114 114
   \code{\link{render_har}}, \code{\link{render_html}},
115 115
   \code{\link{render_jpeg}}, \code{\link{render_png}}
116 116
 }
117
+\concept{splash_renderers}

+ 1
- 0
man/render_png.Rd View File

@@ -83,3 +83,4 @@ Other splash_renderers: \code{\link{execute_lua}},
83 83
   \code{\link{render_har}}, \code{\link{render_html}},
84 84
   \code{\link{render_jpeg}}, \code{\link{render_json}}
85 85
 }
86
+\concept{splash_renderers}

+ 1
- 0
man/splash_active.Rd View File

@@ -27,3 +27,4 @@ Other splash_info_functions: \code{\link{splash_debug}},
27 27
   \code{\link{splash_perf_stats}},
28 28
   \code{\link{splash_version}}
29 29
 }
30
+\concept{splash_info_functions}

+ 1
- 0
man/splash_add_lua.Rd View File

@@ -35,3 +35,4 @@ Other splash_dsl_functions: \code{\link{splash_click}},
35 35
   \code{\link{splash_send_keys}},
36 36
   \code{\link{splash_send_text}}, \code{\link{splash_wait}}
37 37
 }
38
+\concept{splash_dsl_functions}

+ 1
- 0
man/splash_click.Rd View File

@@ -23,3 +23,4 @@ Other splash_dsl_functions: \code{\link{splash_add_lua}},
23 23
   \code{\link{splash_send_keys}},
24 24
   \code{\link{splash_send_text}}, \code{\link{splash_wait}}
25 25
 }
26
+\concept{splash_dsl_functions}

+ 1
- 0
man/splash_debug.Rd View File

@@ -27,4 +27,5 @@ Other splash_info_functions: \code{\link{splash_active}},
27 27
   \code{\link{splash_perf_stats}},
28 28
   \code{\link{splash_version}}
29 29
 }
30
+\concept{splash_info_functions}
30 31
 \keyword{internal}

+ 1
- 0
man/splash_enable_javascript.Rd View File

@@ -32,3 +32,4 @@ Other splash_dsl_attributes: \code{\link{splash_images}},
32 32
   \code{\link{splash_private_mode}},
33 33
   \code{\link{splash_response_body}}
34 34
 }
35
+\concept{splash_dsl_attributes}

+ 1
- 0
man/splash_focus.Rd View File

@@ -26,3 +26,4 @@ Other splash_dsl_functions: \code{\link{splash_add_lua}},
26 26
   \code{\link{splash_send_keys}},
27 27
   \code{\link{splash_send_text}}, \code{\link{splash_wait}}
28 28
 }
29
+\concept{splash_dsl_functions}

+ 1
- 0
man/splash_go.Rd View File

@@ -34,3 +34,4 @@ Other splash_dsl_functions: \code{\link{splash_add_lua}},
34 34
   \code{\link{splash_send_keys}},
35 35
   \code{\link{splash_send_text}}, \code{\link{splash_wait}}
36 36
 }
37
+\concept{splash_dsl_functions}

+ 1
- 0
man/splash_har.Rd View File

@@ -32,3 +32,4 @@ Other splash_dsl_functions: \code{\link{splash_add_lua}},
32 32
   \code{\link{splash_send_keys}},
33 33
   \code{\link{splash_send_text}}, \code{\link{splash_wait}}
34 34
 }
35
+\concept{splash_dsl_functions}

+ 1
- 0
man/splash_har_reset.Rd View File

@@ -21,3 +21,4 @@ Other splash_dsl_functions: \code{\link{splash_add_lua}},
21 21
   \code{\link{splash_send_keys}},
22 22
   \code{\link{splash_send_text}}, \code{\link{splash_wait}}
23 23
 }
24
+\concept{splash_dsl_functions}

+ 1
- 0
man/splash_history.Rd View File

@@ -24,3 +24,4 @@ Other splash_info_functions: \code{\link{splash_active}},
24 24
   \code{\link{splash_perf_stats}},
25 25
   \code{\link{splash_version}}
26 26
 }
27
+\concept{splash_info_functions}

+ 1
- 0
man/splash_html.Rd View File

@@ -34,3 +34,4 @@ Other splash_dsl_functions: \code{\link{splash_add_lua}},
34 34
   \code{\link{splash_send_keys}},
35 35
   \code{\link{splash_send_text}}, \code{\link{splash_wait}}
36 36
 }
37
+\concept{splash_dsl_functions}

+ 1
- 0
man/splash_images.Rd View File

@@ -33,3 +33,4 @@ Other splash_dsl_attributes: \code{\link{splash_enable_javascript}},
33 33
   \code{\link{splash_private_mode}},
34 34
   \code{\link{splash_response_body}}
35 35
 }
36
+\concept{splash_dsl_attributes}

+ 1
- 0
man/splash_perf_stats.Rd View File

@@ -23,3 +23,4 @@ Other splash_info_functions: \code{\link{splash_active}},
23 23
   \code{\link{splash_debug}}, \code{\link{splash_history}},
24 24
   \code{\link{splash_version}}
25 25
 }
26
+\concept{splash_info_functions}

+ 1
- 0
man/splash_plugins.Rd View File

@@ -30,3 +30,4 @@ Other splash_dsl_attributes: \code{\link{splash_enable_javascript}},
30 30
   \code{\link{splash_private_mode}},
31 31
   \code{\link{splash_response_body}}
32 32
 }
33
+\concept{splash_dsl_attributes}

+ 1
- 0
man/splash_png.Rd View File

@@ -34,3 +34,4 @@ Other splash_dsl_functions: \code{\link{splash_add_lua}},
34 34
   \code{\link{splash_send_keys}},
35 35
   \code{\link{splash_send_text}}, \code{\link{splash_wait}}
36 36
 }
37
+\concept{splash_dsl_functions}

+ 1
- 0
man/splash_press.Rd View File

@@ -23,3 +23,4 @@ Other splash_dsl_functions: \code{\link{splash_add_lua}},
23 23
   \code{\link{splash_send_keys}},
24 24
   \code{\link{splash_send_text}}, \code{\link{splash_wait}}
25 25
 }
26
+\concept{splash_dsl_functions}

+ 1
- 0
man/splash_private_mode.Rd View File

@@ -33,3 +33,4 @@ Other splash_dsl_attributes: \code{\link{splash_enable_javascript}},
33 33
   \code{\link{splash_plugins}},
34 34
   \code{\link{splash_response_body}}
35 35
 }
36
+\concept{splash_dsl_attributes}

+ 1
- 0
man/splash_release.Rd View File

@@ -23,3 +23,4 @@ Other splash_dsl_functions: \code{\link{splash_add_lua}},
23 23
   \code{\link{splash_send_keys}},
24 24
   \code{\link{splash_send_text}}, \code{\link{splash_wait}}
25 25
 }
26
+\concept{splash_dsl_functions}

+ 1
- 0
man/splash_response_body.Rd View File

@@ -30,3 +30,4 @@ Other splash_dsl_attributes: \code{\link{splash_enable_javascript}},
30 30
   \code{\link{splash_plugins}},
31 31
   \code{\link{splash_private_mode}}
32 32
 }
33
+\concept{splash_dsl_attributes}

+ 1
- 0
man/splash_send_keys.Rd View File

@@ -32,3 +32,4 @@ Other splash_dsl_functions: \code{\link{splash_add_lua}},
32 32
   \code{\link{splash_release}},
33 33
   \code{\link{splash_send_text}}, \code{\link{splash_wait}}
34 34
 }
35
+\concept{splash_dsl_functions}

+ 1
- 0
man/splash_send_text.Rd View File

@@ -29,3 +29,4 @@ Other splash_dsl_functions: \code{\link{splash_add_lua}},
29 29
   \code{\link{splash_release}},
30 30
   \code{\link{splash_send_keys}}, \code{\link{splash_wait}}
31 31
 }
32
+\concept{splash_dsl_functions}

+ 1
- 0
man/splash_user_agent.Rd View File

@@ -67,4 +67,5 @@ splash_local \%>\%
67 67
   jsonlite::fromJSON()
68 68
 }
69 69
 }
70
+\concept{splash_dsl_functions_functions}
70 71
 \keyword{datasets}

+ 1
- 0
man/splash_version.Rd View File

@@ -23,3 +23,4 @@ Other splash_info_functions: \code{\link{splash_active}},
23 23
   \code{\link{splash_debug}}, \code{\link{splash_history}},
24 24
   \code{\link{splash_perf_stats}}
25 25
 }
26
+\concept{splash_info_functions}

+ 1
- 0
man/splash_wait.Rd View File

@@ -34,3 +34,4 @@ Other splash_dsl_functions: \code{\link{splash_add_lua}},
34 34
   \code{\link{splash_send_keys}},
35 35
   \code{\link{splash_send_text}}
36 36
 }
37
+\concept{splash_dsl_functions}

+ 1
- 0
man/start_splash.Rd View File

@@ -33,3 +33,4 @@ stop_splash(splash_container)
33 33
 Other splash_docker_helpers: \code{\link{install_splash}},
34 34
   \code{\link{stop_splash}}
35 35
 }
36
+\concept{splash_docker_helpers}

+ 1
- 0
man/stop_splash.Rd View File

@@ -28,3 +28,4 @@ stop_splash(splash_container)
28 28
 Other splash_docker_helpers: \code{\link{install_splash}},
29 29
   \code{\link{start_splash}}
30 30
 }
31
+\concept{splash_docker_helpers}

+ 1
- 1
vignettes/intro_to_splashr.Rmd View File

@@ -269,7 +269,7 @@ req() %>%
269 269
 ## Output is the same as previous block
270 270
 ```
271 271
 
272
-The text of the function is also put on the clipboard by default, so you can paste it right into a script or package for use later on:
272
+This is an example of the built `httr` function:
273 273
 
274 274
 ```
275 275
 httr::VERB(verb = "GET", url = "https://analytics.usa.gov/data/live/devices.json", 

Loading…
Cancel
Save