-
Notifications
You must be signed in to change notification settings - Fork 7
Adding feeds
Alex Musayev edited this page Jan 3, 2021
·
18 revisions
How to add a new feed:
- Add new feed to
config/feeds.yml
- Create private group on https://candy.freefeed.net
- Create private group on https://freefeed.net
- Update group description and avatar
- Create or reuse processor class
- Create or reuse normalizer class
- Test new feed processing on candy.
- Test on production.
⚠️ Open public access for the new group.
Testing new feed:
feed = Feed.find_by(name: 'xkcd')
loader = LoaderResolver.call(feed)
processor = ProcessorResolver.call(feed)
loader = LoaderResolver.call(feed)
normalizer = NormalizerResolver.call(feed)
content = loader.call(feed)
entities = processor.call(content, feed: feed)
entity = entities.first
normalized = normalizer.call(entity)
ap normalized.as_json
Test run for a specific feed:
bundle exec rails feeder:pull[einzelganger] jobs:workoff