Skip to content

Commit

Permalink
doc: update README to adpat configure struct changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangjiahan committed May 10, 2024
1 parent 0bec071 commit d0f688f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,23 @@ Follow these steps to install and set up Hedon-Bot:

3. **Configure Hedon-Bot**

Copy the `config.template.yml` to `config.yml` and modify it as needed:
```bash
cp config.template.yml config.yml
```
Copy the `config.template.yml` to `config.yml` and modify it as needed.

4. **Modify the `log4rs.yml` log configuration file as necessary**
4. **Configure log**

Modify the `log4rs.yml` log configuration file as needed.


## Configuration (`config.yml`) ⚙️

- **redis**: Configuration for Redis connection. This project uses Redis's `hsetnx` to prevent pushing the same article more than once.
- **webhook**: Specify the list of webhooks for various channels. Currently supports the `go_weekly` channel, with support for multiple webhooks per channel.
- **webhooks**: Specify the list of webhooks for various channels. Currently supports the `go_weekly`, with support for multiple webhooks per channel.
- **cron_expression**: Schedule the frequency of fetching updates for each channel using a cron expression format:
```
sec min hour day of month month day of week year
* * * * * * *
```
- **once_post_limit**: A limit on the number of articles it can push at a time, default is `5`.
Expand Down
2 changes: 1 addition & 1 deletion src/conf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct ArticleSourceConfig {
// webhoos of Feishu robots.
pub webhooks: Vec<String>,

// a limit on the number of articles it can push at a time
// a limit on the number of articles it can push at a time, default is `5`
pub once_post_limit: u8,
}

Expand Down

0 comments on commit d0f688f

Please sign in to comment.