Comments (7)
Right now, reporter-related configuration per job isn't possible. You have to rely on having multiple configurations and/or set up mailing lists or something. Because reports are grouped (so there's only one notification sent out if both are changed) it wouldn't even be possible without some additional logic to split reports in those cases (e.g. in your example, would [email protected]
get an e-mail with two changes, and [email protected]
and [email protected]
each get separate e-mails with their respective change?). Also, there are some reporters that don't have the concept of a "recipient".
Possibly related to #507.
from urlwatch.
Thanks for the feedback.
Because reports are grouped (so there's only one notification sent out if both are changed) it wouldn't even be possible without some additional logic to split reports in those cases
FYI, I have a working implementation to split reports in separate emails.
from urlwatch.
Because reports are grouped
Trying to rebase before PRing, I discover the existence of new option "separate",
urlwatch/lib/urlwatch/reporters.py
Line 130 in e342af9
Can this be used to send one email per report?
from urlwatch.
Because reports are grouped
Trying to rebase before PRing, I discover the existence of new option "separate",
urlwatch/lib/urlwatch/reporters.py
Line 130 in e342af9
Can this be used to send one email per report?
This just sends multiple e-mails to the single recipient instead of a single mail with all update notifications combined. Yes, in this case it would be possible to have multiple recipients, but it means that having multiple recipients would enable separate
, at least for that list of recipients, and then it can get tricky.
It's still tricky, as the way recipients are specified is specific to the reporter (e.g. e-mail reporter takes e-mail adresses, the Slack reporter takes a URL, the Telegram reporter takes something else, etc...).
from urlwatch.
I'm trying to use the separate
option.
Neither top-level separate: true
.
nor under report works.
report:
email:
enabled: true
separate: true
any suggestion? Thanks!
from urlwatch.
Have a working version with adding the optional field to
to a job:
job_defaults:
all:
to: '[email protected]'
---
kind: url
url: https://www.monperrus.net/martin/random.php
to: [email protected],[email protected]
--- a/lib/urlwatch/jobs.py
+++ b/lib/urlwatch/jobs.py
class Job(JobBase):
__required__ = ()
- __optional__ = ('name', 'filter', 'max_tries', 'diff_tool', 'compared_versions', 'diff_filter', 'treat_new_as_changed', 'user_visible_url')
+ __optional__ = ('name', 'filter', 'max_tries', 'diff_tool', 'compared_versions', 'diff_filter', 'treat_new_as_changed', 'user_visible_url','to')
and
--- a/lib/urlwatch/reporters.py
+++ b/lib/urlwatch/reporters.py
- msg = mailer.msg_html(self.config['from'], self.config['to'], subject, body_text, body_html)
+ msg = mailer.msg_html(self.config['from'], job_state.job.to, subject, body_text, body_html)
else:
- msg = mailer.msg_plain(self.config['from'], self.config['to'], subject, body_text)
+ msg = mailer.msg_plain(self.config['from'], job_state.job.to, subject, body_text)
from urlwatch.
I've got an alternative approach to this that enables multiple reporters of each type: #790
You would tag jobs and use them to select the right jobs for each reporter.
from urlwatch.
Related Issues (20)
- Reporting blanks HOT 28
- YAML Anchors/Aliases not working HOT 4
- CSS Filter "AttributeError: 'CSSSelector' object has no attribute 'evaluate'" HOT 2
- FEATURE: Support multiple reporters with different options HOT 6
- Meaning of max_tries is confusing
- urlwatch stopped working HOT 4
- sendmail is not documented HOT 2
- Randomly "not enough values to unpack" Python errors HOT 4
- Cache inconsistency creating new items from nowhere HOT 3
- Feature request: Extension of regex filtering to extract data HOT 7
- Consider releasing version 2.29 HOT 5
- Question - Report http errors only once HOT 5
- urlwatch 2.25-1 on Debian Stable 12.5 (navigate fails) HOT 3
- Enable/disable job from the command line HOT 1
- urlwatch moans when supplying --config HOT 1
- urlwatch 2.25 - AttributeError: 'list' object has no attribute 'read' HOT 2
- XML parsing with CDATA not working HOT 6
- urlwatch 2.28: html: separate: true not sending separate emails HOT 2
- --test-filter works but not with a normal execution HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from urlwatch.