webchanges 3.26.0__tar.gz → 3.28.0rc0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {webchanges-3.26.0 → webchanges-3.28.0rc0}/LICENSE +1 -1
  2. {webchanges-3.26.0/webchanges.egg-info → webchanges-3.28.0rc0}/PKG-INFO +68 -66
  3. {webchanges-3.26.0 → webchanges-3.28.0rc0}/README.rst +59 -56
  4. {webchanges-3.26.0 → webchanges-3.28.0rc0}/pyproject.toml +12 -14
  5. webchanges-3.28.0rc0/requirements.txt +12 -0
  6. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/__init__.py +1 -1
  7. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/_vendored/headers.py +2 -2
  8. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/cli.py +16 -4
  9. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/command.py +92 -28
  10. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/config.py +15 -1
  11. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/differs.py +349 -159
  12. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/filters.py +37 -34
  13. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/handler.py +137 -49
  14. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/jobs.py +223 -132
  15. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/reporters.py +116 -53
  16. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/storage.py +76 -47
  17. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/storage_minidb.py +4 -4
  18. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/util.py +20 -2
  19. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/worker.py +55 -46
  20. {webchanges-3.26.0 → webchanges-3.28.0rc0/webchanges.egg-info}/PKG-INFO +68 -66
  21. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges.egg-info/requires.txt +4 -6
  22. webchanges-3.26.0/requirements.txt +0 -11
  23. {webchanges-3.26.0 → webchanges-3.28.0rc0}/MANIFEST.in +0 -0
  24. {webchanges-3.26.0 → webchanges-3.28.0rc0}/setup.cfg +0 -0
  25. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/_vendored/__init__.py +0 -0
  26. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/_vendored/packaging_version.py +0 -0
  27. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/mailer.py +0 -0
  28. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/main.py +0 -0
  29. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges/py.typed +0 -0
  30. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges.egg-info/SOURCES.txt +0 -0
  31. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges.egg-info/dependency_links.txt +0 -0
  32. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges.egg-info/entry_points.txt +0 -0
  33. {webchanges-3.26.0 → webchanges-3.28.0rc0}/webchanges.egg-info/top_level.txt +0 -0
@@ -28,7 +28,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28
28
  SOURCE CODE REDISTRIBUTION NOTICE
29
29
  (urlwatch by Thomas Perl)
30
30
 
31
- This software redistributes source code of release 2.21 dated 30 July 2020 of
31
+ This software redistributes source code of release 2.21, dated 30 July 2020, of
32
32
  urlwatch
33
33
  https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f,
