From 33a9944008732598f64e32b25a62bc9ad88c12c6 Mon Sep 17 00:00:00 2001 From: Leonardo Poletto Date: Thu, 28 Aug 2025 19:04:42 -0300 Subject: [PATCH 1/3] docs: fix README examples to match actual CLI output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Corrected example output (`allowed: YES` → `: ALLOWED`) - Documented behavior when robots.txt is empty - Added note on exit codes (`0` = ALLOWED, `1` = DISALLOWED`) These changes bring the README in line with the current `robots_main` output, making usage clearer for scripting and automation. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2d5a2fc..ea679b9 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Target //:robots_main up-to-date: bazel-bin/robots_main ... bazel-robots$ bazel run robots_main -- ~/local/path/to/robots.txt YourBot https://example.com/url - user-agent 'YourBot' with url 'https://example.com/url' allowed: YES + user-agent 'YourBot' with url 'https://example.com/url': ALLOWED ``` #### Building with CMake @@ -104,8 +104,12 @@ Test project robotstxt/c-build Total Test time (real) = 0.02 sec ... $ robots ~/local/path/to/robots.txt YourBot https://example.com/url - user-agent 'YourBot' with url 'https://example.com/url' allowed: YES + user-agent 'YourBot' with url 'https://example.com/url': ALLOWED ``` +> **Note**: If the robots file is empty, the parser also prints: +`notice: robots file is empty so all user-agents are allowed` + +> **Exit codes:** `0` = `ALLOWED`, `1` = `DISALLOWED`. ## Notes From da6c46afe46577f4a4f32bd5974ad818d2a47a32 Mon Sep 17 00:00:00 2001 From: Leonardo Poletto Date: Thu, 28 Aug 2025 19:25:52 -0300 Subject: [PATCH 2/3] =?UTF-8?q?Change=20url=20=E2=86=92=20URI=20in=20the?= =?UTF-8?q?=20README?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ea679b9..721a5e0 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ Target //:robots_main up-to-date: bazel-bin/robots_main ... bazel-robots$ bazel run robots_main -- ~/local/path/to/robots.txt YourBot https://example.com/url - user-agent 'YourBot' with url 'https://example.com/url': ALLOWED + user-agent 'YourBot' with URI 'https://example.com/url': ALLOWED ``` #### Building with CMake @@ -104,7 +104,7 @@ Test project robotstxt/c-build Total Test time (real) = 0.02 sec ... $ robots ~/local/path/to/robots.txt YourBot https://example.com/url - user-agent 'YourBot' with url 'https://example.com/url': ALLOWED + user-agent 'YourBot' with URI 'https://example.com/url': ALLOWED ``` > **Note**: If the robots file is empty, the parser also prints: `notice: robots file is empty so all user-agents are allowed` From 7066f3151e73b60a08576522482bb61fee1c3bad Mon Sep 17 00:00:00 2001 From: Leonardo Poletto Date: Thu, 28 Aug 2025 19:37:18 -0300 Subject: [PATCH 3/3] docs(README): document empty robots.txt behavior and exit codes - Clarify parser output when robots.txt is empty - Add note on exit codes (`0` = ALLOWED, `1` = DISALLOWED) - Makes CLI behavior clearer for scripting use --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 721a5e0..764efd7 100644 --- a/README.md +++ b/README.md @@ -107,9 +107,12 @@ $ robots ~/local/path/to/robots.txt YourBot https://example.com/url user-agent 'YourBot' with URI 'https://example.com/url': ALLOWED ``` > **Note**: If the robots file is empty, the parser also prints: -`notice: robots file is empty so all user-agents are allowed` +> +> ``` +> notice: robots file is empty so all user-agents are allowed +> ``` -> **Exit codes:** `0` = `ALLOWED`, `1` = `DISALLOWED`. +> **Exit codes:** `0` = ALLOWED, `1` = DISALLOWED ## Notes