youpdated 0.7.0b1__tar.gz → 0.7.0b2__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 (71) hide show
  1. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/ADDING_SOURCES.md +15 -0
  2. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/CHANGELOG.md +15 -0
  3. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/CONTRIBUTING.md +16 -1
  4. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/PKG-INFO +5 -2
  5. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/README.md +1 -0
  6. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/pyproject.toml +4 -1
  7. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/__init__.py +1 -1
  8. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/api.py +185 -20
  9. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/cleanup.py +16 -2
  10. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/cli.py +272 -14
  11. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/config.py +84 -9
  12. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/edit.py +47 -9
  13. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/importers.py +13 -4
  14. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/library.py +7 -42
  15. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/models.py +77 -4
  16. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/notify.py +140 -31
  17. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/render/json_out.py +10 -1
  18. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/render/rss_out.py +4 -3
  19. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/render/targets.py +11 -1
  20. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/render/terminal.py +59 -2
  21. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/runner.py +162 -18
  22. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/base.py +20 -0
  23. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/generic.py +5 -3
  24. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/steam.py +4 -0
  25. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/youtube.py +119 -14
  26. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/state.py +152 -7
  27. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/versions.py +107 -2
  28. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated.egg-info/PKG-INFO +5 -2
  29. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated.egg-info/requires.txt +3 -0
  30. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/LICENSE +0 -0
  31. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/MANIFEST.in +0 -0
  32. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/SECURITY.md +0 -0
  33. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/setup.cfg +0 -0
  34. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/__main__.py +0 -0
  35. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/apptraces.py +0 -0
  36. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/configs.py +0 -0
  37. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/crypto.py +0 -0
  38. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/errors.py +0 -0
  39. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/http.py +0 -0
  40. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/icons.py +0 -0
  41. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/preview.py +0 -0
  42. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/py.typed +0 -0
  43. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/registry.py +0 -0
  44. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/render/__init__.py +0 -0
  45. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/__init__.py +0 -0
  46. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/appstore.py +0 -0
  47. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/browser.py +0 -0
  48. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/crates.py +0 -0
  49. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/fdroid.py +0 -0
  50. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/feed.py +0 -0
  51. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/flathub.py +0 -0
  52. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/git.py +0 -0
  53. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/go.py +0 -0
  54. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/gog.py +0 -0
  55. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/homebrew.py +0 -0
  56. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/itch.py +0 -0
  57. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/jsondoc.py +0 -0
  58. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/maven.py +0 -0
  59. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/modrinth.py +0 -0
  60. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/npm.py +0 -0
  61. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/nuget.py +0 -0
  62. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/packagist.py +0 -0
  63. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/pypi.py +0 -0
  64. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/rubygems.py +0 -0
  65. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/sparkle.py +0 -0
  66. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/webpage.py +0 -0
  67. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated/sources/winget.py +0 -0
  68. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated.egg-info/SOURCES.txt +0 -0
  69. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated.egg-info/dependency_links.txt +0 -0
  70. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated.egg-info/entry_points.txt +0 -0
  71. {youpdated-0.7.0b1 → youpdated-0.7.0b2}/youpdated.egg-info/top_level.txt +0 -0
@@ -325,6 +325,21 @@ A source that can read anything of a shape, like `webpage` reading any URL, sets
325
325
  fallback: ClassVar[bool] = True
326
326
  ```
327
327
 
328
+ A source whose items never have a version, like videos or news posts, sets `versioned` false so `check` warns when an entry gives it `versions:` or `installed:` rules, which would do nothing, and the apps hide those settings. `noun` is what one item is called, for lines like `12 new videos`; it's `update` when unset. A source whose items only sometimes have one, like `feed` reading it from a title, keeps `versioned` and leaves those items' `version` as `None`:
329
+
330
+ ```python
331
+ versioned: ClassVar[bool] = False
332
+ noun: ClassVar[str] = "video"
333
+ ```
334
+
335
+ `skip_tags` lists tags of your items commonly skipped, and the apps' Filters show a toggle for each that writes the entry's `ignore:`. Only offer a tag every fetch path sets:
336
+
337
+ ```python
338
+ skip_tags: ClassVar[tuple[str, ...]] = ("short", "upcoming")
339
+ ```
340
+
341
+ An item that isn't released yet, like a scheduled stream or an announced release, is held back until it is, then reported once (see [Upcoming items](docs/configuration.md#upcoming-items)). Date it for when it goes out and the runner does the rest: anything dated in the future is upcoming. When the site says an item is upcoming but not when (YouTube's feed dates a stream when it was scheduled), add the `upcoming` tag, and the item is upcoming until a fetch lists it without the tag.
342
+
328
343
  A value that's plainly yours but names nothing to watch (a GitHub account's page for the git source) can be refused: raise `ConfigEntryError` from `claim()` with what to do instead. Unless another source claims the value, that message is the error, so a fallback doesn't take it:
329
344
 
330
345
  ```python