34
34
  which is subject to the following copyright notice and license (from
@@ -1,7 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: webchanges
3
- Version: 3.26.0
4
- Summary: Check web (or command output) for changes since last run and notify. Anonymously alerts you of web changes, with
3
+ Version: 3.28.0rc0
4
+ Summary: Web Changes Delivered. AI-Summarized. Totally Anonymous.
5
5
  Author-email: Mike Borsetti <mike+webchanges@borsetti.com>
6
6
  Maintainer-email: Mike Borsetti <mike+webchanges@borsetti.com>
7
7
  License: ========
@@ -34,7 +34,7 @@ License: ========
34
34
  SOURCE CODE REDISTRIBUTION NOTICE
35
35
  (urlwatch by Thomas Perl)
36
36
 
37
- This software redistributes source code of release 2.21 dated 30 July 2020 of
37
+ This software redistributes source code of release 2.21, dated 30 July 2020, of
38
38
  urlwatch
39
39
  https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f,
40
40
  which is subject to the following copyright notice and license (from
@@ -103,17 +103,18 @@ Classifier: Typing :: Typed
103
103
  Requires-Python: >=3.10
104
104
  Description-Content-Type: text/x-rst
105
105
  License-File: LICENSE
106
- Requires-Dist: colorama; os_name == "nt"
106
+ Requires-Dist: colorama; sys_platform == "win32"
107
107
  Requires-Dist: cssselect
108
108
  Requires-Dist: h2
109
109
  Requires-Dist: html2text
110
110
  Requires-Dist: httpx
111
- Requires-Dist: lxml
111
+ Requires-Dist: lxml>=5.3.0
112
112
  Requires-Dist: markdown2
113
113
  Requires-Dist: msgpack
114
114
  Requires-Dist: platformdirs
115
115
  Requires-Dist: pyyaml
116
- Requires-Dist: tzdata; os_name == "nt"
116
+ Requires-Dist: tzdata; sys_platform == "win32"
117
+ Requires-Dist: zstandard
117
118
  Provides-Extra: use-browser
118
119
  Requires-Dist: playwright; extra == "use-browser"
119
120
  Requires-Dist: psutil; extra == "use-browser"
@@ -160,10 +161,8 @@ Provides-Extra: requests
160
161
  Requires-Dist: requests; extra == "requests"
161
162
  Provides-Extra: safe-password
162
163
  Requires-Dist: keyring; extra == "safe-password"
163
- Provides-Extra: zstd
164
- Requires-Dist: zstandard; extra == "zstd"
165
164
  Provides-Extra: all
166
- Requires-Dist: webchanges[beautify,bs4,deepdiff_xml,html5lib,ical2text,imagediff,jq,matrix,ocr,pdf2text,pushbullet,pushover,pypdf_crypto,redis,requests,safe_password,use_browser,xmpp,zstd]; extra == "all"
165
+ Requires-Dist: webchanges[beautify,bs4,deepdiff_xml,html5lib,ical2text,imagediff,jq,matrix,ocr,pdf2text,pushbullet,pushover,pypdf_crypto,redis,requests,safe_password,use_browser,xmpp]; extra == "all"
167
166
 
168
167
  .. role:: underline
169
168
  :class: underline
@@ -176,22 +175,18 @@ Requires-Dist: webchanges[beautify,bs4,deepdiff_xml,html5lib,ical2text,imagediff
176
175
  webchanges |downloads|
177
176
  ======================
178
177
 
179
- **webchanges** checks web content including images, and notifies you via email (or one of many other `supported
180
- services <https://webchanges.readthedocs.io/en/stable/introduction.html#reporters-list>`__) if a change is detected.
181
- **webchanges** can also check the output of local commands. The notification includes a detail of what has changed
182
- ("diff"), with an optional summary generated by AI (BETA).
183
-
184
- **webchanges** *anonymously* alerts you of web changes.
185
-
178
+ **webchanges** *anonymously* checks web content (including images) and commands for changes, delivering instant
179
+ notifications and AI-powered summaries to your favorite `platform
180
+ <https://webchanges.readthedocs.io/en/stable/introduction.html#reporters-list>`__.
186
181
 
187
182
 
188
183
  Requirements
189
184
  ============
190
185
  **webchanges** requires |support|.
191
186
 
192
- You should use the latest version of `Python <https://www.python.org/downloads/>`__ if possible, but older
193
- Python versions are supported for 3 years after being obsoleted by a new major release (3.x). For each major release,
194
- only the latest bug and security fix version (3.x.y) is supported.
187
+ For the best experience, use the current version of `Python <https://www.python.org/downloads/>`__. We also support
188
+ older Python versions for 3 years after they're replaced by a newer one; we just ask that you use the most up-to-date
189
+ bug and security fix release from that older version.
195
190
 
196
191
  For Generative AI summaries (BETA), you need a free `API Key from Google Cloud AI Studio
197
192
  <https://aistudio.google.com/app/apikey>`__ (see `here
@@ -206,11 +201,10 @@ Install **webchanges** |pypi_version| |format| |status| |security| with:
206
201
 
207
202
  pip install webchanges
208
203
 
209
-
210
204
  Running in Docker
211
- =================
212
- **webchanges** can be run in a `Docker <https://www.docker.com/>`__ container; please see `here
213
- <https://github.com/yubiuser/webchanges-docker>`__ for one such implementation.
205
+ -----------------
206
+ **webchanges** can easily run in a container; you can find a `Docker <https://www.docker.com/>`__ implementation
207
+ `here <https://github.com/yubiuser/webchanges-docker>`__.
214
208
 
215
209
 
216
210
  Documentation |readthedocs|
@@ -230,7 +224,6 @@ Initialize
230
224
 
231
225
  webchanges --edit
232
226
 
233
-
234
227
  #. Run the following command to change the default `configuration
235
228
  <https://webchanges.readthedocs.io/en/stable/configuration.html>`__, e.g. to receive change notifications
236
229
  ("`reports <https://webchanges.readthedocs.io/en/stable/reporters.html>`__")
@@ -240,26 +233,27 @@ Initialize
240
233
 
241
234
  webchanges --edit-config
242
235
 
243
-
244
236
  Run
245
237
  ---
246
- To check the sources in your jobs and report on (e.g. display or via email) any changes found from the previous
247
- execution, just run:
238
+ To check the sources in your jobs and report on (e.g. display or via email) any changes found from the last time the
239
+ program ran, just run:
248
240
 
249
241
  .. code-block:: bash
250
242
 
251
243
  webchanges
252
244
 
253
- **webchanges** does not include a scheduler. We recommend using a system scheduler to automatically run it
254
- periodically:
255
245
 
256
- - On Linux or macOS, you can use cron (if you have never used cron before, see
257
- `here <https://www.computerhope.com/unix/ucrontab.htm>`__); `crontab.guru <https://crontab.guru>`__ will build a
258
- schedule expression for you;
259
- - On macOS, you can use `launchd <https://developer.apple
260
- .com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/ScheduledJobs.html>`__;
261
- - On Windows, you can use the built-in `Windows Task Scheduler
262
- <https://en.wikipedia.org/wiki/Windows_Task_Scheduler>`__.
246
+ Schedule
247
+ --------
248
+ **webchanges** leverages the power of a system scheduler:
249
+
250
+ - On Linux you can use cron, and a tool like `crontab.guru <https://crontab.guru>`__ can build a
251
+ schedule expression for you (note: see `here <https://www.computerhope.com/unix/ucrontab.htm>`__ if you have never
252
+ used cron before);
253
+ - On Windows you can use `Windows Task Scheduler <https://en.wikipedia.org/wiki/Windows_Task_Scheduler>`__;
254
+ - On macOS you can use `launchd <https://developer.apple
255
+ .com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/ScheduledJobs.html>`__ (note: see `here
256
+ <https://launchd.info/>`__ if you have never used launchd before).
263
257
 
264
258
 
265
259
  Code
@@ -283,42 +277,50 @@ License
283
277
  =======
284
278
  |license|
285
279
 
286
- Released under the `MIT License <https://opensource.org/licenses/MIT>`__ but redistributing modified source code from
287
- `urlwatch 2.21 <https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f>`__ dated 30 July 2020
280
+ See the `complete licenses <https://raw.githubusercontent.com/mborsetti/webchanges/refs/heads/main/LICENSE>`__ (released
281
+ under the `MIT License <https://opensource.org/licenses/MIT>`__ but redistributing modified source code, dated 30
282
+ July 2020, from `urlwatch 2.21 <https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f>`__
288
283
  licensed under a `BSD 3-Clause License
289
- <https://raw.githubusercontent.com/thp/urlwatch/346b25914b0418342ffe2fb0529bed702fddc01f/COPYING>`__. See the complete
290
- license `here <https://github.com/mborsetti/webchanges/blob/main/LICENSE>`__.
284
+ <https://raw.githubusercontent.com/thp/urlwatch/346b25914b0418342ffe2fb0529bed702fddc01f/COPYING>`__).
291
285
 
292
286
 
293
287
  Compatibility with and improvements from **urlwatch**
294
288
  =====================================================
295
289
 
296
290
  This project is based on code from `urlwatch 2.21
297
- <https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f>`__ dated 30 July 2020. You can
298
- easily upgrade to **webchanges** from the current version of **urlwatch** using the same job and configuration files
299
- (see `here <https://webchanges.readthedocs.io/en/stable/migration.html>`__) and benefit from many improvements,
300
- including:
301
-
302
- * Summary of changes in plain text using Generative AI, useful for long documents (e.g. legal);
303
- * Depicting changes to an image;
304
- * Element-by-element changes of JSON or XML data;
305
- * Much better `documentation <https://webchanges.readthedocs.io/>`__, easing implementation;
306
- * Much clearer to HTML reports, which include:
307
-
308
- * Links that are `clickable <https://pypi.org/project/webchanges/>`__!
309
- * Retaining of original formatting such as **bolding / headers**, *italics*, :underline:`underlining`, list bullets
310
- (•) and indentation;
311
- * Lines that are :additions:`added` and :deletions:`deleted` are clearly highlighted by color and strikethrough,
312
- and long lines wrap around;
313
- * Correct rendering by email clients who override stylesheets (e.g. Gmail);
314
- * Other legibility improvements;
315
-
316
- * New filters such as `additions_only <https://webchanges.readthedocs.io/en/stable/diff_filters.html#additions-only>`__,
317
- which makes it easier to track content that was added without the distractions of the content that was deleted;
318
- * New command line arguments, such as ``--errors`` (to catch jobs that no longer work);
319
- * More reliability and stability, including a ~30 percentage point increase in testing coverage;
320
- * Many other additions, refinements and fixes (see `detailed information
321
- <https://webchanges.readthedocs.io/en/stable/migration.html#upgrade-details>`__).
291
+ <https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f>`__ dated 30 July 2020.
292
+
293
+ You can easily upgrade to **webchanges** from the current version of **urlwatch** using the same job and
294
+ configuration files (see `here <https://webchanges.readthedocs.io/en/stable/upgrading.html>`__) and benefit from many
295
+ improvements, including:
296
+
297
+ * :underline:`AI-Powered Summaries`: Summary of changes in plain text using generative AI, useful for long documents
298
+ (e.g. legal);
299
+ * :underline:`Image Change Detection`: Monitor changes to images and receive notifications with an image highlighting
300
+ the differences;
301
+ * :underline:`Structured Data Monitoring`: Track changes in JSON or XML data on an element-by-element basis;
302
+ * :underline:`Improved Documentation`: We've revamped the `documentation <https://webchanges.readthedocs.io/>`__ to make
303
+ implementation easier;
304
+ * :underline:`Enhanced HTML Reports`: HTML reports are now much clearer and include:
305
+
306
+ * Clickable links!
307
+ * Retention of most original formatting (**bolding / headers**, *italics*, :underline:`underlining`, lists with
308
+ bullets (•), and indentation;
309
+ * :additions:`added` and :deletions:`deleted` lines clearly highlighted with color and strikethrough;
310
+ * Wrapping of long lines (instead of truncation);
311
+ * Improved compatibility with a wider range of HTML email clients, including those that override stylesheets (e.g.,
312
+ Gmail);
313
+ * General legibility improvements.
314
+
315
+ * :underline:`New Filtering Options`: New filters, like `additions_only
316
+ <https://webchanges.readthedocs.io/en/stable/diff_filters.html#additions-only>`__, which allows you to focus on
317
+ added content without the distraction of deletions;
318
+ * :underline:`New Command Line Arguments`: New command-line arguments such as ``--errors``, which helps you identify
319
+ jobs that are no longer functioning correctly;
320
+ * :underline:`Increased Reliability and Stability`: Testing coverage has increased by approximately 30 percentage
321
+ points;
322
+ * :underline:`Additional Enhancements`: Numerous other additions, refinements, and bug fixes have been implemented.
323
+ For more information, see `here <https://webchanges.readthedocs.io/en/stable/migration.html#upgrade-details>`__.
322
324
 
323
325
  Example enhancements to HTML reporting:
324
326
 
@@ -9,22 +9,18 @@
9
9
  webchanges |downloads|
10
10
  ======================
11
11
 
12
- **webchanges** checks web content including images, and notifies you via email (or one of many other `supported
13
- services <https://webchanges.readthedocs.io/en/stable/introduction.html#reporters-list>`__) if a change is detected.
14
- **webchanges** can also check the output of local commands. The notification includes a detail of what has changed
15
- ("diff"), with an optional summary generated by AI (BETA).
16
-
17
- **webchanges** *anonymously* alerts you of web changes.
18
-
12
+ **webchanges** *anonymously* checks web content (including images) and commands for changes, delivering instant
13
+ notifications and AI-powered summaries to your favorite `platform
14
+ <https://webchanges.readthedocs.io/en/stable/introduction.html#reporters-list>`__.
19
15
 
20
16
 
21
17
  Requirements
22
18
  ============
23
19
  **webchanges** requires |support|.
24
20
 
25
- You should use the latest version of `Python <https://www.python.org/downloads/>`__ if possible, but older
26
- Python versions are supported for 3 years after being obsoleted by a new major release (3.x). For each major release,
27
- only the latest bug and security fix version (3.x.y) is supported.
21
+ For the best experience, use the current version of `Python <https://www.python.org/downloads/>`__. We also support
22
+ older Python versions for 3 years after they're replaced by a newer one; we just ask that you use the most up-to-date
23
+ bug and security fix release from that older version.
28
24
 
29
25
  For Generative AI summaries (BETA), you need a free `API Key from Google Cloud AI Studio
30
26
  <https://aistudio.google.com/app/apikey>`__ (see `here
@@ -39,11 +35,10 @@ Install **webchanges** |pypi_version| |format| |status| |security| with:
39
35
 
40
36
  pip install webchanges
41
37
 
42
-
43
38
  Running in Docker
44
- =================
45
- **webchanges** can be run in a `Docker <https://www.docker.com/>`__ container; please see `here
46
- <https://github.com/yubiuser/webchanges-docker>`__ for one such implementation.
39
+ -----------------
40
+ **webchanges** can easily run in a container; you can find a `Docker <https://www.docker.com/>`__ implementation
41
+ `here <https://github.com/yubiuser/webchanges-docker>`__.
47
42
 
48
43
 
49
44
  Documentation |readthedocs|
@@ -63,7 +58,6 @@ Initialize
63
58
 
64
59
  webchanges --edit
65
60
 
66
-
67
61
  #. Run the following command to change the default `configuration
68
62
  <https://webchanges.readthedocs.io/en/stable/configuration.html>`__, e.g. to receive change notifications
69
63
  ("`reports <https://webchanges.readthedocs.io/en/stable/reporters.html>`__")
@@ -73,26 +67,27 @@ Initialize
73
67
 
74
68
  webchanges --edit-config
75
69
 
76
-
77
70
  Run
78
71
  ---
79
- To check the sources in your jobs and report on (e.g. display or via email) any changes found from the previous
80
- execution, just run:
72
+ To check the sources in your jobs and report on (e.g. display or via email) any changes found from the last time the
73
+ program ran, just run:
81
74
 
82
75
  .. code-block:: bash
83
76
 
84
77
  webchanges
85
78
 
86
- **webchanges** does not include a scheduler. We recommend using a system scheduler to automatically run it
87
- periodically:
88
79
 
89
- - On Linux or macOS, you can use cron (if you have never used cron before, see
90
- `here <https://www.computerhope.com/unix/ucrontab.htm>`__); `crontab.guru <https://crontab.guru>`__ will build a
91
- schedule expression for you;
92
- - On macOS, you can use `launchd <https://developer.apple
93
- .com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/ScheduledJobs.html>`__;
94
- - On Windows, you can use the built-in `Windows Task Scheduler
95
- <https://en.wikipedia.org/wiki/Windows_Task_Scheduler>`__.
80
+ Schedule
81
+ --------
82
+ **webchanges** leverages the power of a system scheduler:
83
+
84
+ - On Linux you can use cron, and a tool like `crontab.guru <https://crontab.guru>`__ can build a
85
+ schedule expression for you (note: see `here <https://www.computerhope.com/unix/ucrontab.htm>`__ if you have never
86
+ used cron before);
87
+ - On Windows you can use `Windows Task Scheduler <https://en.wikipedia.org/wiki/Windows_Task_Scheduler>`__;
88
+ - On macOS you can use `launchd <https://developer.apple
89
+ .com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/ScheduledJobs.html>`__ (note: see `here
90
+ <https://launchd.info/>`__ if you have never used launchd before).
96
91
 
97
92
 
98
93
  Code
@@ -116,42 +111,50 @@ License
116
111
  =======
117
112
  |license|
118
113
 
119
- Released under the `MIT License <https://opensource.org/licenses/MIT>`__ but redistributing modified source code from
120
- `urlwatch 2.21 <https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f>`__ dated 30 July 2020
114
+ See the `complete licenses <https://raw.githubusercontent.com/mborsetti/webchanges/refs/heads/main/LICENSE>`__ (released
115
+ under the `MIT License <https://opensource.org/licenses/MIT>`__ but redistributing modified source code, dated 30
116
+ July 2020, from `urlwatch 2.21 <https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f>`__
121
117
  licensed under a `BSD 3-Clause License
122
- <https://raw.githubusercontent.com/thp/urlwatch/346b25914b0418342ffe2fb0529bed702fddc01f/COPYING>`__. See the complete
123
- license `here <https://github.com/mborsetti/webchanges/blob/main/LICENSE>`__.
118
+ <https://raw.githubusercontent.com/thp/urlwatch/346b25914b0418342ffe2fb0529bed702fddc01f/COPYING>`__).
124
119
 
125
120
 
126
121
  Compatibility with and improvements from **urlwatch**
127
122
  =====================================================
128
123
 
129
124
  This project is based on code from `urlwatch 2.21
130
- <https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f>`__ dated 30 July 2020. You can
131
- easily upgrade to **webchanges** from the current version of **urlwatch** using the same job and configuration files
132
- (see `here <https://webchanges.readthedocs.io/en/stable/migration.html>`__) and benefit from many improvements,
133
- including:
134
-
135
- * Summary of changes in plain text using Generative AI, useful for long documents (e.g. legal);
136
- * Depicting changes to an image;
137
- * Element-by-element changes of JSON or XML data;
138
- * Much better `documentation <https://webchanges.readthedocs.io/>`__, easing implementation;
139
- * Much clearer to HTML reports, which include:
140
-
141
- * Links that are `clickable <https://pypi.org/project/webchanges/>`__!
142
- * Retaining of original formatting such as **bolding / headers**, *italics*, :underline:`underlining`, list bullets
143
- (•) and indentation;
144
- * Lines that are :additions:`added` and :deletions:`deleted` are clearly highlighted by color and strikethrough,
145
- and long lines wrap around;
146
- * Correct rendering by email clients who override stylesheets (e.g. Gmail);
147
- * Other legibility improvements;
148
-
149
- * New filters such as `additions_only <https://webchanges.readthedocs.io/en/stable/diff_filters.html#additions-only>`__,
150
- which makes it easier to track content that was added without the distractions of the content that was deleted;
151
- * New command line arguments, such as ``--errors`` (to catch jobs that no longer work);
152
- * More reliability and stability, including a ~30 percentage point increase in testing coverage;
153
- * Many other additions, refinements and fixes (see `detailed information
154
- <https://webchanges.readthedocs.io/en/stable/migration.html#upgrade-details>`__).
125
+ <https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f>`__ dated 30 July 2020.
126
+
127
+ You can easily upgrade to **webchanges** from the current version of **urlwatch** using the same job and
128
+ configuration files (see `here <https://webchanges.readthedocs.io/en/stable/upgrading.html>`__) and benefit from many
129
+ improvements, including:
130
+
131
+ * :underline:`AI-Powered Summaries`: Summary of changes in plain text using generative AI, useful for long documents
132
+ (e.g. legal);
133
+ * :underline:`Image Change Detection`: Monitor changes to images and receive notifications with an image highlighting
134
+ the differences;
135
+ * :underline:`Structured Data Monitoring`: Track changes in JSON or XML data on an element-by-element basis;
136
+ * :underline:`Improved Documentation`: We've revamped the `documentation <https://webchanges.readthedocs.io/>`__ to make
137
+ implementation easier;
138
+ * :underline:`Enhanced HTML Reports`: HTML reports are now much clearer and include:
139
+
140
+ * Clickable links!
141
+ * Retention of most original formatting (**bolding / headers**, *italics*, :underline:`underlining`, lists with
142
+ bullets (•), and indentation;
143
+ * :additions:`added` and :deletions:`deleted` lines clearly highlighted with color and strikethrough;
144
+ * Wrapping of long lines (instead of truncation);
145
+ * Improved compatibility with a wider range of HTML email clients, including those that override stylesheets (e.g.,
146
+ Gmail);
147
+ * General legibility improvements.
148
+
149
+ * :underline:`New Filtering Options`: New filters, like `additions_only
150
+ <https://webchanges.readthedocs.io/en/stable/diff_filters.html#additions-only>`__, which allows you to focus on
151
+ added content without the distraction of deletions;
152
+ * :underline:`New Command Line Arguments`: New command-line arguments such as ``--errors``, which helps you identify
153
+ jobs that are no longer functioning correctly;
154
+ * :underline:`Increased Reliability and Stability`: Testing coverage has increased by approximately 30 percentage
155
+ points;
156
+ * :underline:`Additional Enhancements`: Numerous other additions, refinements, and bug fixes have been implemented.
157
+ For more information, see `here <https://webchanges.readthedocs.io/en/stable/migration.html#upgrade-details>`__.
155
158
 
156
159
  Example enhancements to HTML reporting:
157
160
 
@@ -14,10 +14,7 @@ build-backend = "setuptools.build_meta"
14
14
  # See https://packaging.python.org/en/latest/specifications/declaring-project-metadata/
15
15
  dynamic = ['version', 'dependencies']
16
16
  name = 'webchanges'
17
- description = """\
18
- Check web (or command output) for changes since last run and notify. Anonymously alerts you of web changes, with
19
- Gen AI summaries (BETA).\
20
- """
17
+ description = 'Web Changes Delivered. AI-Summarized. Totally Anonymous.'
21
18
  readme = { file = 'README.rst', content-type = 'text/x-rst' }
22
19
  requires-python = '>=3.10'
23
20
  license = {file = 'LICENSE'}
@@ -93,9 +90,8 @@ xmpp = ['aioxmpp']
93
90
  redis = ['redis']
94
91
  requests = ['requests']
95
92
  safe_password = ['keyring']
96
- zstd = ['zstandard']
97
93
  all = [
98
- 'webchanges[use_browser,beautify,bs4,html5lib,ical2text,jq,ocr,pdf2text,pypdf_crypto,deepdiff_xml,imagediff,matrix,pushbullet,pushover,xmpp,redis,requests,safe_password,zstd]'
94
+ 'webchanges[use_browser,beautify,bs4,html5lib,ical2text,jq,ocr,pdf2text,pypdf_crypto,deepdiff_xml,imagediff,matrix,pushbullet,pushover,xmpp,redis,requests,safe_password]'
99
95
  ]
100
96
 
101
97
 
@@ -177,9 +173,6 @@ namespace_packages = false
177
173
  # Specifies the Python version used to parse and check the target program.
178
174
  # python_version = 3.12
179
175
 
180
- # Shows error codes in error messages.
181
- show_error_codes = true
182
-
183
176
  # Suppresses error messages about imports that cannot be resolved.
184
177
  ignore_missing_imports = true
185
178
 
@@ -192,22 +185,25 @@ disallow_untyped_defs = true
192
185
  # Reports an error whenever a function with type annotations is decorated with a decorator without annotations.
193
186
  disallow_untyped_decorators = true
194
187
 
195
- # Changes the treatment of arguments with a default value of None by not implicitly making their type Optional.
196
- no_implicit_optional = true
197
-
198
188
  # Warns about casting an expression to its inferred type.
199
189
  warn_redundant_casts = true
200
190
 
201
191
  # Warns about unneeded # type: ignore comments.
202
- # Disabled because it behaves differently in GitHub Actions than it does on Windows.
192
+ # May behave differently in GitHub Actions than it does on Windows.
203
193
  # warn_unused_ignores = true
204
194
 
205
195
  # Shows a warning when returning a value with type Any from a function declared with a non-Any return type.
206
- # warn_return_any = true
196
+ warn_return_any = true
207
197
 
208
198
  # Shows a warning when encountering any code inferred to be unreachable or redundant after performing type analysis.
209
199
  warn_unreachable = false
210
200
 
201
+ # Enables additional checks that are technically correct but may be impractical in real code.
202
+ extra_checks = true
203
+
204
+ # Shows documentation link to corresponding error code.
205
+ show_error_code_links = true
206
+
211
207
  # Use visually nicer output in error messages: use soft word wrap, show source code snippets, and show error location
212
208
  # markers.
213
209
  pretty = true
@@ -299,6 +295,8 @@ exclude_lines = [
299
295
  # Don't cover IDE code:
300
296
  'if TYPE_CHECKING:'
301
297
  ]
298
+ # Exclude entire files if they have a custom # pragma: exclude file remark
299
+ # exclude_also = '(?s)\A.*# pragma: exclude file.*\Z'
302
300
  # ignore_errors = true
303
301
 
304
302
 
@@ -0,0 +1,12 @@
1
+ colorama; sys_platform == "win32"
2
+ cssselect
3
+ h2
4
+ html2text
5
+ httpx
6
+ lxml >= 5.3.0 # prior versions don't build in 3.13
7
+ markdown2
8
+ msgpack
9
+ platformdirs
10
+ pyyaml
11
+ tzdata; sys_platform == "win32"
12
+ zstandard
@@ -22,7 +22,7 @@ __project_name__ = __package__
22
22
  # * MINOR version when you add functionality in a backwards compatible manner, and
23
23
  # * MICRO or PATCH version when you make backwards compatible bug fixes. We no longer use '0'
24
24
  # If unsure on increments, use pkg_resources.parse_version to parse
25
- __version__ = '3.26.0'
25
+ __version__ = '3.28.0rc0'
26
26
  __description__ = (
27
27
  'Check web (or command output) for changes since last run and notify.\n'
28
28
  '\n'
@@ -208,9 +208,9 @@ class Headers(MutableMapping[str, str]):
208
208
  if not split_commas:
209
209
  return values
210
210
 
211
- split_values = []
211
+ split_values: list[str] = []
212
212
  for value in values:
213
- split_values.extend([item.strip() for item in value.split(',')])
213
+ split_values.extend((item.strip() for item in value.split(',')))
214
214
  return split_values
215
215
 
216
216
  def update(self, headers: HeaderTypes | None = None) -> None: # type: ignore[override]
@@ -78,12 +78,20 @@ def migrate_from_legacy(
78
78
  logger.warning(f"You can safely delete '{old_file}'.")
79
79
 
80
80
 
81
- def setup_logger(verbose: int | None = None) -> None:
81
+ def setup_logger(verbose: int | None = None, log_file: Path | None = None) -> None:
82
82
  """Set up the logger.
83
83
 
84
- :param verbose: the verbosity level (1 = INFO, 2 = ERROR).
84
+ :param verbose: the verbosity level (1 = INFO, 2 = ERROR, 3 = NOTSET).
85
85
  """
86
+ if log_file:
87
+ handlers: tuple[logging.Handler, ...] | None = (logging.FileHandler(log_file),)
88
+ if not verbose:
89
+ verbose = 1
90
+ else:
91
+ handlers = None
92
+
86
93
  log_level = None
94
+
87
95
  if verbose is not None:
88
96
  if verbose >= 3:
89
97
  log_level = 'NOTSET'
@@ -99,7 +107,11 @@ def setup_logger(verbose: int | None = None) -> None:
99
107
  if not verbose:
100
108
  sys.tracebacklimit = 0
101
109
 
102
- logging.basicConfig(format='%(asctime)s %(module)s[%(thread)s] %(levelname)s: %(message)s', level=log_level)
110
+ logging.basicConfig(
111
+ format='%(asctime)s %(module)s[%(thread)s] %(levelname)s: %(message)s',
112
+ level=log_level,
113
+ handlers=handlers,
114
+ )
103
115
  logger.info(f'{__project_name__}: {__version__} {__copyright__}')
104
116
  logger.info(
105
117
  f'{platform.python_implementation()}: {platform.python_version()} '
@@ -358,7 +370,7 @@ def main() -> None: # pragma: no cover
358
370
  )
359
371
 
360
372
  # Set up the logger to verbose if needed
361
- setup_logger(command_config.verbose)
373
+ setup_logger(command_config.verbose, command_config.log_file)
362
374
 
363
375
  # For speed, run these here
364
376
  handle_unitialized_actions(command_config)