roboto 0.1.1

Parse and use Robots.txt files
Documentation
  • Coverage
  • 100%
    37 out of 37 items documented4 out of 18 items with examples
  • Size
  • Source code size: 30.22 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 935.57 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • alexrudy/roboto
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • alexrudy

Roboto: Parse and use robots.txt files

Roboto provides a type-safe way to parse and use robots.txt files. It is based on the Robots Exclusion Protocol and is used to approximately try control the behavior of web crawlers and other web robots.

Installation

Add this to your Cargo.toml:

[dependencies]
roboto = "0.1"

Usage

use roboto::Robots;

let robots = r#"
User-agent: *
Disallow: /private
Disallow: /tmp
"#.parse::<Robots>().unwrap();

let user_agent = "googlebot".parse().unwrap();

assert_eq!(robots.is_allowed(&user_agent, "/public"), true);