#' @param file_path Absolute path to a filename on the local host. **This only works with a locally running Splash instance started with [start_splash]().**
#' @param output either `html` or `png` to get the page content or an image capture
#' @param viewport View width and height (in pixels) of the browser viewport to render the web page. Format is "`<width>x<height>`". e.g. 800x600. Default value is 1024x768.
#' @param ... other params to [render_html]() or [render_png]()
@ -39,6 +39,7 @@ All you need for this package to work is a running Splash instance. You provide
The following functions are implemented:
- `render_html`: Return the HTML of the javascript-rendered page.
- `render_file`: Return the HTML or image (png) of the javascript-rendered page in a local file
- `render_har`: Return information about Splash interaction with a website in [HAR](http://www.softwareishard.com/blog/har-12-spec/) format.
- `render_jpeg`: Return a image (in JPEG format) of the javascript-rendered page.
- `render_png`: Return a image (in PNG format) of the javascript-rendered page.
@ -54,6 +55,7 @@ Some functions from `HARtools` are imported/exported and `%>%` is imported/expor
Suggest more in a feature req!
- <strike>Implement `render.json`</strike>
- <strike>Implement "file rendering"</strike>
- Implement `execute` (you can script Splash!)
- <strike>Add integration with [`HARtools`](https://github.com/johndharrison/HARtools)</strike>
- <strike>_Possibly_ writing R function wrappers to install/start/stop Splash</strike> which would also support enabling javascript profiles, request filters and proxy profiles from with R directly, using [`harbor`](https://github.com/wch/harbor)
@ -36,6 +36,7 @@ All you need for this package to work is a running Splash instance. You provide
The following functions are implemented:
- `render_html`: Return the HTML of the javascript-rendered page.
- `render_file`: Return the HTML or image (png) of the javascript-rendered page in a local file
- `render_har`: Return information about Splash interaction with a website in [HAR](http://www.softwareishard.com/blog/har-12-spec/) format.
- `render_jpeg`: Return a image (in JPEG format) of the javascript-rendered page.
- `render_png`: Return a image (in PNG format) of the javascript-rendered page.
@ -51,6 +52,7 @@ Some functions from `HARtools` are imported/exported and `%>%` is imported/expor
Suggest more in a feature req!
- <strike>Implement `render.json`</strike>
- <strike>Implement "file rendering"</strike>
- Implement `execute` (you can script Splash!)
- <strike>Add integration with [`HARtools`](https://github.com/johndharrison/HARtools)</strike>
- <strike>*Possibly* writing R function wrappers to install/start/stop Splash</strike> which would also support enabling javascript profiles, request filters and proxy profiles from with R directly, using [`harbor`](https://github.com/wch/harbor)
@ -74,6 +76,8 @@ library(magick)
library(rvest)
library(anytime)
library(hrbrmisc) # github
library(htmlwidgets)
library(DiagrammeR)
library(tidyverse)
# current verison
@ -87,7 +91,7 @@ splash("splash", 8050L) %>%
splash_active()
```
## Status of splash instance on [http://splash:8050]: ok. Max RSS: 412110848
## Status of splash instance on [http://splash:8050]: ok. Max RSS: 462295040
You can use [`HARtools::HARviewer`](https://github.com/johndharrison/HARtools/blob/master/R/HARviewer.R) — which this pkg import/exports — to get view the HAR in an interactive HTML widget.
\item{output}{either \code{html} or \code{png} to get the page content or an image capture}
\item{viewport}{View width and height (in pixels) of the browser viewport to render the web page. Format is "\code{<width>x<height>}". e.g. 800x600. Default value is 1024x768.}
\item{...}{other params to \url{render_html} or \url{render_png}}