Skip to content

Commit 6d75a97

Browse files
committed
Reword the README.Rmd
1 parent 1ed209e commit 6d75a97

File tree

2 files changed

+68
-89
lines changed

2 files changed

+68
-89
lines changed

README.Rmd

Lines changed: 26 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,18 @@ knitr::opts_chunk$set(
2121

2222
The `peeky` package helps you extract, examine, and run the source code from Shiny
2323
applications that have been converted to run in the browser using [Shinylive][slexplain].
24-
It works with both standalone converted applications and [Quarto][quarto] documents
25-
containing converted Shiny components through the [quarto-shinylive][qsl] extension.
26-
This package supports both R and Python Shiny applications that have been
27-
converted to Shinylive.
24+
It works with both standalone applications and [Quarto][quarto] documents
25+
containing Shinylive components through the [quarto-shinylive][qsl] extension,
26+
supporting both R and Python Shiny applications.
2827

29-
## What is Shinylive?
28+
## About Shinylive
3029

31-
[Shinylive][slexplain] is groundbreaking technology that converts existing Shiny applications
32-
to run entirely in the web browser using [WebAssembly][wasm], eliminating the need for a
33-
hosted server. At its core, a Shinylive app is simply a converted
34-
Shiny application - the same application you'd normally run on a server, but
35-
transformed to execute directly in the user's browser through [webR][webr] for
36-
R applications or [Pyodide][pyodide] for Python applications.
30+
[Shinylive][slexplain] converts existing Shiny applications
31+
to run entirely in the web browser using [WebAssembly][wasm] versions of
32+
R ([webR][webr]) and Python ([Pyodide][pyodide]), eliminating the
33+
need for a computational server. This means all
34+
application files are accessible to users by design as they are downloaded
35+
to the user's browser when the application is loaded.
3736

3837
The Shinylive ecosystem consists of four main components:
3938

@@ -75,16 +74,14 @@ To use the package, load it into your R session:
7574
library(peeky)
7675
```
7776

78-
Inside the package, there are three main functions summarized in the table below:
77+
Inside the package, there are three main functions:
78+
79+
| Function | Description |
80+
|----------|-------------|
81+
| `peek_shinylive_app()` | Universal function that handles both standalone apps and Quarto docs |
82+
| `peek_standalone_shinylive_app()` | Specifically for standalone Shinylive applications |
83+
| `peek_quarto_shinylive_app()` | Specifically for Quarto documents with Shinylive components |
7984

80-
| Feature | `peek_shinylive_app()` | `peek_standalone_shinylive_app()` | `peek_quarto_shinylive_app()` |
81-
|---------|:---------------------:|:--------------------------------:|:-----------------------------:|
82-
| Handles standalone apps ||||
83-
| Handles Quarto docs ||||
84-
| Auto-detects type ||||
85-
| Multiple apps per page ||||
86-
| Custom output path ||||
87-
| Quarto format output ||||
8885

8986
### Extracting Shinylive Applications
9087

@@ -105,7 +102,7 @@ peeky::peek_quarto_shinylive_app("https://quarto-ext.github.io/shinylive/")
105102
```
106103

107104
By default, the extracted files will be placed in the current working directory
108-
under the `converted_apps` directory. Each application will be placed in a
105+
under the `converted_shiny_apps` directory. Each application will be placed in a
109106
subdirectory named `app_1`, `app_2`, etc. If we want to specify a different
110107
output directory, we can do so by providing the `output_path` argument. We
111108
can also specify the output format as `quarto` to extract the files into a
@@ -119,7 +116,7 @@ single Quarto document.
119116
peeky::peek_quarto_shinylive_app("https://quarto-ext.github.io/shinylive/", output_format = "quarto")
120117
```
121118

122-
We can switch to the `peek_shinylive_standalone_app()` function if we know that
119+
We can switch to the `peek_standalone_shinylive_app()` function if we know that
123120
the URL is a standalone Shinylive application. For example, if we take the
124121
example application used in the conversion tutorial from [an app.R to an R Shinylive app](https://github.com/coatless-tutorials/convert-shiny-app-r-shinylive)
125122
on GitHub, we get:
@@ -134,30 +131,24 @@ peeky::peek_standalone_shinylive_app("https://tutorials.thecoatlessprofessor.com
134131

135132
AGPL (>= 3)
136133

137-
## Notes
138-
139-
### Evolution from Previous Approaches
134+
## Evolution
140135

141136
This package represents a more refined and comprehensive approach compared to
142137
our [earlier tutorial][peeksl]
143138
that focused solely on standalone R Shinylive applications.
144139

145-
### Ethical Considerations
140+
## Ethical Considerations
146141

147-
This package is intended for educational purposes and to promote understanding
148-
of web application visibility. Users should:
142+
This package is for educational purposes. Users should:
149143

144+
- Use responsibly
150145
- Respect intellectual property rights
151-
- Use the tool responsibly
152-
- Understand that the ability to view source code doesn't imply permission to reuse it without proper attribution or licensing
153-
- Consider this knowledge when designing their own applications
146+
- Understand that viewable code doesn't imply permission to reuse
147+
- Consider this when designing their own applications
154148

155149
## Acknowledgements
156150

157-
We greatly appreciate and are inspired by the work of the Shinylive team.
158-
We also thank the [webR][webr] and [Pyodide][pyodide] teams for their
159-
contributions to the broader ecosystem of browser-based data science that makes
160-
tools like Shinylive possible.
151+
Thanks to the Shinylive team and the [webR](https://docs.r-wasm.org/webr/latest/) and [Pyodide](https://pyodide.org/en/stable/) teams for enabling browser-based data science.
161152

162153
[quarto]: https://quarto.org
163154
[slexplain]: https://shiny.posit.co/py/docs/shinylive.html

README.md

Lines changed: 42 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,21 @@
1111
The `peeky` package helps you extract, examine, and run the source code
1212
from Shiny applications that have been converted to run in the browser
1313
using [Shinylive](https://shiny.posit.co/py/docs/shinylive.html). It
14-
works with both standalone converted applications and
15-
[Quarto](https://quarto.org) documents containing converted Shiny
16-
components through the
17-
[quarto-shinylive](https://github.com/quarto-ext/shinylive) extension.
18-
This package supports both R and Python Shiny applications that have
19-
been converted to Shinylive.
20-
21-
## What is Shinylive?
22-
23-
[Shinylive](https://shiny.posit.co/py/docs/shinylive.html) is
24-
groundbreaking technology that converts existing Shiny applications to
25-
run entirely in the web browser using
26-
[WebAssembly](https://webassembly.org/), eliminating the need for a
27-
hosted server. At its core, a Shinylive app is simply a converted Shiny
28-
application - the same application you’d normally run on a server, but
29-
transformed to execute directly in the user’s browser through
30-
[webR](https://docs.r-wasm.org/webr/latest/) for R applications or
31-
[Pyodide](https://pyodide.org/en/stable/) for Python applications.
14+
works with both standalone applications and [Quarto](https://quarto.org)
15+
documents containing Shinylive components through the
16+
[quarto-shinylive](https://github.com/quarto-ext/shinylive) extension,
17+
supporting both R and Python Shiny applications.
18+
19+
## About Shinylive
20+
21+
[Shinylive](https://shiny.posit.co/py/docs/shinylive.html) converts
22+
existing Shiny applications to run entirely in the web browser using
23+
[WebAssembly](https://webassembly.org/) versions of R
24+
([webR](https://docs.r-wasm.org/webr/latest/)) and Python
25+
([Pyodide](https://pyodide.org/en/stable/)), eliminating the need for a
26+
computational server. This means all application files are accessible to
27+
users by design as they are downloaded to the user’s browser when the
28+
application is loaded.
3229

3330
The Shinylive ecosystem consists of four main components:
3431

@@ -77,17 +74,13 @@ To use the package, load it into your R session:
7774
library(peeky)
7875
```
7976

80-
Inside the package, there are three main functions summarized in the
81-
table below:
77+
Inside the package, there are three main functions:
8278

83-
| Feature | `peek_shinylive_app()` | `peek_standalone_shinylive_app()` | `peek_quarto_shinylive_app()` |
84-
|----|:--:|:--:|:--:|
85-
| Handles standalone apps ||||
86-
| Handles Quarto docs ||||
87-
| Auto-detects type ||||
88-
| Multiple apps per page ||||
89-
| Custom output path ||||
90-
| Quarto format output ||||
79+
| Function | Description |
80+
|----|----|
81+
| `peek_shinylive_app()` | Universal function that handles both standalone apps and Quarto docs |
82+
| `peek_standalone_shinylive_app()` | Specifically for standalone Shinylive applications |
83+
| `peek_quarto_shinylive_app()` | Specifically for Quarto documents with Shinylive components |
9184

9285
### Extracting Shinylive Applications
9386

@@ -101,13 +94,13 @@ peeky::peek_shinylive_app("https://quarto-ext.github.io/shinylive/")
10194
#>
10295
#> ── Shinylive Applications ──────────────────────────────────────────────────────
10396
#>
104-
#> ── Python Applications ──
97+
#> ── Shiny for Python Applications ──
10598
#>
10699
#> Run in Terminal:
107-
#> shiny run --reload --launch-browser "converted_shiny_app/app_1"
108-
#> shiny run --reload --launch-browser "converted_shiny_app/app_2"
109-
#> shiny run --reload --launch-browser "converted_shiny_app/app_3"
110-
#> shiny run --reload --launch-browser "converted_shiny_app/app_4"
100+
#> shiny run --reload --launch-browser "/Users/ronin/Documents/GitHub/r-pkg/peeky/converted_shiny_app/app_1/app.py"
101+
#> shiny run --reload --launch-browser "/Users/ronin/Documents/GitHub/r-pkg/peeky/converted_shiny_app/app_2/app.py"
102+
#> shiny run --reload --launch-browser "/Users/ronin/Documents/GitHub/r-pkg/peeky/converted_shiny_app/app_3/app.py"
103+
#> shiny run --reload --launch-browser "/Users/ronin/Documents/GitHub/r-pkg/peeky/converted_shiny_app/app_4/app.py"
111104
```
112105

113106
This would be equivalent to if we ran the following:
@@ -117,9 +110,9 @@ peeky::peek_quarto_shinylive_app("https://quarto-ext.github.io/shinylive/")
117110
```
118111

119112
By default, the extracted files will be placed in the current working
120-
directory under the `converted_apps` directory. Each application will be
121-
placed in a subdirectory named `app_1`, `app_2`, etc. If we want to
122-
specify a different output directory, we can do so by providing the
113+
directory under the `converted_shiny_apps` directory. Each application
114+
will be placed in a subdirectory named `app_1`, `app_2`, etc. If we want
115+
to specify a different output directory, we can do so by providing the
123116
`output_path` argument. We can also specify the output format as
124117
`quarto` to extract the files into a single Quarto document.
125118

@@ -143,7 +136,7 @@ peeky::peek_quarto_shinylive_app("https://quarto-ext.github.io/shinylive/", outp
143136
#> • Python applications: 4
144137
```
145138

146-
We can switch to the `peek_shinylive_standalone_app()` function if we
139+
We can switch to the `peek_standalone_shinylive_app()` function if we
147140
know that the URL is a standalone Shinylive application. For example, if
148141
we take the example application used in the conversion tutorial from [an
149142
app.R to an R Shinylive
@@ -156,7 +149,7 @@ peeky::peek_standalone_shinylive_app("https://tutorials.thecoatlessprofessor.com
156149
#> ── Standalone Shinylive Application ────────────────────────────────────────────
157150
#> Type: R Shiny
158151
#> Run in R:
159-
#> shiny::runApp("converted_shiny_app")
152+
#> shiny::runApp("/Users/ronin/Documents/GitHub/r-pkg/peeky/converted_shiny_app")
160153
#>
161154
#> ── Contents ──
162155
#>
@@ -167,37 +160,32 @@ peeky::peek_standalone_shinylive_app("https://tutorials.thecoatlessprofessor.com
167160
#>
168161
#> Total files: 2
169162
#>
170-
#> Location: 'converted_shiny_app'
163+
#> Location: '/Users/ronin/Documents/GitHub/r-pkg/peeky/converted_shiny_app'
171164
```
172165

173166
## License
174167

175168
AGPL (\>= 3)
176169

177-
## Notes
178-
179-
### Evolution from Previous Approaches
170+
## Evolution
180171

181172
This package represents a more refined and comprehensive approach
182173
compared to our [earlier
183174
tutorial](https://github.com/coatless-tutorials/peeking-at-an-r-shinylive-app-source-code)
184175
that focused solely on standalone R Shinylive applications.
185176

186-
### Ethical Considerations
177+
## Ethical Considerations
187178

188-
This package is intended for educational purposes and to promote
189-
understanding of web application visibility. Users should:
179+
This package is for educational purposes. Users should:
190180

181+
- Use responsibly
191182
- Respect intellectual property rights
192-
- Use the tool responsibly
193-
- Understand that the ability to view source code doesn’t imply
194-
permission to reuse it without proper attribution or licensing
195-
- Consider this knowledge when designing their own applications
183+
- Understand that viewable code doesn’t imply permission to reuse
184+
- Consider this when designing their own applications
196185

197186
## Acknowledgements
198187

199-
We greatly appreciate and are inspired by the work of the Shinylive
200-
team. We also thank the [webR](https://docs.r-wasm.org/webr/latest/) and
201-
[Pyodide](https://pyodide.org/en/stable/) teams for their contributions
202-
to the broader ecosystem of browser-based data science that makes tools
203-
like Shinylive possible.
188+
Thanks to the Shinylive team and the
189+
[webR](https://docs.r-wasm.org/webr/latest/) and
190+
[Pyodide](https://pyodide.org/en/stable/) teams for enabling
191+
browser-based data science.

0 commit comments

Comments
 (0)