Closed plt-prx closed 4 years ago
Ok, I managed to get this:
CHANGED: TIME (https://www.timeanddate.com/worldclock/germany/berlin)
---
+++
@@ -1 +1 @@
-16:53:26
+16:53:38
by deleting the '@', '@', timestamp_old, timestamp_new
from:
return ''.join(difflib.unified_diff([l + '\n' for l in job_state.old_data.splitlines()],
[l + '\n' for l in job_state.new_data.splitlines()],
'@', '@', timestamp_old, timestamp_new))
Could somebody help me finding the code part of the reporters.py which is responsible for this part of the output:
---
+++
@@ -1 +1 @@
Git master (not yet in any release) now supports a diff_filter
which you can apply.
Two examples are documented: https://urlwatch.readthedocs.io/en/latest/advanced.html#only-show-added-or-removed-lines https://urlwatch.readthedocs.io/en/latest/advanced.html#pass-diff-output-to-a-custom-script
This should give you the flexibility to filter - if needed with an external shellpipe
filter - the diff contents to the right format that you want to have.
@thp it does not work for me.
I see no indication of the shellpipe
doing anything. (Mac) Same exact output weather I have the shellpipe or not.
Why not just allow for specifying the report template in the config?
@thp it does not work for me.
I see no indication of the
shellpipe
doing anything. (Mac) Same exact output weather I have the shellpipe or not.Why not just allow for specifying the report template in the config?
Can you open a new issue for this? Also, can you specify a bit more directly what are you trying to achieve, how you have urlwatch configured and what you would expect the output to be and what the actual output is? Also make sure you're using the latest version of urlwatch, and confirm that it contains this change.
Hi,
first of all thanks for this great tool! Sorry if this should be a too simple question; I am looking for a way to change the content of the 'details'. Through the config file I can only decide between details=true and details=false. What I try to achieve is to get rid of the timecode lines:
So it looks like this:
CHANGED: TIME (https://www.timeanddate.com/worldclock/germany/berlin)
-14:12:02
+15:19:03
I tried tampering with the reporters.py file but failed (mostly due not being able to read/write python.
Thanks!