@@ -6,14 +6,29 @@ All notable changes to this project are documented here. The format follows [Kee
6
6
 
7
7
  ### Added
8
8
 
9
+ - **Better handling of sources without versions** (#106): YouTube videos, Steam news, and feed posts.
10
+ - `titles: {match: [...], ignore: [...]}` on an entry filters by title, with the same patterns as `versions: {match:}`, in any case.
11
+ - `versions: {from: title}` reads a version from each title or `from: 'Flight (\d+)'` with a pattern you set, so `bump:`, `min:`, `match:`, and `installed:` work on a channel's or game's posts.
12
+ - `check` warns when `versions:` or `installed:` is set on a `youtube` or `steam` entry without `from:`, as every item passes them.
13
+ - Five or more new items without versions from one entry show as one line, `12 new videos, newest: ...`, in the terminal (`-v` lists each) and in Discord, Slack, and ntfy. `json` webhooks and commands still get every item.
14
+ - When five or more items come back and all of them are new, `check` notes that older ones may be missing, since a source lists only its newest (15 for a channel's feed). `--json` lists those targets in `gaps`.
15
+ - A YouTube channel's `include: [videos, shorts, live]` watches only those kinds of upload, through YouTube's own filtered playlists, so it's the same whether the official feed, Invidious, or the Data API answers. A playlist of a channel's uploads (`UU...`) is now read newest first, like the channel.
16
+ - YouTube videos are also tagged `short` (from the official feed, or any path with `include: shorts`), and `live` or `upcoming` (from Invidious), so `ignore: [short]` works when the feed answers.
17
+ - The apps' `targets.list` and `targets.preview` have `versioned`, and `targets.list` has `noun`. On Mac and Windows, a channel or Steam game no longer offers version rules in **Filters…** or **Installed Version…** unless its entry reads versions with `from:`, even in Add before its first fetch, and Following shows its latest video's or post's title under its name.
18
+ - **Filters…** in the apps has toggles for the tags a source offers to skip: **Skip Shorts** and **Hide upcoming items** for a YouTube channel, and **Hide upcoming items** for a Steam game or feed. Each writes the entry's `ignore:`. `filters.get` has `skip_tags`, and `filters.set` takes them.
19
+ - For source plugins: optional `versioned`, `noun`, and `skip_tags` class attributes, see [ADDING_SOURCES.md](ADDING_SOURCES.md).
20
+ - **Upcoming items.** An item that isn't released yet (a scheduled stream or premiere, posts dated in the future, announced releases, etc.) is no longer reported when it's found, or recorded as seen, and is reported once it's released. Everything dated more than 10 minutes ahead counts. A YouTube video the channel's feed lists with no views is considered a scheduled stream or premiere, and an Invidious premiere is dated when it starts. Each is tagged `upcoming`, and `ignore: [upcoming]` hides them. `settings.notify_upcoming: true` also reports each one when it's first found: in its own panel in the terminal, under `upcoming` in `--json`, as `Upcoming: ...` in `--rss`, Discord, Slack, and ntfy, and to `json` webhooks and commands. The Mac and Windows apps list them in an **Upcoming** section above the updates, with when each is due. New engine op `upcoming.list`. `newer()` leaves out an announced release. See [Upcoming items](docs/configuration.md#upcoming-items).
9
21
  - **13 new sources!** Package registries: `crates` (crates.io), `go` (the Go module proxy), `rubygems`, `packagist`, `nuget`, and `maven` (Maven Central, or any repository with `repository:`). Apps: `sparkle` (a Mac app's Sparkle appcast), `appstore` (Apple's App Store, by app number or bundle id, with `country:`), `flathub`, `fdroid`, and `winget`. Games: `gog` (a game's builds, by product id; `add` looks up a store page's id) and `modrinth` (with `loaders:` and `game_versions:`). Each one's pages are recognized by `youpdated add`, so a bare word such as `express` now lists more sources to pick from. An `.xml` URL with `appcast` or `sparkle` in its path, or one with a final section containing `appcast`, is added as `sparkle`, not `feed`. See [Identifier details](docs/configuration.md#identifier-details).
10
22
  - **`youpdated list` command** (#82). Lists watched targets with the latest known version from history, not fetches. An item without a version shows a title, and a `bump:` target shows its highest release. `TEXT` and `-s` to specify, `--sort name|newest` to order, and `--json` output gives the fields of the app's `targets.list` with `stale` and `highest`. A target is flagged `⚠ failing` when its last check failed and it hasn't fetched cleanly in 12 hours. See [the command reference](docs/usage.md#command-reference).
11
23
  - **Webhook and command edit support in the apps** (#83). **Settings → Notifications** on Mac and Windows can add, edit, and remove `settings.notify` webhooks (URL, format, headers, priorities, and if it waits for the digest) and commands. **Send test** sends an example update before it is saved. The config is edited in place: only the changed option is rewritten, and a webhook with default options is written as its bare URL. A webhook on **Automatic** keeps following its URL, and a chosen format stays chosen even when it matches the guess. New engine ops `notify.get`, `notify.set`, and `notify.test`, and error code `notify_failed`.
12
24
  - **`youpdated add` can now look up further information to find a source.** For a web page or YouTube video it asks before fetching, then shows what it found with the newest item. A page that links a feed offers it, so a blog, Mastodon profile, or Bluesky profile becomes a `feed`, and a page naming a version lists both to pick from. A YouTube video, `youtu.be`, Shorts, or live link adds the channel's `@handle`. Refusing the fetch adds the page as given. Everything else is added as normal, with nothing sent. `-y`/`--yes` fetches without asking and takes the best match, and `--no-check` adds a page as given without asking. Without a terminal, nothing is fetched unless `-y` is passed. The apps' preview (`targets.preview`) does the same lookups and returns the best match's `source` and `entry`. See [the command reference](docs/usage.md#command-reference).
25
+ - **Engine clients are told apart.** The engine now keeps the `client.name` a client sends in `hello`. `status` and `list --json` have a new `last_run_client` field: when `last_run_by` is `app`, it names the client whose check ran last, so a third client such as another app can tell its own checks apart. `last_run_by` keeps its values, so released apps aren't affected. The macOS app also now reads a `last_run_by` value it doesn't know instead of failing.
13
26
  - **SteamDB pages** (`steamdb.info/app/413150`) are added as their Steam app id.
14
27
  - **Library API.** Youpdated can now be used from Python without the CLI, a config file, or a data directory. The names in `youpdated.__all__` are the library API and follow semver from v1.0.0: `parse_config()`/`load_config()`, `State`, `Client`, `run()`, `Update`, the source registry, the helpers for writing a source (`entry_fields()`, `require()`, `parse_iso()`, `url_parts()`, `parse_feed()`, `Fetched`), and the error types, which share the base `YoupdatedError`. Everything else is internal, and a history file written by any 1.x opens in every later 1.x. `youpdated.newer("pypi", "myapp", current="1.2.0")` lists newer releases in one call with no history or baseline, honoring `versions:` rules, so a program can check for its own releases. `Client(product="MyApp/1.2")` puts the program's own token before Youpdated's in the User-Agent. Nothing is read, written, or printed unless asked, and requests are logged to the `youpdated` logger. With a proxy set, `run()` and `newer()` raise `ProxyUnavailable` before any request when it can't be reached. `newer()` raises `FetchError` for any failed fetch, including an answer the source can't read. See [Library](docs/library.md).
15
28
  - **Multiple configs** (#84). `youpdated init NAME` creates a named config with its own sources, settings, history, and, optionally, its own passphrase, kept entirely separated from the others. Pick one with `-c NAME` on `check`, `list`, `add`, `rm`, `import`, `edit`, `encrypt`, and `decrypt`, or with `$YOUPDATED_CONFIG`. `youpdated configs` lists them, `configs rm NAME` deletes one and its history, and `check --all-configs` checks the default and then every named config in order. An encrypted named config reads `$YOUPDATED_PASSPHRASE_<NAME>` before `$YOUPDATED_PASSPHRASE`. The desktop apps only use the default config. See [Multiple configs](docs/configuration.md#multiple-configs).
16
29
  - **Remove Youpdated from this Mac** (Settings → Advanced), same as the Windows app's Remove Youpdated from this PC. It turns off Start at login, clears notifications, the saved passphrase, and the app's settings, caches, and log, and can delete your config and history too. Then it quits, or moves the app to the Trash and quits.
30
+ - **`youpdated scan`** (#78). Finds installed sources and adds them to the config: Steam games in every library, Homebrew formulae and casks, programs winget can identify, Flatpak apps from Flathub, Python apps from pipx and uv, global npm packages, `cargo install` and `go install` programs, .NET global tools, Chrome, Brave, Firefox, and Edge, macOS apps from the App Store or with a Sparkle feed, and Electron apps that update from GitHub releases. `--only` picks scanners, and `--test` shows the change without writing. It's local only: it reads files and runs `brew`, `flatpak`, `pipx`, `uv`, `npm`, `dotnet`, and `mdls` with their update checks and telemetry turned off, and nothing is fetched. Scanning is an optional package and isn't part of the default install: `pipx install 'youpdated[scanning]'`. `youpdated uninstall` also removes it. On macOS, a Steam library on another drive or in Desktop, Documents, Downloads, or iCloud Drive is skipped with a warning since macOS wants a permission prompt before the terminal can read it; `scan --only steam` reads it. A feed a Mac app saved to its own settings with a query string or a user name, which can be a license or install id, is skipped with a warning instead of copied into the config, and a plain `http://` feed is flagged. Apps Setapp installed are skipped with a warning, since Setapp updates them itself. A scanner can find an entry with fields, like `{browser: chrome, channel: beta}`, as well as a bare one. See [the command reference](docs/usage.md#command-reference).
31
+ - **Installed version tracking** (#78). An entry's `installed: "5.1.4"` says which version you have: only later releases are reported, and a new entry's first check will report a new release past that. Set it with `youpdated installed pypi django 5.1.4` (`--clear` to remove), or `youpdated add pypi django --installed 5.1.4`. `youpdated scan` writes the versions it reads, and keeps them current on entries that already have one. `list` shows `5.1.4 → 5.2.0` when a later release is out, and its `--json` and the apps' `targets.list` have `installed` and `update_available`. New engine op `installed.set`. On Mac and Windows, Following shows `5.1.4 → 5.2.0` when a later release is out, and **Installed Version…** in an item's menu sets or clears it. Notification commands get `{installed}` beside `{version}` (and `$YOUPDATED_INSTALLED`), and a command's stdin and `json` webhooks get an `installed` field. Discord, Slack, and ntfy add `(installed 5.1.4)` to the update's line. A webhook's `show_installed: false` leaves it out, set from the apps' webhook editor too. The engine's `targets.add` takes an `installed` version for its one entry and writes both together. See [Installed versions](docs/configuration.md#installed-versions).
17
32
 
18
33
  ### Changed
19
34
 
@@ -66,6 +66,8 @@ curl -s https://example.com/api/thing -o tests/fixtures/thing.json
66
66
 
67
67
  Trim large fixtures to the part that matters.
68
68
 
69
+ The scanners in [scanning/](scanning/) have their own suite, run against captured listings, manifests, and plists in [scanning/tests/fixtures/](scanning/tests/fixtures/): `pip install --no-deps ./scanning`, then `python -m pytest scanning/tests`. CI runs that suite, and the `youpdated scan` smoke test, only on PRs and pushes that change `scanning/` or the youpdated code it relies on, listed in [tests.yml](.github/workflows/tests.yml) (scheduled and release runs always include it). Trim captures to a few generic entries before committing.
70
+
69
71
  ## Adding a source
70
72
 
71
73
  Read [ADDING_SOURCES.md](ADDING_SOURCES.md), it builds a complete working source.
@@ -102,7 +104,20 @@ Publishing is done by [.github/workflows/release.yml](.github/workflows/release.
102
104
  gh release create v0.4.0 --verify-tag --notes-from-tag
103
105
  ```
104
106
 
105
- A beta uses PEP 440's spelling in `pyproject.toml`, `__version__`, and the tag alike (`0.7.0b1`, tagged `v0.7.0b1`), because `release.yml` compares the tag to `pyproject.toml` as text. Add `--prerelease` to `gh release create`: it still goes to PyPI, where pip and pipx skip it unless asked with `--pre`.
107
+ ### youpdated-scanning
108
+
109
+ [scanning/](scanning/) is its own PyPI package, `youpdated-scanning`, with its own version in `scanning/pyproject.toml` and `__version__` in `scanning/youpdated_scanning/__init__.py`. [.github/workflows/scanning-release.yml](.github/workflows/scanning-release.yml) publishes it from a GitHub Release tagged `scanning-v<version>`. Its wheel is installed with `youpdated` from PyPI before uploading, so release the `youpdated` version required first.
110
+
111
+ ```sh
112
+ git tag -s scanning-v0.1.0 -m "youpdated-scanning 0.1.0"
113
+ git verify-tag scanning-v0.1.0
114
+ git push origin scanning-v0.1.0
115
+ gh release create scanning-v0.1.0 --verify-tag --notes-from-tag --latest=false
116
+ ```
117
+
118
+ `--latest=false` keeps the CLI's release as the repo's latest. The `pypi` environment has to allow `scanning-v*` tags, and PyPI needs a trusted publisher for `youpdated-scanning` naming `scanning-release.yml` and the `pypi` environment.
119
+
120
+ For both packages, a beta uses PEP 440's spelling in `pyproject.toml`, `__version__`, and the tag (`0.7.0b1`, tagged `v0.7.0b1`), because `release.yml` compares the tag to `pyproject.toml` as text. Add `--prerelease` to `gh release create`: it will still go to PyPI, where pip and pipx skip it unless asked with `--pre`.
106
121
 
107
122
  ## Style
108
123
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: youpdated
3
- Version: 0.7.0b1
3
+ Version: 0.7.0b2
4
4
  Summary: Simple update tracker for games, apps, and packages
5
5
  Author-email: Void1-1 <161782542+Void1-1@users.noreply.github.com>
6
6
  License-Expression: MIT
@@ -8,7 +8,7 @@ Project-URL: Homepage, https://github.com/Void1-1/youpdated
8
8
  Project-URL: Repository, https://github.com/Void1-1/youpdated
9
9
  Project-URL: Issues, https://github.com/Void1-1/youpdated/issues
10
10
  Project-URL: Changelog, https://github.com/Void1-1/youpdated/blob/main/CHANGELOG.md
11
- Keywords: updates,release-tracking,scraper,rss,privacy,steam,itch,npm,pypi,github,gitlab,forgejo,youtube,notifications,cli
11
+ Keywords: updates,release-tracking,scraper,rss,privacy,steam,itch,npm,pypi,github,gitlab,forgejo,youtube,notifications,cli,youpdated
12
12
  Classifier: Development Status :: 4 - Beta
13
13
  Classifier: Environment :: Console
14
14
  Classifier: Intended Audience :: End Users/Desktop
@@ -35,6 +35,8 @@ Requires-Dist: PyYAML>=6.0
35
35
  Requires-Dist: platformdirs>=4.0
36
36
  Provides-Extra: encryption
37
37
  Requires-Dist: cryptography>=42.0; extra == "encryption"
38
+ Provides-Extra: scanning
39
+ Requires-Dist: youpdated-scanning>=0.1; extra == "scanning"
38
40
  Provides-Extra: dev
39
41
  Requires-Dist: pytest>=8.0; extra == "dev"
40
42
  Requires-Dist: respx>=0.21; extra == "dev"
@@ -224,6 +226,7 @@ youpdated list # everything you watch and its latest version
224
226
  youpdated add npm react # start watching something
225
227
  youpdated remove npm react # stop watching it
226
228
  youpdated import Brewfile # watch everything a dependency file lists
229
+ youpdated scan --test # what's installed here that could be watched (needs youpdated[scanning])
227
230
  youpdated edit # open the config in your default editor
228
231
  youpdated uninstall # remove Youpdated and its files
229
232
  ```
@@ -177,6 +177,7 @@ youpdated list # everything you watch and its latest version
177
177
  youpdated add npm react # start watching something
178
178
  youpdated remove npm react # stop watching it
179
179
  youpdated import Brewfile # watch everything a dependency file lists
180
+ youpdated scan --test # what's installed here that could be watched (needs youpdated[scanning])
180
181
  youpdated edit # open the config in your default editor
181
182
  youpdated uninstall # remove Youpdated and its files
182
183
  ```
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "youpdated"
7
- version = "0.7.0b1"
7
+ version = "0.7.0b2"
8
8
  description = "Simple update tracker for games, apps, and packages"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -27,6 +27,7 @@ keywords = [
27
27
  "youtube",
28
28
  "notifications",
29
29
  "cli",
30
+ "youpdated",
30
31
  ]
31
32
  classifiers = [
32
33
  "Development Status :: 4 - Beta",
@@ -56,6 +57,8 @@ dependencies = [
56
57
 
57
58
  [project.optional-dependencies]
58
59
  encryption = ["cryptography>=42.0"]
60
+ # for `youpdated scan`
61
+ scanning = ["youpdated-scanning>=0.1"]
59
62
  dev = ["pytest>=8.0", "respx>=0.21", "cryptography>=42.0", "jsonschema>=4.18"]
60
63
  publish = ["build>=1.2", "twine>=5.0"]
61
64
 
@@ -6,7 +6,7 @@ They follow semantic versioning from v1.0.0. (other modules and names are intern
6
6
 
7
7
  from __future__ import annotations
8
8
 
9
- __version__ = "0.7.0b1"
9
+ __version__ = "0.7.0b2"
10
10
 
11
11
  from typing import TYPE_CHECKING, Any
12
12
 
@@ -53,6 +53,7 @@ from .edit import (
53
53
  remove_from_config,
54
54
  requested_urls,
55
55
  set_entry_rules,
56
+ set_installed,
56
57
  set_notify,
57
58
  set_privacy,
58
59
  write_config,
@@ -60,12 +61,19 @@ from .edit import (
60
61
  from .edit import watching as entries_watching
61
62
  from .http import Client, ProxyUnavailable, probe_proxy
62
63
  from .importers import READERS, Found, read_file
63
- from .models import RunError, Target, Update
64
+ from .models import RunError, Target, TitleRules, Update
64
65
  from .registry import all_aliases, all_sources, canonical_name, get_source
65
66
  from .runner import RunResult, _split_entry_rules, build_targets, record, run
66
- from .sources.base import ConfigEntryError, parse_iso
67
- from .state import State, StateBusy, StateError, inbox_id, stamp
68
- from .versions import ANY_BUMP, BUMPS, VersionRules, format_release, suggest_patterns
67
+ from .sources.base import ConfigEntryError, is_versioned, item_noun, parse_iso, skip_tags
68
+ from .state import LAST_RUN_CLIENT, State, StateBusy, StateError, inbox_id, stamp, upcoming_id
69
+ from .versions import (
70
+ ANY_BUMP,
71
+ BUMPS,
72
+ VersionRules,
73
+ format_release,
74
+ newer_than,
75
+ suggest_patterns,
76
+ )
69
77
 
70
78
  CONTRACT = 1
71
79
 
@@ -78,6 +86,7 @@ OPS = (
78
86
  "inbox.mark",
79
87
  "inbox.snooze",
80
88
  "inbox.delete",
89
+ "upcoming.list",
81
90
  "targets.list",
82
91
  "targets.preview",
83
92
  "targets.add",
@@ -92,6 +101,7 @@ OPS = (
92
101
  "notify.set",
93
102
  "notify.test",
94
103
  "priority.set",
104
+ "installed.set",
95
105
  "filters.get",
96
106
  "filters.set",
97
107
  "filters.preview",
@@ -324,7 +334,10 @@ def target_rows(targets: list[Target], state: State) -> list[dict[str, Any]]:
324
334
  baselines = state.cache_items("baseline")
325
335
  unread = state.inbox_unread_by_target()
326
336
  latest = state.latest()
337
+ # what a `bump:` target shows: its highest release, not its newest
338
+ tops = state.latest("top")
327
339
  problems, _ = stored_problems(state)
340
+ sources = all_sources()
328
341
  listed = []
329
342
  seen: set[Key] = set()
330
343
  for t in targets:
@@ -353,10 +366,25 @@ def target_rows(targets: list[Target], state: State) -> list[dict[str, Any]]:
353
366
  "last_error": error,
354
367
  "unread": unread.get(key, 0),
355
368
  "latest": latest.get(key),
369
+ "installed": t.versions.installed,
370
+ "update_available": update_available(
371
+ t.versions.installed, latest.get(key), tops.get(key) if t.versions.bump else None
372
+ ),
373
+ # Videos and news posts: no version filters or `installed:`, unless `from:` reads
374
+ # versions from their titles
375
+ "versioned": is_versioned(sources.get(t.source)) or t.versions.read_from is not None,
376
+ "noun": item_noun(sources.get(t.source)),
356
377
  })
357
378
  return listed
358
379
 
359
380
 
381
+ def update_available(installed: str | None, *items: dict[str, Any] | None) -> bool:
382
+ """If any of a target's recorded ``items`` (``{version, ...}``) is a later release than ``installed``"""
383
+ if installed is None:
384
+ return False
385
+ return any(item is not None and newer_than(item.get("version"), installed) for item in items)
386
+
387
+
360
388
  def _problem(error: RunError) -> dict[str, str | None]:
361
389
  kind = "notify" if error.source == "notify" else "config" if error.target == "-" else "source"
362
390
  return {
@@ -369,7 +397,7 @@ def _problem(error: RunError) -> dict[str, str | None]:
369
397
 
370
398
 
371
399
  def _update(row: dict[str, Any]) -> Update:
372
- """An inbox item as the update to notify about"""
400
+ """An inbox or upcoming item as the update to notify about"""
373
401
  return Update(
374
402
  source=row["source"],
375
403
  target=row["target"],
@@ -393,6 +421,8 @@ class _Filters:
393
421
  base_ignore: frozenset[str]
394
422
  own: dict[str, Any]
395
423
  base: dict[str, Any]
424
+ # Tags the source offers to skip, see sources.base.skip_tags
425
+ offered: tuple[str, ...] = ()
396
426
 
397
427
  def reply(self) -> dict[str, Any]:
398
428
  rules = VersionRules.from_parts({**self.base, **self.own})
@@ -401,6 +431,10 @@ class _Filters:
401
431
  "match": [] if rules.match == ("*",) else list(rules.match),
402
432
  "skip_prereleases": "prerelease" in ignored,
403
433
  "skip_prereleases_inherited": "prerelease" in self.base_ignore,
434
+ "skip_tags": [
435
+ {"tag": tag, "skipped": tag in ignored, "inherited": tag in self.base_ignore}
436
+ for tag in self.offered
437
+ ],
404
438
  "bump": rules.bump or ANY_BUMP,
405
439
  "min": format_release(rules.min) if rules.min and rules.min != (0,) else None,
406
440
  "editable": self.locked is None,
@@ -438,6 +472,8 @@ class Engine:
438
472
  self.emit = emit or (lambda event: None)
439
473
  self.lock_timeout = lock_timeout
440
474
  self._passphrase: str | None = None
475
+ # `hello`'s client name, recorded with the checks it runs
476
+ self._client: str | None = None
441
477
  # versions `filters.preview` had a source list, by target, with when
442
478
  self._listed: dict[Key, tuple[float, list[Update]]] = {}
443
479
  # running check's history, other ops share until closed
@@ -628,6 +664,29 @@ class Engine:
628
664
  "snoozed_until": snoozed if snoozed and snoozed > now else None,
629
665
  }
630
666
 
667
+ def _upcoming(self, state: State) -> list[dict[str, Any]]:
668
+ priorities = state.priorities()
669
+ items = []
670
+ for row in state.upcoming():
671
+ key = (row["source"], row["target"])
672
+ items.append({
673
+ "id": row["id"],
674
+ "source": row["source"],
675
+ "target": row["target"],
676
+ "display": row["label"],
677
+ "title": row["title"],
678
+ "url": row["url"],
679
+ "version": row["version"],
680
+ "published": row["published"],
681
+ "due": row["due"],
682
+ "tags": json.loads(row["tags"]),
683
+ "body": row["body"],
684
+ "found_at": row["found_at"],
685
+ "priority": priorities.get(key, "normal"),
686
+ "starred": _starred(*key),
687
+ })
688
+ return items
689
+
631
690
  def _items(self, state: State, rows: list[dict[str, Any]]) -> list[dict[str, Any]]:
632
691
  priorities = state.priorities()
633
692
  snoozes = state.cache_items("app", "snooze:")
@@ -643,6 +702,7 @@ class Engine:
643
702
  isinstance(client.get(k), str) for k in ("name", "version", "platform")
644
703
  ):
645
704
  raise _bad("`client` needs `name`, `version`, and `platform`")
705
+ self._client = (client["name"].strip() or None) if client is not None else None
646
706
  return {
647
707
  "engine": __version__,
648
708
  "contract": CONTRACT,
@@ -682,6 +742,7 @@ class Engine:
682
742
  "history_path": str(self.state_path),
683
743
  "last_run": None,
684
744
  "last_run_by": None,
745
+ "last_run_client": None,
685
746
  "self_watch": None,
686
747
  "counts": None,
687
748
  "named_user_agent": None,
@@ -700,12 +761,15 @@ class Engine:
700
761
  with self._history(config) as state:
701
762
  last_run = state.last_run()
702
763
  by = state.cache_get("app", "last_run_by")
764
+ client_name = state.cache_get(*LAST_RUN_CLIENT)
703
765
  settings = self._settings(state)
704
766
  unread = state.inbox_unread()
705
767
  problems = len(self._problems(state)[0])
706
768
  confirmed = state.cache_get(*NAMED_UA_CONFIRMED) is not None
707
769
  reply["last_run"] = stamp(last_run) if last_run else None
708
770
  reply["last_run_by"] = by if by in ("app", "cli") else None
771
+ # Left over from an earlier engine check when the CLI or a library ran last
772
+ reply["last_run_client"] = client_name if by == "app" else None
709
773
  if config is not None:
710
774
  targets, _ = build_targets(config)
711
775
  keys = {(t.source, t.key.lower()) for t in targets}
@@ -804,6 +868,10 @@ class Engine:
804
868
  progress=_Progress(self.emit),
805
869
  )
806
870
  record(state, result, by="app")
871
+ if self._client is not None:
872
+ state.cache_set(*LAST_RUN_CLIENT, self._client)
873
+ else:
874
+ state.cache_delete(LAST_RUN_CLIENT[0], [LAST_RUN_CLIENT[1]])
807
875
  reply = self._file(state, config, client, result, send, full=not (sources or only))
808
876
  if self._settings(state)["show_icons"]:
809
877
  due = self._icons_due(state, result.targets)
@@ -857,12 +925,17 @@ class Engine:
857
925
  desktop = notify.Rules() if settings["os_notifications"] else None
858
926
  # Held for a digest that's been turned off: send now
859
927
  released = state.inbox_held() if send and digest is None else []
928
+ released_upcoming = state.upcoming_held() if send and digest is None else []
860
929
  late = [_update(row) for row in released]
861
- labels = {**{(row["source"], row["target"]): row["label"] for row in released}, **labels}
930
+ late_upcoming = [_update(row) for row in released_upcoming]
931
+ labels = {
932
+ **{(row["source"], row["target"]): row["label"] for row in [*released, *released_upcoming]},
933
+ **labels,
934
+ }
862
935
  alerts: list[dict[str, Any]] = []
863
936
  failures: list[RunError] = []
864
937
  held = 0
865
- if send and (added or released):
938
+ if send and (added or released or result.announced or released_upcoming):
866
939
  endpoints: list[notify.Endpoint] = [*config.notify.webhooks, *config.notify.commands]
867
940
  if desktop is not None:
868
941
  endpoints.append(desktop)
@@ -878,6 +951,18 @@ class Engine:
878
951
  held = len(holding)
879
952
  state.inbox_set_notified((inbox_id(*u.dedupe_key) for u in holding), notified=False)
880
953
  state.inbox_set_notified(row["id"] for row in released)
954
+ # An upcoming item's notice waits for the digest the same way
955
+ state.upcoming_hold(
956
+ upcoming_id(*u.dedupe_key) for u in result.announced
957
+ if digest is not None
958
+ and notify.priority_of(u, priorities) != "high"
959
+ and any(
960
+ e.digest and notify.receives(e, notify.priority_of(u, priorities))
961
+ for e in [*config.notify.webhooks, *config.notify.commands]
962
+ )
963
+ )
964
+ if digest is None:
965
+ state.upcoming_release_held()
881
966
  if desktop is not None:
882
967
  unread_late = [u for u, row in zip(late, released) if row["read_at"] is None]
883
968
  alerts = _alerts(
@@ -886,10 +971,19 @@ class Engine:
886
971
  priorities,
887
972
  labels,
888
973
  )
974
+ installed = notify.installed_versions(
975
+ build_targets(config)[0] if late or late_upcoming else result.targets
976
+ )
889
977
  # save first
890
978
  state.flush()
891
- failures = notify.send(added, labels, config.notify, client, priorities, digest=digest)
892
- failures += notify.send(late, labels, config.notify, client, priorities, digest="send")
979
+ failures = notify.send(
980
+ added + result.announced, labels, config.notify, client, priorities, digest=digest,
981
+ installed=installed,
982
+ )
983
+ failures += notify.send(
984
+ late + late_upcoming, labels, config.notify, client, priorities, digest="send",
985
+ installed=installed,
986
+ )
893
987
 
894
988
  checked_at = stamp()
895
989
  problems = [_problem(e) for e in [*result.errors, *failures]]
@@ -987,6 +1081,11 @@ class Engine:
987
1081
  deleted = state.inbox_delete(ids)
988
1082
  return {"deleted": deleted, "unread": state.inbox_unread()}
989
1083
 
1084
+ def op_upcoming_list(self, p: _Params) -> dict[str, Any]:
1085
+ p.done()
1086
+ with self._history() as state:
1087
+ return {"items": self._upcoming(state)}
1088
+
990
1089
  def op_targets_list(self, p: _Params) -> dict[str, Any]:
991
1090
  p.done()
992
1091
  config = self._config()
@@ -1055,6 +1154,7 @@ class Engine:
1055
1154
  "already_watching": watching,
1056
1155
  "newest": newest,
1057
1156
  "fetch_error": best.error,
1157
+ "versioned": is_versioned(get_source(best.source)),
1058
1158
  }
1059
1159
 
1060
1160
  def _placed(self, value: str, picked: str | None) -> tuple[str, str]:
@@ -1085,12 +1185,16 @@ class Engine:
1085
1185
  def op_targets_add(self, p: _Params) -> dict[str, Any]:
1086
1186
  source = p.get("source", "str", required=True)
1087
1187
  entries = p.get("entries", "strings", required=True)
1188
+ installed = p.get("installed", "str?")
1088
1189
  p.done()
1089
1190
  if not entries:
1090
1191
  raise _bad("`entries` must not be empty")
1091
1192
  handler = get_source(source)
1092
1193
  if handler is None:
1093
1194
  raise _bad(f"unknown source `{source}`")
1195
+ installed = installed.strip() if installed is not None else None
1196
+ if installed and len(entries) != 1:
1197
+ raise _bad("`installed` is the version of one entry; add the others separately")
1094
1198
  refs = []
1095
1199
  for entry in entries:
1096
1200
  try:
@@ -1099,8 +1203,15 @@ class Engine:
1099
1203
  raise ApiError("bad_entry", str(exc)) from exc
1100
1204
  path, text = self._config_text()
1101
1205
  change = add_to_config(text, source, entries)
1102
- if change.applied:
1103
- self._write_config(path, change.text)
1206
+ edited = change.text
1207
+ if installed and refs[0]:
1208
+ # also when it's already watched, like `add --installed`, and in the same write
1209
+ try:
1210
+ edited = set_installed(edited, source, refs[0][0]["key"], installed).text
1211
+ except ConfigError as exc:
1212
+ raise _bad(str(exc)) from exc
1213
+ if edited != text:
1214
+ self._write_config(path, edited)
1104
1215
  applied = {e.strip() for e in change.applied}
1105
1216
  return {
1106
1217
  "section": change.section,
@@ -1356,6 +1467,7 @@ class Engine:
1356
1467
  "headers": [{"name": k, "value": v} for k, v in hook.headers.items()],
1357
1468
  "priority": hook.priority,
1358
1469
  "digest": hook.digest,
1470
+ "show_installed": hook.show_installed,
1359
1471
  }
1360
1472
  for hook in config.notify.webhooks
1361
1473
  ],
@@ -1376,7 +1488,31 @@ class Engine:
1376
1488
  state.set_priority(canonical_name(source), key, priority)
1377
1489
  return {"priority": priority}
1378
1490
 
1379
- # filters: an entry's `ignore: [prerelease]` and `versions:`
1491
+ def op_installed_set(self, p: _Params) -> dict[str, Any]:
1492
+ name, key = self._watched(p)
1493
+ version = p.get("version", "str?", required=True)
1494
+ p.done()
1495
+ version = version.strip() if version is not None else None
1496
+ path, text = self._config_text()
1497
+ if not entries_watching(text, name, key):
1498
+ raise ApiError("not_found", f"not watching {key} under {name}")
1499
+ try:
1500
+ change = set_installed(text, name, key, version or None)
1501
+ except ConfigError as exc:
1502
+ raise _bad(str(exc)) from exc
1503
+ if change.applied:
1504
+ self._write_config(path, change.text)
1505
+ config = self._config()
1506
+ targets, _ = build_targets(config)
1507
+ with self._history(config) as state:
1508
+ row = next(
1509
+ (r for r in target_rows(targets, state) if (r["source"], r["key"]) == (name, key)), None
1510
+ )
1511
+ if row is None:
1512
+ raise ApiError("not_found", f"not watching {key} under {name}")
1513
+ return {"installed": row["installed"], "update_available": row["update_available"]}
1514
+
1515
+ # filters: an entry's `ignore:` (prereleases and the source's `skip_tags`) and `versions:`
1380
1516
 
1381
1517
  def _watched(self, p: _Params) -> Key:
1382
1518
  source = p.get("source", "str", required=True)
@@ -1397,7 +1533,7 @@ class Engine:
1397
1533
  locked = "It's listed multiple times in the config, so its filters are edited there."
1398
1534
  elif len(hit.keys) > 1:
1399
1535
  locked = "Its config entry follows other items too, so its filters are edited there."
1400
- _, own, _ = _split_entry_rules(hit.entry, hit.section)
1536
+ _, own, _, _, _ = _split_entry_rules(hit.entry, hit.section)
1401
1537
  listed = hit.entry.get("ignore") if isinstance(hit.entry, dict) else None
1402
1538
  # as build_targets gives them to the entry
1403
1539
  names = tuple(dict.fromkeys((name, hit.section)))
@@ -1407,6 +1543,7 @@ class Engine:
1407
1543
  base_ignore=frozenset().union(*(config.ignored_tags(n) for n in names)),
1408
1544
  own=own,
1409
1545
  base=config.version_rules(*names),
1546
+ offered=skip_tags(get_source(name)),
1410
1547
  )
1411
1548
 
1412
1549
  def op_filters_get(self, p: _Params) -> dict[str, Any]:
@@ -1420,11 +1557,20 @@ class Engine:
1420
1557
  skip = p.get("skip_prereleases", "bool", required=True)
1421
1558
  bump = p.get("bump", "str", required=True)
1422
1559
  lowest = (p.get("min", "str?") or "").strip()
1560
+ skipped = p.get("skip_tags", "strings")
1423
1561
  p.done()
1424
1562
  _check_bump(bump)
1425
1563
  filters = self._filters(name, key)
1426
1564
  if filters.locked is not None:
1427
1565
  raise _bad(filters.locked)
1566
+ if skipped is not None:
1567
+ skipped = {tag.strip().lower() for tag in skipped}
1568
+ unknown = skipped - set(filters.offered)
1569
+ if unknown:
1570
+ raise _bad(
1571
+ f"`skip_tags` can't skip {', '.join(sorted(unknown))}; this source offers "
1572
+ f"{', '.join(filters.offered) or 'none'}"
1573
+ )
1428
1574
  base = filters.base
1429
1575
  # Only what's different from the source rules
1430
1576
  own: dict[str, Any] = {}
@@ -1439,15 +1585,22 @@ class Engine:
1439
1585
  own["min"] = lowest
1440
1586
  elif base.get("min", (0,)) != (0,):
1441
1587
  own["min"] = 0
1588
+ if "from" in filters.own:
1589
+ # The app doesn't edit `from:`
1590
+ own["from"] = filters.own["from"]
1442
1591
  try:
1443
1592
  parsed = parse_version_rules(own, "", "filters")
1444
1593
  except ConfigError as exc:
1445
1594
  raise _bad(str(exc)) from exc
1446
1595
  if lowest and parsed["min"] == base.get("min"):
1447
1596
  del own["min"]
1448
- ignore = [tag for tag in filters.own_ignore if tag.strip().lower() != "prerelease"]
1597
+ toggled = {"prerelease", *(filters.offered if skipped is not None else ())}
1598
+ ignore = [tag for tag in filters.own_ignore if tag.strip().lower() not in toggled]
1449
1599
  if skip and "prerelease" not in filters.base_ignore:
1450
1600
  ignore.append("prerelease")
1601
+ for tag in filters.offered:
1602
+ if skipped is not None and tag in skipped and tag not in filters.base_ignore:
1603
+ ignore.append(tag)
1451
1604
  path, text = self._config_text()
1452
1605
  change = set_entry_rules(text, name, key, {"ignore": ignore, "versions": own})
1453
1606
  if change.applied:
@@ -1464,11 +1617,17 @@ class Engine:
1464
1617
  target = next((t for t in configured if (t.source, t.key) == (name, key)), None)
1465
1618
  if target is None:
1466
1619
  raise ApiError("not_found", f"not watching {key} under {name}")
1467
- plain = replace(target, ignore=frozenset(), versions=VersionRules(), track_latest=False)
1620
+ plain = replace(
1621
+ target,
1622
+ ignore=frozenset(),
1623
+ versions=VersionRules(read_from=target.versions.read_from),
1624
+ titles=TitleRules(),
1625
+ track_latest=False,
1626
+ )
1468
1627
  self._require_named_ua_confirmed(config)
1469
1628
  try:
1470
1629
  with Client(config.privacy) as client:
1471
- items = list(all_sources()[name].fetch(plain, client))
1630
+ items = plain.versions.read(list(all_sources()[name].fetch(plain, client)))
1472
1631
  except Exception as exc:
1473
1632
  return [], f"{type(exc).__name__}: {exc}"
1474
1633
  versions = list({u.version: u for u in reversed(items) if u.version}.values())[::-1]
@@ -1581,12 +1740,14 @@ class Engine:
1581
1740
  self._require_named_ua_confirmed(config)
1582
1741
  with self._history(config) as state:
1583
1742
  rows = state.inbox_held()
1584
- if not rows:
1743
+ upcoming = state.upcoming_held()
1744
+ state.upcoming_release_held()
1745
+ if not rows and not upcoming:
1585
1746
  return {"items": [], "alerts": [], "notify_failures": []}
1586
1747
  settings = self._settings(state)
1587
1748
  priorities = state.priorities()
1588
- updates = [_update(row) for row in rows]
1589
- labels = {(row["source"], row["target"]): row["label"] for row in rows}
1749
+ updates = [_update(row) for row in [*rows, *upcoming]]
1750
+ labels = {(row["source"], row["target"]): row["label"] for row in [*rows, *upcoming]}
1590
1751
  state.inbox_set_notified(row["id"] for row in rows)
1591
1752
  alerts: list[dict[str, Any]] = []
1592
1753
  if settings["os_notifications"]:
@@ -1596,9 +1757,11 @@ class Engine:
1596
1757
  alerts = [{"priority": "normal", "target": None, "item_ids": _ids(wanted)}]
1597
1758
  # save first
1598
1759
  state.flush()
1760
+ installed = notify.installed_versions(build_targets(config)[0])
1599
1761
  with Client(config.privacy, state) as client:
1600
1762
  failures = notify.send(
1601
- updates, labels, config.notify, client, priorities, digest="send"
1763
+ updates, labels, config.notify, client, priorities, digest="send",
1764
+ installed=installed,
1602
1765
  )
1603
1766
  if failures:
1604
1767
  problems, checked_at = self._problems(state)
@@ -1714,6 +1877,8 @@ def _webhook_yaml(hook: Webhook) -> str | dict[str, Any]:
1714
1877
  written["priority"] = hook.priority
1715
1878
  if not hook.digest:
1716
1879
  written["digest"] = False
1880
+ if not hook.show_installed:
1881
+ written["show_installed"] = False
1717
1882
  return hook.url if len(written) == 1 else written
1718
1883
 
1719
1884