Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(filters): limit the number of posts #98

Merged
merged 3 commits into from
Mar 25, 2024
Merged

feat(filters): limit the number of posts #98

merged 3 commits into from
Mar 25, 2024

Conversation

shouya
Copy link
Owner

@shouya shouya commented Mar 25, 2024

This PR adds a new filter limit that allows limiting the number of posts. This filter operates in two modes:

  • count mode: only the first n posts are kept
  • duration mode: only posts published within duration are kept

The format of duration string follows the same format as duration strings used in other places. Find more information about the duration format at duration_str.

The config syntax as follows:

  - path: /hackernews-fresh.xml
    source: https://news.ycombinator.com/rss
    filters:
      - limit: 8h

  - path: /hackernews-first-10.xml
    source: https://news.ycombinator.com/rss
    filters:
      - limit: 10

Fixes #88.

@shouya shouya merged commit dc1efac into master Mar 25, 2024
2 checks passed
@shouya shouya deleted the limit-by-count branch March 25, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Option to Limit Number of Feeds
1 participant