webchanges 3.33.0__tar.gz → 3.34.0__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.
- {webchanges-3.33.0/webchanges.egg-info → webchanges-3.34.0}/PKG-INFO +7 -69
- {webchanges-3.33.0 → webchanges-3.34.0}/README.rst +5 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/pyproject.toml +6 -3
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/__init__.py +1 -1
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/command.py +10 -15
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/differs.py +302 -153
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/filters.py +24 -3
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/handler.py +41 -26
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/jobs.py +23 -12
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/main.py +7 -1
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/reporters.py +92 -36
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/storage.py +69 -25
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/util.py +2 -1
- {webchanges-3.33.0 → webchanges-3.34.0/webchanges.egg-info}/PKG-INFO +7 -69
- {webchanges-3.33.0 → webchanges-3.34.0}/LICENSE.md +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/MANIFEST.in +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/requirements.txt +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/setup.cfg +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/__main__.py +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/_vendored/__init__.py +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/_vendored/headers.py +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/_vendored/packaging_version.py +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/cli.py +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/config.py +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/mailer.py +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/py.typed +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/storage_minidb.py +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges/worker.py +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges.egg-info/SOURCES.txt +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges.egg-info/dependency_links.txt +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges.egg-info/entry_points.txt +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges.egg-info/requires.txt +0 -0
- {webchanges-3.33.0 → webchanges-3.34.0}/webchanges.egg-info/top_level.txt +0 -0
|
@@ -1,75 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: webchanges
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.34.0
|
|
4
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
|
-
License:
|
|
8
|
-
Licenses
|
|
9
|
-
========
|
|
10
|
-
|
|
11
|
-
The MIT License (MIT)
|
|
12
|
-
|
|
13
|
-
Copyright (c) 2020- Mike Borsetti <mike@borsetti.com>
|
|
14
|
-
|
|
15
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
16
|
-
this software and associated documentation files (the "Software"), to deal in
|
|
17
|
-
the Software without restriction, including without limitation the rights to
|
|
18
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
19
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
20
|
-
subject to the following conditions:
|
|
21
|
-
|
|
22
|
-
The above copyright notice and this permission notice shall be included in all
|
|
23
|
-
copies or substantial portions of the Software.
|
|
24
|
-
|
|
25
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
26
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
27
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
28
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
29
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
30
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
31
|
-
|
|
32
|
-
--------------------------------------------------------------------------------
|
|
33
|
-
|
|
34
|
-
SOURCE CODE REDISTRIBUTION NOTICE
|
|
35
|
-
(urlwatch by Thomas Perl)
|
|
36
|
-
|
|
37
|
-
This software redistributes source code of release 2.21, dated 30 July 2020, of
|
|
38
|
-
urlwatch
|
|
39
|
-
https://github.com/thp/urlwatch/tree/346b25914b0418342ffe2fb0529bed702fddc01f,
|
|
40
|
-
which is subject to the following copyright notice and license (from
|
|
41
|
-
https://raw.githubusercontent.com/thp/urlwatch/346b25914b0418342ffe2fb0529bed702fddc01f/COPYING),
|
|
42
|
-
hereby retained and redistributed with the source code (of which this license
|
|
43
|
-
file is part of), in binary form, and in the documentation. The appearance of
|
|
44
|
-
the name of the author below does not constitute an endorsement or promotion of
|
|
45
|
-
this software by such author.
|
|
46
|
-
|
|
47
|
-
Copyright (c) 2008-2020 Thomas Perl <m@thp.io>
|
|
48
|
-
All rights reserved.
|
|
49
|
-
|
|
50
|
-
Redistribution and use in source and binary forms, with or without
|
|
51
|
-
modification, are permitted provided that the following conditions
|
|
52
|
-
are met:
|
|
53
|
-
|
|
54
|
-
1. Redistributions of source code must retain the above copyright
|
|
55
|
-
notice, this list of conditions and the following disclaimer.
|
|
56
|
-
2. Redistributions in binary form must reproduce the above copyright
|
|
57
|
-
notice, this list of conditions and the following disclaimer in the
|
|
58
|
-
documentation and/or other materials provided with the distribution.
|
|
59
|
-
3. The name of the author may not be used to endorse or promote products
|
|
60
|
-
derived from this software without specific prior written permission.
|
|
61
|
-
|
|
62
|
-
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR
|
|
63
|
-
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
64
|
-
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
65
|
-
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
66
|
-
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
67
|
-
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
68
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
69
|
-
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
70
|
-
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
71
|
-
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
72
|
-
|
|
7
|
+
License-Expression: MIT AND BSD-3-Clause
|
|
73
8
|
Project-URL: Documentation, https://webchanges.readthedocs.io/
|
|
74
9
|
Project-URL: Repository, https://github.com/mborsetti/webchanges/
|
|
75
10
|
Project-URL: Changelog, https://webchanges.readthedocs.io/en/stable/changelog.html
|
|
@@ -81,8 +16,6 @@ Classifier: Environment :: Console
|
|
|
81
16
|
Classifier: Intended Audience :: Developers
|
|
82
17
|
Classifier: Intended Audience :: End Users/Desktop
|
|
83
18
|
Classifier: Intended Audience :: System Administrators
|
|
84
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
85
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
86
19
|
Classifier: Natural Language :: English
|
|
87
20
|
Classifier: Operating System :: OS Independent
|
|
88
21
|
Classifier: Programming Language :: Python
|
|
@@ -219,6 +152,11 @@ Running in Docker
|
|
|
219
152
|
implementation (no browser) `here <https://github.com/yubiuser/webchanges-docker>`__, and one with a browser
|
|
220
153
|
`here <https://github.com/jhedlund/webchanges-docker>`__.
|
|
221
154
|
|
|
155
|
+
As a GitHub Action
|
|
156
|
+
------------------
|
|
157
|
+
**webchanges** can easily run as a `GitHub Action <https://www.docker.com/>`__! You will find an implementation
|
|
158
|
+
`here <https://github.com/swimmwatch/webchanges-action>`__.
|
|
159
|
+
|
|
222
160
|
|
|
223
161
|
Documentation |readthedocs|
|
|
224
162
|
===========================
|
|
@@ -51,6 +51,11 @@ Running in Docker
|
|
|
51
51
|
implementation (no browser) `here <https://github.com/yubiuser/webchanges-docker>`__, and one with a browser
|
|
52
52
|
`here <https://github.com/jhedlund/webchanges-docker>`__.
|
|
53
53
|
|
|
54
|
+
As a GitHub Action
|
|
55
|
+
------------------
|
|
56
|
+
**webchanges** can easily run as a `GitHub Action <https://www.docker.com/>`__! You will find an implementation
|
|
57
|
+
`here <https://github.com/swimmwatch/webchanges-action>`__.
|
|
58
|
+
|
|
54
59
|
|
|
55
60
|
Documentation |readthedocs|
|
|
56
61
|
===========================
|
|
@@ -17,7 +17,8 @@ name = 'webchanges'
|
|
|
17
17
|
description = 'Web Changes Delivered. AI-Summarized. Totally Anonymous.'
|
|
18
18
|
readme = { file = 'README.rst', content-type = 'text/x-rst' }
|
|
19
19
|
requires-python = '>=3.11'
|
|
20
|
-
license =
|
|
20
|
+
license = "MIT AND BSD-3-Clause"
|
|
21
|
+
license-files = ['LICENSE.md']
|
|
21
22
|
authors = [{ name = 'Mike Borsetti', email = 'mike+webchanges@borsetti.com' }]
|
|
22
23
|
maintainers = [
|
|
23
24
|
{ name = 'Mike Borsetti', email = 'mike+webchanges@borsetti.com' },
|
|
@@ -29,8 +30,6 @@ classifiers = [
|
|
|
29
30
|
'Intended Audience :: Developers',
|
|
30
31
|
'Intended Audience :: End Users/Desktop',
|
|
31
32
|
'Intended Audience :: System Administrators',
|
|
32
|
-
'License :: OSI Approved :: BSD License',
|
|
33
|
-
'License :: OSI Approved :: MIT License',
|
|
34
33
|
'Natural Language :: English',
|
|
35
34
|
'Operating System :: OS Independent',
|
|
36
35
|
'Programming Language :: Python',
|
|
@@ -291,6 +290,9 @@ unfixable = []
|
|
|
291
290
|
# Allow unused variables when underscore-prefixed.
|
|
292
291
|
dummy-variable-rgx = '^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$'
|
|
293
292
|
|
|
293
|
+
# List of allowed 'confusable' Unicode characters to ignore when enforcing RUF001, RUF002, and RUF003.
|
|
294
|
+
allowed-confusables = ['–', '‘', '’']
|
|
295
|
+
|
|
294
296
|
[tool.ruff.lint.flake8-annotations]
|
|
295
297
|
allow-star-arg-any = true # TODO
|
|
296
298
|
|
|
@@ -346,6 +348,7 @@ docstring-code-format = true
|
|
|
346
348
|
# enabled.
|
|
347
349
|
docstring-code-line-length = 'dynamic'
|
|
348
350
|
|
|
351
|
+
|
|
349
352
|
# -------------------------- ty --------------------------
|
|
350
353
|
# Config file documentation at https://docs.astral.sh/ty/reference/configuration/
|
|
351
354
|
|
|
@@ -22,7 +22,7 @@ __project_name__ = str(__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.
|
|
25
|
+
__version__ = '3.34.0'
|
|
26
26
|
__description__ = (
|
|
27
27
|
'Check web (or command output) for changes since last run and notify.\n\nAnonymously alerts you of web changes.'
|
|
28
28
|
)
|
|
@@ -64,9 +64,10 @@ class UrlwatchCommand:
|
|
|
64
64
|
self.urlwatcher = urlwatcher
|
|
65
65
|
self.urlwatch_config = urlwatcher.urlwatch_config
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
def _exit(arg: str | int | None) -> None:
|
|
67
|
+
def _exit(self, arg: str | int | None) -> None:
|
|
69
68
|
logger.info(f'Exiting with exit code {arg}')
|
|
69
|
+
|
|
70
|
+
self.urlwatcher.ssdb_storage.close()
|
|
70
71
|
sys.exit(arg)
|
|
71
72
|
|
|
72
73
|
def jobs_from_joblist(self) -> Iterator[JobBase]:
|
|
@@ -511,7 +512,6 @@ class UrlwatchCommand:
|
|
|
511
512
|
return
|
|
512
513
|
self.urlwatcher.urlwatch_config.joblist = set(self.urlwatcher.urlwatch_config.joblist).union(new_jobs)
|
|
513
514
|
self.urlwatcher.run_jobs()
|
|
514
|
-
self.urlwatcher.close()
|
|
515
515
|
return
|
|
516
516
|
|
|
517
517
|
def test_differ(self, arg_test_differ: list[str]) -> int:
|
|
@@ -866,7 +866,6 @@ class UrlwatchCommand:
|
|
|
866
866
|
count = self.urlwatcher.ssdb_storage.rollback(dt.timestamp())
|
|
867
867
|
if count:
|
|
868
868
|
print(f'Deleted {count} snapshots taken after {timestamp_date}.')
|
|
869
|
-
self.urlwatcher.ssdb_storage.close()
|
|
870
869
|
else:
|
|
871
870
|
print(f'No snapshots found after {timestamp_date}')
|
|
872
871
|
return 0
|
|
@@ -984,15 +983,14 @@ class UrlwatchCommand:
|
|
|
984
983
|
print('You need to set up your bot token first (see documentation).')
|
|
985
984
|
self._exit(1)
|
|
986
985
|
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
self._exit(1)
|
|
986
|
+
with httpx.Client(http2=h2 is not None) if httpx else requests.Session() as http_client:
|
|
987
|
+
info = http_client.get(f'https://api.telegram.org/bot{bot_token}/getMe', timeout=60).json()
|
|
988
|
+
if not info['ok']:
|
|
989
|
+
print(f'Error with token {bot_token}: {info["description"]}.')
|
|
990
|
+
self._exit(1)
|
|
993
991
|
|
|
994
|
-
|
|
995
|
-
|
|
992
|
+
chats = {}
|
|
993
|
+
updates = http_client.get(f'https://api.telegram.org/bot{bot_token}/getUpdates', timeout=60).json()
|
|
996
994
|
if 'result' in updates:
|
|
997
995
|
for chat_info in updates['result']:
|
|
998
996
|
chat = chat_info['message']['chat']
|
|
@@ -1301,19 +1299,16 @@ class UrlwatchCommand:
|
|
|
1301
1299
|
self.urlwatcher.ssdb_storage.gc(
|
|
1302
1300
|
[job.guid for job in self.urlwatcher.jobs], self.urlwatch_config.gc_database
|
|
1303
1301
|
)
|
|
1304
|
-
self.urlwatcher.ssdb_storage.close()
|
|
1305
1302
|
self._exit(0)
|
|
1306
1303
|
|
|
1307
1304
|
if self.urlwatch_config.clean_database:
|
|
1308
1305
|
self.urlwatcher.ssdb_storage.clean_ssdb(
|
|
1309
1306
|
[job.guid for job in self.urlwatcher.jobs], self.urlwatch_config.clean_database
|
|
1310
1307
|
)
|
|
1311
|
-
self.urlwatcher.ssdb_storage.close()
|
|
1312
1308
|
self._exit(0)
|
|
1313
1309
|
|
|
1314
1310
|
if self.urlwatch_config.rollback_database:
|
|
1315
1311
|
exit_arg = self.rollback_database(self.urlwatch_config.rollback_database)
|
|
1316
|
-
self.urlwatcher.ssdb_storage.close()
|
|
1317
1312
|
self._exit(exit_arg)
|
|
1318
1313
|
|
|
1319
1314
|
if self.urlwatch_config.delete_snapshot:
|