MyNixOS website logo
Description

Companion Tools for Open-Source Tools for Training Resources (OTTR).

Tools for converting Open-Source Tools for Training Resources (OTTR) courses into Leanpub or Coursera courses. 'ottrpal' is for use with the OTTR Template repository to create courses.

R-CMD-check CRAN status Downloads Lifecycle: stable

Intro to ottrpal package

ottrpal converts an OTTR course (Open-source Tools for Training Resources) into a files ready for upload to Massive Open Online Courses (MOOCs): Coursera and Leanpub.

Using the example repository:

If you'd like to use our example repository you can fork it on Github and clone it to your own computer Follow these instructions to fork and then you can clone it using a command like:

git clone https://github.com/{organization}/OTTR_Quizzes.git

But replace {organization} with the location of your forked repository.

Installing ottrpal:

You can install ottrpal from GitHub with:

install.packages("ottrpal")

If you want the development version (not advised) you can install using the remotes pacakge to install from GitHub.

if (!("remotes" %in% installed.packages())) {
  install.packages("remotes")
}
remotes::install_github("jhudsl/ottrpal")

Running ottrpal

The ottrpal package converts your files using one of these main functions:

ottrpal::bookdown_to_embed_leanpub()

By default, ottrpal will re-run a bookdown::render_book("index.Rmd") rendering of your chapters first before converting the files to the Leanpub ready format. However, if you wish to skip this step, you can set render = FALSE when running the ottrpal::bookdown_to_embed_leanpub() function.

About the Book.txt file:

Leanpub requires a Book.txt file to know what order the chapters/quizzes should be published.

By default, your Book.txt file will not be autogenerated but ottrpal will look in your given directory for an existing Book.txt file which it will copy over to the output directory.

You can create a Book.txt file manually, or if your quizzes and chapters are numbered, ottrpal can create the Book.txt file based on the numbers going from low to high and quizzes following chapters of the same number. (e.g. quiz_03.md will be placed after 03-some_chapter_file.Rmd).

To have ottrpal attempt to autogenerate this file, set make_book_txt to TRUE.

ottrpal::bookdown_to_embed_leanpub(make_book_txt = TRUE)

If no Book.txt file is found and make_book_txt is set to FALSE (this is the default setting), ottrpal will fail.

A ottrpal autogenerated Book.txt file might look something like this:

index.Rmd
01-chapter.Rmd
quiz_1.md
02-chapter.Rmd
quiz_2.md
about.Rmd

Also note that any index.Rmd will always be placed first and any about.Rmd file will be placed last.

Setting up quizzes:

By default, ottrpal will look for a folder called quizzes/ to find your quiz .md files. If your quizzes are located somewhere else, you will need to use the quiz_dir argument to specify that:

ottrpal::bookdown_to_embed_leanpub(quiz_dir = "some_directory")

About the output files

Leanpub's Github writing mode will look for a directory called manuscript to publish from. You should not edit the files in manuscript/ by hand since a re-run of ottrpal will cause your changes to be overwritten.

Adding footer text:

If there is text you would like added to the end of each chapter (like a link to a feedback survey for example), you can supply a character string to the footer_textargument in the main ottrpal::bookdown_to_leanpub() function.

# Set up a character string
survey_link <- "Please provide any feedback you have by filing a GitHub issue [here](https://github.com/jhudsl/OTTR_Template/issues)"

# Supply the footer text in the main function
ottrpal::bookdown_to_embed_leanpub(footer_text = survey_link)
Metadata

Version

1.2.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows