Skip to content

Commit 72ce37c

Browse files
committed
New URL (and DOI) checker
1 parent 569dae7 commit 72ce37c

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2026-01-08 Dirk Eddelbuettel <edd@debian.org>
2+
3+
* inst/examples/checkPackageURLs.r: New script to check URLs (and DOIs)
4+
15
2026-01-04 Dirk Eddelbuettel <edd@debian.org>
26

37
* .github/workflows/ci.yaml: Switch to actions/checkout@v6

inst/examples/checkPackageURLs.r

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env r
2+
##
3+
## A wrapper for tools::check_package_url (and check_package_dois)
4+
##
5+
## Copyright (C) 2025 - present Dirk Eddelbuettel
6+
##
7+
## Released under GPL (>= 2)
8+
9+
## load docopt package from CRAN
10+
library(docopt)
11+
12+
doc <- "Usage: checkPackageUrls.r [-s] [-v] [-h] [DIRS ...]
13+
14+
-s --skip-dois do not run 'check_package_dois()' as well [default: FALSE]
15+
-v --verbose run in verbose mode mode [default: FALSE]
16+
-h --help show this help text
17+
18+
Simple wrapper to 'tools::check_package_urls(...)'.
19+
"
20+
21+
opt <- docopt(doc)
22+
23+
if (length(opt$DIRS) == 0) opt$DIRS <- "." # default argument current directory
24+
25+
for (d in opt$DIRS) {
26+
tools::check_package_urls(d, isTRUE(opt$verbose))
27+
if (isFALSE(opt$skip_dois)) tools::check_package_dois(d, isTRUE(opt$verbose))
28+
}

0 commit comments

Comments
 (0)