An open API service indexing awesome lists of open source software.

https://github.com/thinkr-open/shinidraw


https://github.com/thinkr-open/shinidraw

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```

# shinidraw

[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![R-CMD-check](https://github.com/ColinFay/shinidraw/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ColinFay/shinidraw/actions/workflows/R-CMD-check.yaml)

The goal of `{shinidraw}` is to bring the amazing [Exaclidraw](https://excalidraw.com/) to your R console.

⚠️ WORK IN PROGRESS ⚠️

## Installation

You can install the development version of `{shinidraw}` like so:

``` r
pak::pak("thinkr-open/shinidraw")
```

## Why?

Excalidraw is awesome, and we've been using it for prototyping `{shiny}` apps for a while now.
So what is missing, and what does `{shinidraw}` bring to the table?

### Projects

When used in the browser, Excalidraw saves your drawings in your browser's local storage, and you can export and save locally.

When using `{shinidraw}`, you'll have a built-in project system, where the `.excalidraw` files are stored on the machine running the app.

If you develop in an existing project, `{shinidraw}` will load the latest version of the `.excalidraw` file.

Here are the commands you can use to manage your projects:

```r
library(shinidraw)

# Create an empty, temp file (will not be saved)
excalidraw()

# This will create a new project
excalidraw_new_project()

# This will open an existing project
excalidraw_open_project("rr-2023")

# Simply open a file
(file <- excalidraw_helloworld())
excalidraw_open_file(
file
)
```

Note that the first time you launch `{shinidraw}`, it will prompt for your consent to store data on your computer.

### Auto saving

The app will auto-save your drawings at a given interval, so you don't have to worry about losing your work.

## About

You're reading the doc about version: `r pkgload::pkg_version()`

This README has been compiled on the

```{r}
Sys.time()
```

Here are the test & coverage results:

```{r}
devtools::check(quiet = TRUE)
```

```{r echo = FALSE}
unloadNamespace("shinidraw")
```

```{r}
covr::package_coverage()
```

## Code of Conduct

Please note that the shinidraw project is released with a [Contributor Code of Conduct](https://contributor-covenant.org/version/2/1/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.