Convert Website Course to Leanpub
website_to_embed_leanpub(
path = ".",
chapt_img_key = NULL,
render = NULL,
html_page = file.path(base_url, "index.html"),
base_url = NULL,
clean_up = TRUE,
default_img = NULL,
output_dir = "manuscript",
make_book_txt = FALSE,
quiz_dir = "quizzes",
run_quiz_checks = FALSE,
remove_resources_start = FALSE,
verbose = TRUE,
footer_text = ""
)
path to the bookdown or quarto course repository, must have a `_bookdown.yml` or `_quarto.yml` file
File path to a TSV whose contents are the chapter urls (`url`), the chapter titles (`chapt_title`), the file path to the image to be used for the chapter (`img_path`). Column names `url`, `chapt_title`, and `img_path` must be used. If no chapter title column supplied, the basename of the url will be used, If no image column supplied, default image used.
if `TRUE`, then [bookdown::render_book()] will be run on each Rmd.
The file path of the rendered index.html file
The base url of where the chapters are published – the url to provide to the iframe in Leanpub e.g. https://jhudatascience.org/OTTR_Template/coursera
Should the previous docs and manuscript folder be cleaned up?
A google slide link to the default image to be used for all chapters
output directory to put files. It should likely be relative to path
Should [ottrpal::course_to_book_txt()] be run to create a `Book.txt` in the output directory?
directory that contains the quiz .md files that should be checked and incorporated into the Book.txt file. If you don't have quizzes, set this to NULL
TRUE/FALSE run quiz checks
remove the word `resources/` at the front of any image path.
print diagnostic messages
Optionally can add a bit of text that will be added to the end of each file before the references section.
A directory of output files in a folder 'manuscript' for publishing on Leanpub.
if (FALSE) { # \dontrun{
ottrpal::website_to_embed_leanpub(
base_url = "https://jhudatascience.org/OTTR_Template/",
make_book_txt = TRUE,
quiz_dir = NULL
)
} # }