We need a way to test that loaders are working on real websites.
The tool will test loaders by:
Developer open their RSS reader and save all subscriptions to OPML file
Then the developer run our script and pass the path to that OPML file
This script takes every RSS feed from OPML file and test that it could parse it and find it from website home
To finish the task:
[ ] Add loader-tests/ project to monorepo.
[ ] Create README.md and example a little.
[ ] Add project description to the main README.md
[ ] Add script. Import @slowreader/core and call setEnvrionment() with Node.js APIs.
[ ] Add npm script to call that script to main package.json. Document it in main README.md.
[ ] Read arguments. Show help on no file in argument. Show nice errors if we can’t read file.
[ ] Parse OPML and get list of RSS URLs.
[ ] For each RSS try to find the right loader by calling loader.isMineText(). Show nice error if the loader was not found.
[ ] For found loader call loader.getMineLinksFromText(). Be sure that it returned some posts.
[ ] For URL remove path (https://example.com/news.rss → https://example.com/) and call use methods from core/preview.ts to be sure that reader will find that RSS URL from the home. If URL was not found show warning (not error, since sometimes RSS link is hidden).
[ ] Add to CONTRIBUTION.md to How to Find Next Task step to use this tool if you have RSS reader.
Use colors output by picocolors. You can use nanospinner for loading spinner.
We need a way to test that loaders are working on real websites.
The tool will test loaders by:
To finish the task:
loader-tests/
project to monorepo.README.md
and example a little.README.md
@slowreader/core
and callsetEnvrionment()
with Node.js APIs.package.json
. Document it in mainREADME.md
.loader.isMineText()
. Show nice error if the loader was not found.loader.getMineLinksFromText()
. Be sure that it returned some posts.https://example.com/news.rss
→https://example.com/
) and call use methods fromcore/preview.ts
to be sure that reader will find that RSS URL from the home. If URL was not found show warning (not error, since sometimes RSS link is hidden).CONTRIBUTION.md
toHow to Find Next Task
step to use this tool if you have RSS reader.Use colors output by
picocolors
. You can usenanospinner
for loading spinner.