Skip to contents

This fuction will extract the resources that exist and are listed in the config file.

Usage

get_dropdown(path = ".", folder, trim = TRUE)

get_episodes(path = ".", trim = TRUE)

get_learners(path = ".", trim = TRUE)

get_instructors(path = ".", trim = TRUE)

get_profiles(path = ".", trim = TRUE)

Arguments

path

the path to the lesson, defaults to the current working directory

folder

the folder to extract fromt he dropdown menues

trim

if TRUE (default), only the file name will be presented. When FALSE, the full path will be prepended.

Value

a character vector of episodes in order of presentation

Examples

tmp <- tempfile()
create_lesson(tmp)
#> → Creating Lesson in /tmp/RtmpIi5aiy/file171e52a58e34...
#>  No schedule set, using Rmd files in episodes/ directory.
#> → Creating Lesson in /tmp/RtmpIi5aiy/file171e52a58e34...

#> To remove this message, define your schedule in config.yaml or use `set_episodes()` to generate it.
#> → Creating Lesson in /tmp/RtmpIi5aiy/file171e52a58e34...

#> ────────────────────────────────────────────────────────────────────────
#> → Creating Lesson in /tmp/RtmpIi5aiy/file171e52a58e34...

#>  To save this configuration, use
#> 
#> set_episodes(path = path, order = ep, write = TRUE)
#> → Creating Lesson in /tmp/RtmpIi5aiy/file171e52a58e34...

#>  First episode created in /tmp/RtmpIi5aiy/file171e52a58e34/episodes/introduction.Rmd
#> → Creating Lesson in /tmp/RtmpIi5aiy/file171e52a58e34...

#>  Workflows up-to-date!
#> → Creating Lesson in /tmp/RtmpIi5aiy/file171e52a58e34...

#>  Consent to use package cache provided
#> → Creating Lesson in /tmp/RtmpIi5aiy/file171e52a58e34...

#> → Searching for and installing available dependencies
#> * Discovering package dependencies ... Done!
#> The following packages were discovered:
#> 
#> # ~/work/_temp/Library ===============
#> - R6            2.5.1
#> - base64enc     0.1-3
#> - bslib         0.5.0
#> - cachem        1.0.8
#> - cli           3.6.1
#> - digest        0.6.32
#> - ellipsis      0.3.2
#> - evaluate      0.21
#> - fastmap       1.1.1
#> - fontawesome   0.5.1
#> - fs            1.6.2
#> - glue          1.6.2
#> - highr         0.10
#> - htmltools     0.5.5
#> - jquerylib     0.1.4
#> - jsonlite      1.8.7
#> - knitr         1.43
#> - lifecycle     1.0.3
#> - magrittr      2.0.3
#> - memoise       2.0.1
#> - mime          0.12
#> - rappdirs      0.3.3
#> - rlang         1.1.1
#> - rmarkdown     2.23
#> - sass          0.4.6
#> - stringi       1.7.12
#> - stringr       1.5.0
#> - tinytex       0.45
#> - vctrs         0.6.3
#> - xfun          0.39
#> - yaml          2.3.7
#> 
#> They will be copied into the project library.
#> 
#> * Copying packages into the project library ... Done!
#> * Hydrated 31 packages in 0.23 seconds.
#> → Recording changes in lockfile
#> The version of R recorded in the lockfile will be updated:
#> - R             [* -> 4.3.1]
#> 
#> The following package(s) will be updated in the lockfile:
#> 
#> # RSPM ===============================
#> - R6            [* -> 2.5.1]
#> - base64enc     [* -> 0.1-3]
#> - bslib         [* -> 0.5.0]
#> - cachem        [* -> 1.0.8]
#> - cli           [* -> 3.6.1]
#> - digest        [* -> 0.6.32]
#> - ellipsis      [* -> 0.3.2]
#> - evaluate      [* -> 0.21]
#> - fastmap       [* -> 1.1.1]
#> - fontawesome   [* -> 0.5.1]
#> - fs            [* -> 1.6.2]
#> - glue          [* -> 1.6.2]
#> - highr         [* -> 0.10]
#> - htmltools     [* -> 0.5.5]
#> - jquerylib     [* -> 0.1.4]
#> - jsonlite      [* -> 1.8.7]
#> - knitr         [* -> 1.43]
#> - lifecycle     [* -> 1.0.3]
#> - magrittr      [* -> 2.0.3]
#> - memoise       [* -> 2.0.1]
#> - mime          [* -> 0.12]
#> - rappdirs      [* -> 0.3.3]
#> - renv          [* -> 0.17.3]
#> - rlang         [* -> 1.1.1]
#> - rmarkdown     [* -> 2.23]
#> - sass          [* -> 0.4.6]
#> - stringi       [* -> 1.7.12]
#> - stringr       [* -> 1.5.0]
#> - tinytex       [* -> 0.45]
#> - vctrs         [* -> 0.6.3]
#> - xfun          [* -> 0.39]
#> - yaml          [* -> 2.3.7]
#> 
#> * Lockfile written to '/tmp/RtmpIi5aiy/file171e52a58e34/renv/profiles/lesson-requirements/renv.lock'.
#>  Lesson successfully created in /tmp/RtmpIi5aiy/file171e52a58e34
#> → Creating Lesson in /tmp/RtmpIi5aiy/file171e52a58e34...

#> /tmp/RtmpIi5aiy/file171e52a58e34
get_episodes(tmp)
#> [1] "introduction.Rmd"
get_learners(tmp) # information for learners
#> [1] "reference.md" "setup.md"