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): new merge_feed filter #18

Merged
merged 9 commits into from
Feb 4, 2024
Merged

feat(filters): new merge_feed filter #18

merged 9 commits into from
Feb 4, 2024

Conversation

shouya
Copy link
Owner

@shouya shouya commented Feb 4, 2024

Implements #11.

The new filter's name is merge_feed and the config type is either:

  • an string, which is interpreted as the url of the source to merge
  • or a full config object with the following properties:
    • source (string, required): the source url of the extra feed
    • client (string, optional): any Client config
    • filters (string, optional): a list of filters to run on the extra feed before merging it

Here's an example config using the merge_feed filter:

endpoints:
  - path: "/my-feed"
    source: "https://example.com/feed"
    filters:
      - merge_feed: "https://example.com/extra-feed"

  - path: "/my-feed"
    source: "https://example.com/feed"
    filters:
      - merge_feed:
          source: "https://example.com/extra-feed"
          client:
            timeout: 10
          filters:
            - full_text: {}
            - js: |
              function modify_post(feed, post) {
                post.title += " (merged);
                return post;
              }

@shouya shouya changed the title feat(filters): new filter merging feeds (merge) feat(filters): new merge_feed filter Feb 4, 2024
@shouya shouya merged commit 7abb97a into master Feb 4, 2024
2 checks passed
@shouya shouya deleted the merge-feeds branch February 4, 2024 11:04
@shouya shouya mentioned this pull request Feb 4, 2024
@shouya shouya added the feature label Feb 20, 2024
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.

1 participant