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

WIP: Add RSS Reporter #553

Closed
wants to merge 8 commits into from
Closed

WIP: Add RSS Reporter #553

wants to merge 8 commits into from

Conversation

ad1217
Copy link
Contributor

@ad1217 ad1217 commented Aug 13, 2020

This is a work in progress attempt at a RSS reporter. It retrieves job history and compares each version with the previous one to generate a hopefully stable RSS feed.

I have not tested this very thoroughly (it has no tests, but neither do the other reporters) and it is missing documentation, among other things.

I suspect this will either break or be able to be improved once #360 (or equivalent) is merged.

Resolves #53.

@thp
Copy link
Owner

thp commented Sep 25, 2020

Would the logic used for --test-diff-filter help there?

@ad1217
Copy link
Contributor Author

ad1217 commented Sep 27, 2020

Yup, that's pretty much exactly the same logic. I'm not sure where a method containing that logic could be placed nicely though; it doesn't seem to fit well in either JobBase or JobState.

@thp
Copy link
Owner

thp commented Sep 27, 2020

You could make it just another command-line argument instead of a fully-fledged reporter and then you can put it in lib/urlwatch/command.py. A reporter usually only runs when there's a change, but in this case, I could imagine people wanting to export an RSS at some point where everything is already set up (of course, these days, one could use --test-reporter, but that's basically working around the fact that it's not really a reporter, but something meant to be run as command). There can, however, also be a "reporter" in the sense that it would automatically redo the RSS export. So feel free to even create a lib/urlwatch/rss.py and put things there (it's probably fine to use a function from there in the implementation of --test-diff-filter, otherwise put the shared function in e.g. lib/urlwatch/history.py or something).

I would imagine this feature working something like this:

# Export an RSS file, one-off command that exports the full history
urlwatch --export-rss /path/to/something.rss

Plus a reporter that takes as configuration argument at least the filename and will - when enabled - do the RSS export every time a change is detected, basically automating the --export-rss for cases where one has urlwatch running on a server.

In the future (but this can be scoped out of the PR to keep it simple) i'm sure people will want to create separate RSS files for each job of for a subset of jobs, etc... -- this should be easy to add once the basic infrastructure is in, but no need to do it in this PR, imho.

@thp
Copy link
Owner

thp commented Jun 6, 2021

Closing due to inactivity.

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.

Add support for creating RSS/Atom feeds out of the changes list
2 participants