Skip to content

Commit ff5619e

Browse files
authored
Rename robots flag to --useRobots, keep --robots as alias (#932)
Follow-up to #631 Based on feedback from webrecorder/browsertrix#3029 Renaming `--robots` to `--useRobots` will allow us to keep the Browsertrix backend API more consistent with similar flags like `--useSitemap`. Keeping `--robots` as it's a nice shorthand alias.
1 parent 2914e93 commit ff5619e

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

docs/docs/user-guide/cli-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ Options:
324324
the Chrome instance (space-separated
325325
or multiple --extraChromeArgs)
326326
[array] [default: []]
327-
--robots If set, fetch and respect page disal
327+
--useRobots, --robots If set, fetch and respect page disal
328328
lows specified in per-host robots.tx
329329
t [boolean] [default: false]
330330
--robotsAgent Agent to check in addition to '*' fo

src/util/argParser.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,8 @@ class ArgParser {
705705
default: [],
706706
},
707707

708-
robots: {
708+
useRobots: {
709+
alias: "robots",
709710
describe:
710711
"If set, fetch and respect page disallows specified in per-host robots.txt",
711712
type: "boolean",

tests/robots_txt.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import child_process from "child_process";
22

33
test("test robots.txt is fetched and cached", async () => {
44
const res = child_process.execSync(
5-
"docker run -v $PWD/test-crawls:/crawls webrecorder/browsertrix-crawler crawl --url https://specs.webrecorder.net/ --url https://webrecorder.net/ --scopeType page --robots --logging debug",
5+
"docker run -v $PWD/test-crawls:/crawls webrecorder/browsertrix-crawler crawl --url https://specs.webrecorder.net/ --url https://webrecorder.net/ --scopeType page --useRobots --logging debug",
66
);
77

88
const log = res.toString();

0 commit comments

Comments
 (0)