Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Dec 20, 2024
1 parent 37195cb commit 7205c38
Show file tree
Hide file tree
Showing 12 changed files with 196 additions and 9 deletions.
11 changes: 11 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export(check_quiz)
export(check_quiz_attributes)
export(check_quiz_question_attributes)
export(check_quizzes)
export(check_spelling)
export(check_urls)
export(clean_up)
export(convert_coursera_quizzes)
export(convert_quiz)
Expand All @@ -30,6 +32,7 @@ export(get_pages_url)
export(get_repo_info)
export(get_slide_id)
export(get_slide_page)
export(get_urls)
export(good_quiz_path)
export(gs_id_from_slide)
export(gs_png_download)
Expand All @@ -46,10 +49,12 @@ export(pptx_slide_text_df)
export(qrmd_files)
export(render_without_toc)
export(setup_ottr_template)
export(test_url)
export(unzip_pptx)
export(website_to_embed_leanpub)
export(xml_notes)
import(dplyr)
import(stringr)
importFrom(gitcreds,gitcreds_get)
importFrom(httr,GET)
importFrom(httr,accept_json)
Expand All @@ -64,7 +69,13 @@ importFrom(magrittr,"%>%")
importFrom(readr,write_tsv)
importFrom(rprojroot,find_root)
importFrom(rprojroot,has_dir)
importFrom(rvest,html_attr)
importFrom(rvest,html_nodes)
importFrom(rvest,read_html)
importFrom(spelling,spell_check_files)
importFrom(stringr,str_to_title)
importFrom(tidyr,separate)
importFrom(tidyr,unnest)
importFrom(utils,browseURL)
importFrom(utils,download.file)
importFrom(utils,installed.packages)
Expand Down
6 changes: 5 additions & 1 deletion R/spell_check.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@
#' @return A file will be saved that lists the broken URLs will be saved to the specified output_dir.
#' @export
#'
#' @importFrom magrittr
#' @importFrom magrittr %>%
#' @importFrom spelling spell_check_files
#' @importFrom rprojroot find_root has_dir
#' @importFrom tidyr unnest separate
#' @importFrom readr write_tsv
#'
#' @examples
#'
Expand Down
29 changes: 26 additions & 3 deletions R/url_check.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
#' @return A file will be saved that lists the broken URLs will be saved to the specified output_dir.
#' @export
#'
#' @importFrom magrittr
#' @importFrom magrittr %>%
#' @importFrom rprojroot find_root has_dir
#' @importFrom tidyr unnest separate
#' @importFrom readr write_tsv
#'
#' @examples
#'
Expand Down Expand Up @@ -102,7 +105,18 @@ check_urls <- function(path = ".",
#' @return a logical TRUE/FALSE for whether the URL is legitimate.
#' @export
#'
#' @importFrom magrittr
#' @importFrom magrittr %>%
#' @importFrom httr GET
#'
#' @examples /dontrun {
#'
#' # This should print out "failed"
#' test_url("https://notawebsiteaaaaaaa.com")
#'
#'
#' # This should print out "success"
#' test_url("https://github.com")
#' }
#'
test_url <- function(url, ignore_urls = "") {
if (url %in% ignore_urls) {
Expand Down Expand Up @@ -134,7 +148,16 @@ test_url <- function(url, ignore_urls = "") {
#' @return a data.frame of all the URLs identified in the given rmd/qmd/md file
#' @export
#'
#' @importFrom magrittr
#' @importFrom magrittr %>%
#' @importFrom rvest html_nodes read_html html_attr
#' @import stringr
#'
#' @examples
#'
#' # Add in a URL error
# writeLines("A URL error: https://notawebsiteaaaaaaa.com", "url_test_error.md")
#'
#' get_urls("url_test_error.md")
#'
get_urls <- function(file, ignore_urls = "") {
message(paste("##### Testing URLs from file:", file))
Expand Down
1 change: 0 additions & 1 deletion man/authorize.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/cache_secrets_folder.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/check_git_repo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions man/check_spelling.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions man/check_urls.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions man/get_urls.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion man/setup_ottr_template.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/supported_endpoints.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions man/test_url.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7205c38

Please sign in to comment.