generate_drawio: Generate a drawio document based on a template and metadata

Description Usage Arguments Details Author(s) Examples

View source: R/generate_drawio.R

Description

Your template must contains placeholders like (see: https://desk.draw.io/support/solutions/articles/16000051979-how-to-work-with-placeholders-). Placeholders must be activated for your objects (CTRL+M). This function will populate your placeholders based on the meta argument and the template file, and will export the resulting chart in a desired format.

Usage

1
2
generate_drawio(template, meta, output = NULL,
  drawio_path = "C:/Program Files/draw.io/draw.io.exe")

Arguments

template

The path to the drawio template

meta

A liste containing metadata

output

A path for the export file (allowed formats : png, jpg, svg, pdf)

drawio_path

The path to draw.io executable

Details

Draw.io desktop version is required to generate exports. It is assumed to be 'C:/Program Files/draw.io/draw.io.exe' but it can be changed with drawio_path argument

Author(s)

Jeremy Pasco

Examples

1
2
3
4
5
## Not run: 
meta <- list('color'='red', 'age'=75)
generate_drawio('path/to/template.drawio', meta, 'path/to/export.png')

## End(Not run)

MendelYev/rdrawio documentation built on Oct. 30, 2019, 9:26 p.m.