Skip to content

Commit df0c360

Browse files
feat: enhance crawler endpoint and email notification localization
- Added optional parameters `email` and `language` to the crawler endpoint for improved user notifications. - Updated documentation in `crawler_endpoint.md` to reflect new parameters and enhance clarity. - Improved email notification content in both English and Farsi localization files to include the application name "Hatef" for better branding. - Enhanced email subject localization to dynamically include the number of pages indexed, improving user engagement. These changes significantly improve the user experience by providing localized notifications and clearer documentation for the crawler API.
1 parent f470009 commit df0c360

File tree

4 files changed

+540
-15
lines changed

4 files changed

+540
-15
lines changed

.husky/pre-commit

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/sh
2+
. "$(dirname "$0")/_/husky.sh"
3+
4+
npm run format:check
5+
npm run validate-schema

docs/api/crawler_endpoint.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,18 +47,18 @@ Add a new site to the crawl queue with optimized SPA rendering.
4747

4848
#### Parameters
4949

50-
| Parameter | Type | Default | Description |
51-
| --------------------- | ------- | ------------------------- | --------------------------------------------------- |
52-
| `url` | string | **required** | Seed URL to start crawling |
53-
| `maxPages` | integer | 1000 | Maximum pages to crawl |
54-
| `maxDepth` | integer | 5 | Maximum crawl depth |
55-
| `email` | string | (optional) | Email address for completion notification |
56-
| `language` | string | "en" | Language for email notifications (en, fa, etc.) |
57-
| `spaRenderingEnabled` | boolean | true | Enable SPA rendering |
58-
| `includeFullContent` | boolean | false | Store full HTML content |
59-
| `browserlessUrl` | string | "http://browserless:3000" | Browserless service URL |
60-
| `timeout` | integer | 15000 | Request timeout in milliseconds |
61-
| `politenessDelay` | integer | 500 | Delay between requests in milliseconds |
50+
| Parameter | Type | Default | Description |
51+
| --------------------- | ------- | ------------------------- | ----------------------------------------------- |
52+
| `url` | string | **required** | Seed URL to start crawling |
53+
| `maxPages` | integer | 1000 | Maximum pages to crawl |
54+
| `maxDepth` | integer | 5 | Maximum crawl depth |
55+
| `email` | string | (optional) | Email address for completion notification |
56+
| `language` | string | "en" | Language for email notifications (en, fa, etc.) |
57+
| `spaRenderingEnabled` | boolean | true | Enable SPA rendering |
58+
| `includeFullContent` | boolean | false | Store full HTML content |
59+
| `browserlessUrl` | string | "http://browserless:3000" | Browserless service URL |
60+
| `timeout` | integer | 15000 | Request timeout in milliseconds |
61+
| `politenessDelay` | integer | 500 | Delay between requests in milliseconds |
6262

6363
#### Response
6464

0 commit comments

Comments
 (0)