create_episode: Create an Episode from a template

View source: R/create_episode.R

create_episodeR Documentation

Create an Episode from a template

Description

These functions allow you to create an episode that will be added to the schedule.

Usage

create_episode(title, ext = "Rmd", make_prefix = FALSE, add = TRUE, path = ".")

create_episode_md(title, make_prefix = FALSE, add = TRUE, path = ".")

create_episode_rmd(title, make_prefix = FALSE, add = TRUE, path = ".")

draft_episode_md(title, make_prefix = FALSE, path = ".")

draft_episode_rmd(title, make_prefix = FALSE, path = ".")

Arguments

title

the title of the episode

ext

a character. If ext = "Rmd" (default), then the new episode will be an R Markdown episode. If ext = "md", then the new episode will be a markdown episode, which can not generate dynamic content.

make_prefix

a logical. When TRUE, the prefix for the file will be automatically determined by the files already present. When FALSE (default), it assumes no prefix is needed.

add

(logical or numeric) If numeric, it represents the position the episode should be added. If TRUE, the episode is added to the end of the schedule. If FALSE, the episode is added as a draft episode.

path

the path to the sandpaper lesson.

Examples

tmp <- tempfile()
create_lesson(tmp)
create_episode_md("getting-started", path = tmp)

zkamvar/sandpaper documentation built on Jan. 26, 2023, 1:35 a.m.