Native Shell
Native Shell: AI-generated UI, native in your app, on every platform. Apps on iOS, Android, macOS, Windows and Linux, GPUI apps and web pages load signed, sandboxed TSX modules at run time and draw th
A deterministic toolkit for reading and validating XML, text, and index sitemaps against the Sitemap Protocol 0.9 and related W3C and RFC standards. Parses sitemap sources into tidy tibbles, expands s
Developer toolsR · PythonGitHub @bart-turczynskiOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Read-only mirror of gitlab.com/bart-turczynski/sitemapr
Translation pending
Taken from the repository README
Loading the full README.
Read the full README ↗sitemapr is a deterministic toolkit for reading and validating XML, text, and index sitemaps against the Sitemap Protocol 0.9 and the related W3C and RFC standards. It parses sitemap sources into tidy tibbles, expands sitemap indexes, discovers a site’s sitemaps from its root URL, and reports schema and protocol findings with stable, reproducible output.
Status: experimental. The package works and is covered by an extensive test suite, but the API may still change without deprecation and it is not yet on CRAN. Pin a commit or tag if you depend on it.
sitemapr is not on CRAN yet. Install it from r-universe:
install.packages(
"sitemapr",
repos = c("https://bart-turczynski.r-universe.dev", "https://cloud.r-project.org")
)
Or install the development version from GitLab:
# install.packages("pak")
pak::pak("gitlab::bart-turczynski/sitemapr")
Its URL-parsing dependency, rurl, is installed automatically from CRAN.
read_sitemap() accepts a sitemap URL or a local file (.xml, .txt,
.gz, or .tar.gz) and returns one row per URL, with lastmod,
changefreq, priority, and the image/video/news/alternate extension
columns.
library(sitemapr)
sitemap <- '<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2024-01-01</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://example.com/?page=about</loc>
<changefreq>monthly</changefreq>
</url>
</urlset>'
path <- tempfile(fileext = ".xml")
writeLines(sitemap, path)
read_sitemap(path)
#> # A tibble: 2 × 9
#> loc lastmod changefreq priority images video news alternates
#> <chr> <dttm> <chr> <dbl> <list> <list> <list> <list>
#> 1 https… 2024-01-01 00:00:00 <NA> 1 <NULL> <NULL> <NULL> <NULL>
#> 2 https… NA monthly NA <NULL> <NULL> <NULL> <NULL>
#> # ℹ 1 more variable: source_sitemap <chr>
A top-level sitemap index is expanded recursively (cycle-safe, depth- and count-capped) so every reachable child sitemap’s rows carry provenance.
validate_sitemap() returns a stable findings tibble — one row per
issue, with a code, severity, and the layer (schema, protocol,
classification, or index) that produced it. The same source and mode
always yield a row-for-row identical result.
invalid <- '<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url><loc>https://example.com/</loc><priority>2.0</priority></url>
<url><loc>/relative/path</loc></url>
</urlset>'
path <- tempfile(fileext = ".xml")
writeLines(invalid, path)
findings <- validate_sitemap(path)
findings[, c("code", "severity", "layer")]
#> # A tibble: 3 × 3
#> code severity layer
#> <chr> <chr> <chr>
#> 1 SCHEMA_INVALID error schema
#> 2 PROTOCOL_PRIORITY_OUT_OF_RANGE error protocol
#> 3 PROTOCOL_URL_NOT_ABSOLUTE error protocol
Pass mode = "non-strict" to downgrade schema violations to warnings
and drop strict-only findings.
sitemap_tree() takes a site-root URL, tries a catalog of common
sitemap paths (generic, then WordPress/Shopify), and returns a discovery
tree: one row per candidate, marked accepted or rejected. It needs
network access, so it is not run here.
sitemap_tree("https://example.com")
vignette("introduction", package = "sitemapr")