Native Shell
Native Shell:AI 生成的 UI,在你的應用中原生呈現,涵蓋每個平台。iOS、Android、macOS、Windows 與 Linux 上的應用、GPUI 應用與網頁在執行時載入已簽名、沙箱隔離的 TSX 模組並繪製 th
AI 翻譯
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證Read-only mirror of gitlab.com/bart-turczynski/robotstxtr
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Faithful robots.txt parsing and URL-allowed decisions for R, powered
by Google’s own matcher.
robotstxtr evaluates whether a URL may be crawled according to a
site’s robots.txt rules. It wraps a vendored, upstream-test-validated
snapshot of Google’s open-source C++ robots.txt parser and matcher, so
allow and disallow decisions match Googlebot’s behavior — including the
quirky parts (longest-match wins, Allow-beats-Disallow ties, */$
wildcards, case-sensitive paths, percent-escape canonicalization). It
can also fetch robots.txt for you under a deterministic, conservative
policy, through the ssrfr guard against server-side request forgery,
construct fetch origins with rurl, and return richly typed, vectorized
decisions with per-rule match metadata.
This is a faithful, upstream-test-validated replica of the pinned matcher, not a claim of universal behavioral identity with Googlebot.
Install the released version from CRAN:
install.packages("robotstxtr")
Or the development version from r-universe:
install.packages(
"robotstxtr",
repos = c("https://bart-turczynski.r-universe.dev", "https://cloud.r-project.org")
)
The development version also lives on GitLab. Its dependencies,
including rurl, are all on CRAN, so it installs with no extra
repository configuration:
# with pak
pak::pak("gitlab::bart-turczynski/robotstxtr")
# or with remotes
remotes::install_gitlab("bart-turczynski/robotstxtr")
Installing from source compiles the vendored C++ matcher and requires a C++17 toolchain. Once dependencies have been obtained, installing, testing, and checking the package does not make live network requests.
Match one or more URLs against a robots.txt body you already have,
fully offline, with allowed_by_robots_text():
library(robotstxtr)
robots <- "user-agent: *
disallow: /private
allow: /private/public
"
x <- allowed_by_robots_text(
robots,
c(
"https://example.com/index.html", # not disallowed -> TRUE
"https://example.com/private/report", # under /private -> FALSE
"https://example.com/private/public" # re-allowed -> TRUE
),
"mybot"
)
x$results[c("url", "allowed", "decision_source")]
#> url allowed decision_source
#> 1 https://example.com/index.html TRUE default_allow
#> 2 https://example.com/private/report FALSE rule_disallow
#> 3 https://example.com/private/public TRUE rule_allow
allowed is the TRUE/FALSE/NA answer; decision_source explains
why.
If you do not already have the robots.txt text,
allowed_by_robots_url() derives the governing origin, fetches it once
per origin, and matches:
allowed_by_robots_url("https://example.com/some/page", "mybot")
See the “Introduction to robotstxtr” vignette for the full walkthrough,
including match metadata, the fetch policy, and body inspection with
robots_body().
Document validation is separate from URL allow/disallow evaluation.
Validate supplied text (or raw acquisition bytes) with
robots_validate_text():
validation <- robots_validate_text(
"user-agent: *\ndisallow: /private\nunknown-field: value\n"
)
validation$documents
validation$diagnostics
Use robots_validate_url() when the document must first be fetched. It
calls the same deterministic robots_fetch() path and validates each
distinct stored raw body once; acquisition limits and failures remain
explicit evidence.
The profile is deliberately named google-parser-compatible. It
describes the pinned parser plus conservative structural checks, not
universal crawler or RFC 9309 validity. Validation reports file syntax
and structure only: it does not answer whether a particular URL is
allowed, infer whether rules match the webmaster’s intent, or fetch and
check remote sitemap resources.
Multi-engine integrations should use the versioned facade,
robots_evaluate_text_v1() and robots_evaluate_url_v1(), which
selects the engine policy and the matcher (Google, Yandex or Bing)
explicitly and returns explicit non-decisions instead of falling back to
Google. The “Engine-aware contract” vignette walks through it.
If you use robotstxtr in your work, please cite it. Run
citation("robotstxtr") for the current citation, or see
CITATION.cff.
Each release is archived on Zenodo. Cite the concept DOI
10.5281/zenodo.23018995 to
refer to robotstxtr in general; it always resolves to the latest
release. Use the version-specific DOI shown on the Zenodo
record for a particular
release.