Open Robinlovelace opened 4 years ago
Initial thoughts:
Broken URLs
files = list.files(".", pattern = "*.Rmd")
urls = suppressWarnings(system2("grep", c("-Eo \"(http|https)://[a-zA-Z0-9\\.\\+:/?=_-]*\"",
files[5]), stdout = TRUE))
for (url in urls) {
ping = try(httr::GET(url), silent = TRUE)
if (class(ping) == "try-error") {
cli::cat_bullet(glue::glue("{url}: {ping}"))
} else if (ping$status != 200) {
cli::cat_bullet(glue::glue("{url}: {ping$status}"))
}
}