Skip to content

Commit 7a61027

Browse files
committed
Rename field to useRobots
1 parent 8b7fc27 commit 7a61027

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

backend/btrixcloud/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@ class RawCrawlConfig(BaseModel):
362362
combineWARC: Optional[bool] = None
363363

364364
useSitemap: Optional[bool] = False
365+
useRobots: Optional[bool] = False
366+
365367
failOnFailedSeed: Optional[bool] = False
366368
failOnContentCheck: Optional[bool] = False
367369

@@ -376,8 +378,6 @@ class RawCrawlConfig(BaseModel):
376378

377379
saveStorage: Optional[bool] = False
378380

379-
robots: Optional[bool] = False
380-
381381

382382
# ============================================================================
383383
class CrawlConfigIn(BaseModel):

frontend/src/components/ui/config-details.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ export class ConfigDetails extends BtrixElement {
477477
)}
478478
${this.renderSetting(
479479
msg("Skip Pages Disallowed by robots.txt"),
480-
Boolean(config.robots),
480+
Boolean(config.useRobots),
481481
)}
482482
${this.renderSetting(
483483
msg("Fail Crawl If Not Logged In"),
@@ -555,7 +555,7 @@ export class ConfigDetails extends BtrixElement {
555555
)}
556556
${this.renderSetting(
557557
msg("Skip Pages Disallowed by robots.txt"),
558-
Boolean(config.robots),
558+
Boolean(config.useRobots),
559559
)}
560560
${this.renderSetting(
561561
msg("Check For Sitemap"),

frontend/src/features/crawl-workflows/workflow-editor.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,11 +1064,11 @@ export class WorkflowEditor extends BtrixElement {
10641064
`)}
10651065
${this.renderHelpTextCol(infoTextFor["includeLinkedPages"], false)}
10661066
${inputCol(html`
1067-
<sl-checkbox name="robots" ?checked=${this.formState.robots}>
1067+
<sl-checkbox name="useRobots" ?checked=${this.formState.useRobots}>
10681068
${msg("Skip pages disallowed by robots.txt")}
10691069
</sl-checkbox>
10701070
`)}
1071-
${this.renderHelpTextCol(infoTextFor["robots"], false)}
1071+
${this.renderHelpTextCol(infoTextFor["useRobots"], false)}
10721072
${inputCol(html`
10731073
<sl-checkbox
10741074
name="failOnContentCheck"
@@ -1587,11 +1587,11 @@ https://example.net`}
15871587
`)}
15881588
${this.renderHelpTextCol(infoTextFor["includeLinkedPages"], false)}
15891589
${inputCol(html`
1590-
<sl-checkbox name="robots" ?checked=${this.formState.robots}>
1590+
<sl-checkbox name="useRobots" ?checked=${this.formState.useRobots}>
15911591
${msg("Skip pages disallowed by robots.txt")}
15921592
</sl-checkbox>
15931593
`)}
1594-
${this.renderHelpTextCol(infoTextFor["robots"], false)}
1594+
${this.renderHelpTextCol(infoTextFor["useRobots"], false)}
15951595
${inputCol(html`
15961596
<sl-checkbox name="useSitemap" ?checked=${this.formState.useSitemap}>
15971597
${msg("Check for sitemap")}
@@ -3355,7 +3355,7 @@ https://archiveweb.page/images/${"logo.svg"}`}
33553355
| "failOnFailedSeed"
33563356
| "failOnContentCheck"
33573357
| "saveStorage"
3358-
| "robots"
3358+
| "useRobots"
33593359
> {
33603360
const jsonSeeds = this.formState.seedListFormat === SeedListFormat.JSON;
33613361

@@ -3375,7 +3375,7 @@ https://archiveweb.page/images/${"logo.svg"}`}
33753375
failOnFailedSeed: this.formState.failOnFailedSeed,
33763376
failOnContentCheck: this.formState.failOnContentCheck,
33773377
saveStorage: this.formState.saveStorage,
3378-
robots: this.formState.robots,
3378+
useRobots: this.formState.useRobots,
33793379
};
33803380

33813381
return config;
@@ -3389,7 +3389,7 @@ https://archiveweb.page/images/${"logo.svg"}`}
33893389
| "failOnFailedSeed"
33903390
| "failOnContentCheck"
33913391
| "saveStorage"
3392-
| "robots"
3392+
| "useRobots"
33933393
> {
33943394
const primarySeedUrl = this.formState.primarySeedUrl;
33953395
const includeUrlList = this.formState.customIncludeUrlList
@@ -3422,7 +3422,7 @@ https://archiveweb.page/images/${"logo.svg"}`}
34223422
failOnFailedSeed: false,
34233423
failOnContentCheck: this.formState.failOnContentCheck,
34243424
saveStorage: this.formState.saveStorage,
3425-
robots: this.formState.robots,
3425+
useRobots: this.formState.useRobots,
34263426
};
34273427
return config;
34283428
}

frontend/src/strings/crawl-workflows/infoText.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export const infoTextFor = {
8585
saveStorage: msg(
8686
`Include data from the browser's local and session storage in the web archive.`,
8787
),
88-
robots: msg(
88+
useRobots: msg(
8989
`Check for a robots.txt file for each host and skip any disallowed pages.`,
9090
),
9191
} as const satisfies Partial<Record<Field, string | TemplateResult>>;

frontend/src/types/crawler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export type SeedConfig = Expand<
5555
customBehaviors: string[];
5656
clickSelector: string;
5757
saveStorage?: boolean;
58-
robots?: boolean;
58+
useRobots?: boolean;
5959
}
6060
>;
6161

frontend/src/utils/workflow.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export type FormState = {
184184
selectLinks: string[];
185185
clickSelector: string;
186186
saveStorage: WorkflowParams["config"]["saveStorage"];
187-
robots: WorkflowParams["config"]["robots"];
187+
useRobots: WorkflowParams["config"]["useRobots"];
188188
};
189189

190190
export type FormStateField = keyof FormState;
@@ -247,7 +247,7 @@ export const getDefaultFormState = (): FormState => ({
247247
clickSelector: DEFAULT_AUTOCLICK_SELECTOR,
248248
customBehavior: false,
249249
saveStorage: false,
250-
robots: false,
250+
useRobots: false,
251251
});
252252

253253
export const mapSeedToUrl = (arr: Seed[]) =>
@@ -421,7 +421,7 @@ export function getInitialFormState(params: {
421421
params.initialWorkflow.crawlerChannel || defaultFormState.crawlerChannel,
422422
proxyId: params.initialWorkflow.proxyId || defaultFormState.proxyId,
423423
saveStorage: params.initialWorkflow.config.saveStorage,
424-
robots: params.initialWorkflow.config.robots,
424+
useRobots: params.initialWorkflow.config.useRobots,
425425
...formState,
426426
};
427427
}

0 commit comments

Comments
 (0)