youpdated 0.6.0__tar.gz → 0.7.0b1__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.
- {youpdated-0.6.0 → youpdated-0.7.0b1}/ADDING_SOURCES.md +46 -12
- {youpdated-0.6.0 → youpdated-0.7.0b1}/CHANGELOG.md +32 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/CONTRIBUTING.md +7 -3
- {youpdated-0.6.0 → youpdated-0.7.0b1}/PKG-INFO +34 -3
- {youpdated-0.6.0 → youpdated-0.7.0b1}/README.md +33 -2
- {youpdated-0.6.0 → youpdated-0.7.0b1}/pyproject.toml +1 -1
- youpdated-0.7.0b1/youpdated/__init__.py +102 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/api.py +301 -115
- youpdated-0.7.0b1/youpdated/apptraces.py +381 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/cleanup.py +69 -18
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/cli.py +813 -64
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/config.py +145 -26
- youpdated-0.7.0b1/youpdated/configs.py +99 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/crypto.py +24 -8
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/edit.py +178 -37
- youpdated-0.7.0b1/youpdated/errors.py +7 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/http.py +63 -11
- youpdated-0.7.0b1/youpdated/library.py +197 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/models.py +4 -3
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/notify.py +20 -13
- youpdated-0.7.0b1/youpdated/preview.py +113 -0
- youpdated-0.7.0b1/youpdated/render/targets.py +158 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/runner.py +54 -11
- youpdated-0.7.0b1/youpdated/sources/__init__.py +13 -0
- youpdated-0.7.0b1/youpdated/sources/appstore.py +111 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/sources/base.py +49 -2
- youpdated-0.7.0b1/youpdated/sources/crates.py +93 -0
- youpdated-0.7.0b1/youpdated/sources/fdroid.py +86 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/sources/feed.py +9 -1
- youpdated-0.7.0b1/youpdated/sources/flathub.py +107 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/sources/generic.py +3 -2
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/sources/git.py +38 -3
- youpdated-0.7.0b1/youpdated/sources/go.py +148 -0
- youpdated-0.7.0b1/youpdated/sources/gog.py +151 -0
- youpdated-0.7.0b1/youpdated/sources/maven.py +139 -0
- youpdated-0.7.0b1/youpdated/sources/modrinth.py +135 -0
- youpdated-0.7.0b1/youpdated/sources/nuget.py +115 -0
- youpdated-0.7.0b1/youpdated/sources/packagist.py +109 -0
- youpdated-0.7.0b1/youpdated/sources/rubygems.py +93 -0
- youpdated-0.7.0b1/youpdated/sources/sparkle.py +150 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/sources/steam.py +4 -4
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/sources/webpage.py +27 -2
- youpdated-0.7.0b1/youpdated/sources/winget.py +116 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/sources/youtube.py +53 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/state.py +90 -11
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated.egg-info/PKG-INFO +34 -3
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated.egg-info/SOURCES.txt +19 -0
- youpdated-0.6.0/youpdated/__init__.py +0 -3
- youpdated-0.6.0/youpdated/sources/__init__.py +0 -10
- {youpdated-0.6.0 → youpdated-0.7.0b1}/LICENSE +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/MANIFEST.in +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/SECURITY.md +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/setup.cfg +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/__main__.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/icons.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/importers.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/py.typed +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/registry.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/render/__init__.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/render/json_out.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/render/rss_out.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/render/terminal.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/sources/browser.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/sources/homebrew.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/sources/itch.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/sources/jsondoc.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/sources/npm.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/sources/pypi.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated/versions.py +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated.egg-info/dependency_links.txt +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated.egg-info/entry_points.txt +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated.egg-info/requires.txt +0 -0
- {youpdated-0.6.0 → youpdated-0.7.0b1}/youpdated.egg-info/top_level.txt +0 -0
|
@@ -34,6 +34,8 @@ class Source(Protocol):
|
|
|
34
34
|
|
|
35
35
|
The split matters: `targets()` is pure config parsing and never touches the network, so `youpdated check --test` can validate a config without sending a request. `fetch()` does the network work and is called once per target, possibly on several threads at once.
|
|
36
36
|
|
|
37
|
+
Import everything a source needs from `youpdated` itself. That contract (`name`, `summary`, `targets()`, `fetch()`, `caches`, `shared_caches`, the `Client.get()` arguments, and the helpers shown) follows semver from v1.0.0, so a plugin keeps working through every 1.x release. The hooks for `youpdated add` under [Recognizing your entries](#recognizing-your-entries) and [Values only a fetch can place](#values-only-a-fetch-can-place) are newer and may still change in a minor release. See [what the library promises](docs/library.md#what-you-can-rely-on).
|
|
38
|
+
|
|
37
39
|
## Two ways to add one
|
|
38
40
|
|
|
39
41
|
**In-tree** for a source you want in the project itself:
|
|
@@ -61,8 +63,7 @@ sources:
|
|
|
61
63
|
`entry_fields()` collapses both into a dict, so you never branch on the shape yourself:
|
|
62
64
|
|
|
63
65
|
```python
|
|
64
|
-
from youpdated
|
|
65
|
-
from youpdated.sources.base import ConfigEntryError, entry_fields, require
|
|
66
|
+
from youpdated import ConfigEntryError, Target, entry_fields, require
|
|
66
67
|
|
|
67
68
|
|
|
68
69
|
def targets(self, entries: list[Any]) -> list[Target]:
|
|
@@ -79,7 +80,7 @@ def targets(self, entries: list[Any]) -> list[Target]:
|
|
|
79
80
|
return targets
|
|
80
81
|
```
|
|
81
82
|
|
|
82
|
-
A `Target` has four fields
|
|
83
|
+
A `Target` has four fields you set, by keyword like every field of `Target` and `Update`:
|
|
83
84
|
|
|
84
85
|
| Field | Purpose |
|
|
85
86
|
| --- | --- |
|
|
@@ -119,7 +120,7 @@ Any other non-200 raises `FetchError`, which the runner catches and reports with
|
|
|
119
120
|
If the feed is RSS or Atom, don't parse it yourself:
|
|
120
121
|
|
|
121
122
|
```python
|
|
122
|
-
from youpdated
|
|
123
|
+
from youpdated import parse_feed
|
|
123
124
|
|
|
124
125
|
return parse_feed(fetched.content, source=self.name, target=target.key, tags=("release",))
|
|
125
126
|
```
|
|
@@ -138,10 +139,16 @@ from __future__ import annotations
|
|
|
138
139
|
from datetime import datetime, timezone
|
|
139
140
|
from typing import Any, ClassVar, Iterable
|
|
140
141
|
|
|
141
|
-
from youpdated
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
from youpdated import (
|
|
143
|
+
Client,
|
|
144
|
+
ConfigEntryError,
|
|
145
|
+
Target,
|
|
146
|
+
Update,
|
|
147
|
+
entry_fields,
|
|
148
|
+
parse_iso,
|
|
149
|
+
register,
|
|
150
|
+
require,
|
|
151
|
+
)
|
|
145
152
|
|
|
146
153
|
MAX_VERSIONS = 10
|
|
147
154
|
|
|
@@ -278,7 +285,7 @@ if cached is None:
|
|
|
278
285
|
client.state.cache_set("my_namespace", key, cached)
|
|
279
286
|
```
|
|
280
287
|
|
|
281
|
-
`client.state` may be `None`
|
|
288
|
+
`client.state` may be `None`: [`newer()`](docs/library.md) and in-memory library use fetch without history, so a source must still work without its cache.
|
|
282
289
|
|
|
283
290
|
If the key is the target's `key`, list the namespace on the source so `youpdated rm --wipe` forgets it with the rest of the target's history:
|
|
284
291
|
|
|
@@ -294,10 +301,13 @@ shared_caches: ClassVar[tuple[str, ...]] = ("my_shared_namespace",)
|
|
|
294
301
|
|
|
295
302
|
### Recognizing your entries
|
|
296
303
|
|
|
297
|
-
`youpdated add <value>` works without a source when only one source claims the value. To use, add an optional `claim()` returning the config entry for a value that can only be yours, or `None`. `accepted()` returns the entry if your `targets()` reads it, and `url_parts()` splits a URL
|
|
304
|
+
`youpdated add <value>` works without a source when only one source claims the value. To use, add an optional `claim()` returning the config entry for a value that can only be yours, or `None`. `accepted()` returns the entry if your `targets()` reads it, and `url_parts()` splits a URL.
|
|
305
|
+
|
|
306
|
+
These hooks, and the ones in the next section, serve `youpdated add` and the apps' preview. They may still change in a minor release, so `accepted()` lives with them in `youpdated.sources.base` rather than in `youpdated`. A plugin that uses them should pin a compatible range, like `youpdated>=1.2,<1.3`:
|
|
298
307
|
|
|
299
308
|
```python
|
|
300
|
-
from
|
|
309
|
+
from youpdated import url_parts
|
|
310
|
+
from youpdated.sources.base import accepted
|
|
301
311
|
|
|
302
312
|
def claim(self, value: str) -> str | None:
|
|
303
313
|
"""A project page on pypi.org"""
|
|
@@ -315,6 +325,29 @@ A source that can read anything of a shape, like `webpage` reading any URL, sets
|
|
|
315
325
|
fallback: ClassVar[bool] = True
|
|
316
326
|
```
|
|
317
327
|
|
|
328
|
+
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
|
+
|
|
330
|
+
```python
|
|
331
|
+
if account is not None:
|
|
332
|
+
raise ConfigEntryError(f"`{value}` is the page of {name} on {host}, not a repo. ...")
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Values only a fetch can place
|
|
336
|
+
|
|
337
|
+
Some values point at what to watch without naming it: a YouTube video's channel is only on the video's page. `resolves()` says if a value is one of these, without the network, and `resolve()` fetches through the client and returns `(entry, why)`. `youpdated add` and the apps' preview call it before any claim, and show `why` with what was found. Raise `FetchError` if it can't be found:
|
|
338
|
+
|
|
339
|
+
```python
|
|
340
|
+
def resolves(self, value: str) -> bool:
|
|
341
|
+
return _video_url_id(value) is not None
|
|
342
|
+
|
|
343
|
+
def resolve(self, value: str, client: Client) -> tuple[str, str]:
|
|
344
|
+
fetched = client.get(f"https://www.youtube.com/watch?v={_video_url_id(value)}")
|
|
345
|
+
...
|
|
346
|
+
return handle, "the video's channel"
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
A fallback can also offer other sources' entries in its place, after it fetches: `instead(target, client)` returns `(source, entry, why)` tuples, like the feed a page links. Within one lookup the client reuses what it fetched, so the source's own `fetch()` doesn't send the request twice. When your entry fails and an offered one works, only the working ones are offered.
|
|
350
|
+
|
|
318
351
|
### Thread
|
|
319
352
|
|
|
320
353
|
Targets are fetched concurrently. Keep everything in local variables or on the `Target`; don't mutate shared state on the source instance.
|
|
@@ -335,7 +368,7 @@ Then test against it. The `client` fixture from [tests/conftest.py](tests/confte
|
|
|
335
368
|
import httpx
|
|
336
369
|
import respx
|
|
337
370
|
|
|
338
|
-
from youpdated
|
|
371
|
+
from youpdated import get_source
|
|
339
372
|
from .conftest import fixture
|
|
340
373
|
|
|
341
374
|
|
|
@@ -408,5 +441,6 @@ Users then configure it like any built-in source. A plugin that fails to import
|
|
|
408
441
|
- [ ] `tags` describe the update type, so `ignore:` rules can match them
|
|
409
442
|
- [ ] `version` is set on items that are versions, so `versions:` rules can compare them
|
|
410
443
|
- [ ] Tests cover parsing, both config shapes, and uid stability
|
|
444
|
+
- [ ] Imports only from `youpdated` (besides `claim()` helpers)
|
|
411
445
|
- [ ] Optional: `claim()` for values only this source can mean, `caches` for namespaces keyed by target
|
|
412
446
|
- [ ] Registered: `@register` plus an import, or an entry point
|
|
@@ -4,6 +4,38 @@ All notable changes to this project are documented here. The format follows [Kee
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- **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
|
+
- **`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
|
+
- **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
|
+
- **`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).
|
|
13
|
+
- **SteamDB pages** (`steamdb.info/app/413150`) are added as their Steam app id.
|
|
14
|
+
- **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
|
+
- **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
|
+
- **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.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **`youpdated uninstall` also removes desktop app files.** On Mac, app settings, caches, diagnostic log, and the passphrase in your keychain; on Windows, the app's settings and log, Start menu shortcut, starting at sign-in, `youpdated://` links, notification registration and icon, and the passphrase in Credential Manager. The app itself is left in place, and `uninstall` prints its location. `--keep-app` skips all of it. See [Uninstalling](docs/troubleshooting.md#uninstalling).
|
|
21
|
+
- **`Client()` and `PrivacyConfig()` name Youpdated in the User-Agent by default**, same as `user_agent: youpdated`, and configs parsed through the library default to it. The CLI, the engine, and the apps still default to `rotate`. `import youpdated` is now lazy and no longer loads the rest of the package.
|
|
22
|
+
- **For source plugins: import from `youpdated` itself.** `Target`, `Update`, `RunError`, and `PrivacyConfig` now take keyword arguments only, and `ProxyUnavailable` is now a `FetchError`. [ADDING_SOURCES.md](ADDING_SOURCES.md) shows the imports, and which hooks may still change.
|
|
23
|
+
- **Opening encrypted history without a passphrase says one is required**, as an encryption error, instead of calling the file not a history database.
|
|
24
|
+
- **New setups store the config in `configs/default.yaml` and history in `history/default-state.sqlite3`**, beside every named config. An existing `config.yaml` and `state.sqlite3` keep working in the old location, and nothing moves on its own. `youpdated configs migrate` moves them to the updated location. If you use the apps, wait for an app release with this version first.
|
|
25
|
+
- **`youpdated init` writes a shorter config** instead of the full example. Now only each section's header, the basic privacy settings at their defaults, and an example commented-out GitHub entry for Youpdated. It watches nothing until you `add` something. A `sources:` section holding only comments now counts as empty rather than missing, and `edit` saves a config that watches nothing without confirmation.
|
|
26
|
+
- **`-c` accepts a config's name as well as a path.** A value with no `/`, `\`, or `.` is a name. An extensionless file passed as `-c myconf` still works when no config has that name.
|
|
27
|
+
- **`youpdated add` now confirms the source of a single word or number.** `440` shows `source detected: steam` and asks `Add it? [Y/n]`, so a number another source also uses for ids can't land under the wrong one. A word several sources read (`express`) lists them to pick from instead of being refused. `-y`, `--no-check`, and runs without a terminal take the only source detected without asking, and refuse a word several sources read.
|
|
28
|
+
- **Addresses with nothing to watch are refused with alternatives**, by `add` and the apps' preview (`bad_entry`): an account or organization page on GitHub, GitLab, or Codeberg, and Reddit, which tends to refuse automated readers. `youpdated add feed` still adds a Reddit feed when named.
|
|
29
|
+
- **A `steam` entry must be a whole app id or an `app/<id>` link.**
|
|
30
|
+
- **Untitled feed items are titled by their text**, up to 80 characters, instead of "(untitled)". Items already seen aren't reported again.
|
|
31
|
+
- **`github.com/neovim` is no longer read as repo `neovim` with owner `github.com`**, and an address on a file or site host with a forge in its name (`raw.githubusercontent.com`, `*.github.io`, `*.gitlab.io`, `gist.github.com`) isn't considered a repo anymore. A `.json` file on `raw.githubusercontent.com` goes under `json`.
|
|
32
|
+
- **A clearer Mac installer.** The Mac app's `.dmg` now opens to a proper window (unlike the old Apple default one) with the steps for opening it the first time because it isn't notarized.
|
|
33
|
+
- **Checks remember more (for `list`).** Each check now records which targets failed, the item behind a `bump:` target's highest release, and the CLI now keeps the names sources resolve.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- **MacOS notification settings** now correctly check actual notification access through System Settings.
|
|
38
|
+
|
|
7
39
|
## [0.6.0] — 2026-11-14
|
|
8
40
|
|
|
9
41
|
### Added
|
|
@@ -7,9 +7,9 @@ Thanks for looking. This is a small project with a few constraints.
|
|
|
7
7
|
These are the reasons the tool exists, so a change that breaks one needs a strong argument:
|
|
8
8
|
|
|
9
9
|
1. **No accounts, no required API keys.** Every source works unauthenticated. Keys are read from the environment when present, only to raise rate limits, and are never written to disk.
|
|
10
|
-
2. **Nothing leaves the machine** except requests to the sources the user configured. No telemetry, no crash reporting, no update checks for Youpdated itself.
|
|
10
|
+
2. **Nothing leaves the machine** except requests to the sources the user configured. No telemetry, no crash reporting, no update checks for Youpdated itself. Youpdated never checks for *its own* updates on its own initiative. A program using it [as a library](docs/library.md) that asks it to check that program's own releases has configured that source itself, so that's allowed.
|
|
11
11
|
3. **One HTTP path.** Every request goes through `client.get()` in [youpdated/http.py](youpdated/http.py).
|
|
12
|
-
4. **Files stay in the platform's config and data directories.** Nowhere else.
|
|
12
|
+
4. **Files stay in the platform's config and data directories.** Nowhere else. As a library, Youpdated reads and writes only the paths the calling program gives it, and nothing when it gives none.
|
|
13
13
|
|
|
14
14
|
## Setting up
|
|
15
15
|
|
|
@@ -52,7 +52,9 @@ git push -u origin my-change
|
|
|
52
52
|
gh pr create --fill
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
CI runs the suite on Linux, macOS, and Windows across Python 3.11–3.14. All 13 jobs must be green, and the branch must be up to date with `main`. No review approvals are required.
|
|
55
|
+
CI runs the suite on Linux, macOS, and Windows across Python 3.11–3.14. All 13 jobs must be green, along with the `skip-actions label` check, and the branch must be up to date with `main`. No review approvals are required.
|
|
56
|
+
|
|
57
|
+
To open a PR before it's ready without running CI on every push, add the `skip-actions` label. CI is skipped while it's on, and the PR can't be merged. Remove the label to run CI.
|
|
56
58
|
|
|
57
59
|
## Tests
|
|
58
60
|
|
|
@@ -100,6 +102,8 @@ Publishing is done by [.github/workflows/release.yml](.github/workflows/release.
|
|
|
100
102
|
gh release create v0.4.0 --verify-tag --notes-from-tag
|
|
101
103
|
```
|
|
102
104
|
|
|
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`.
|
|
106
|
+
|
|
103
107
|
## Style
|
|
104
108
|
|
|
105
109
|
Match the surrounding code rather than a style guide, but generally:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: youpdated
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0b1
|
|
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
|
|
@@ -68,6 +68,7 @@ Dynamic: license-file
|
|
|
68
68
|
<a href="#sources">Sources</a> ·
|
|
69
69
|
<a href="https://github.com/Void1-1/youpdated/blob/main/docs/macos-app.md">Youpdated MacOS App (beta)</a> ·
|
|
70
70
|
<a href="https://github.com/Void1-1/youpdated/blob/main/docs/windows-app.md">Youpdated Windows App (beta)</a> ·
|
|
71
|
+
<a href="https://github.com/Void1-1/youpdated/blob/main/CHANGELOG.md">Changelog</a> ·
|
|
71
72
|
<a href="#learn-more">Docs</a>
|
|
72
73
|
</p>
|
|
73
74
|
|
|
@@ -92,8 +93,21 @@ Dynamic: license-file
|
|
|
92
93
|
| `npm` | New versions of a JavaScript package |
|
|
93
94
|
| `homebrew` | New versions of a Homebrew formula or cask |
|
|
94
95
|
| `pypi` | New releases of a Python package, and if it's archived or deprecated |
|
|
96
|
+
| `crates` | New releases of a Rust crate on crates.io |
|
|
97
|
+
| `go` | New versions of a Go module |
|
|
98
|
+
| `rubygems` | New releases of a Ruby gem |
|
|
99
|
+
| `packagist` | New releases of a PHP package on Packagist |
|
|
100
|
+
| `nuget` | New releases of a NuGet (.NET) package |
|
|
101
|
+
| `maven` | New versions of a Maven artifact, on Maven Central or another repository |
|
|
102
|
+
| `sparkle` | New releases of a Mac app, from its Sparkle appcast used to check updates |
|
|
103
|
+
| `appstore` | New versions of an Apple App Store app |
|
|
104
|
+
| `flathub` | New releases of a Linux app on Flathub |
|
|
105
|
+
| `fdroid` | New versions of an Android app on F-Droid |
|
|
106
|
+
| `winget` | New versions of a Windows Package Manager package |
|
|
95
107
|
| `steam` | Patch notes and news for a game |
|
|
96
108
|
| `itch` | Devlog posts and new builds of an itch.io game |
|
|
109
|
+
| `gog` | New builds of a GOG game |
|
|
110
|
+
| `modrinth` | New versions of a Minecraft mod, plugin, or pack on Modrinth |
|
|
97
111
|
| `youtube` | New videos on a channel or playlist |
|
|
98
112
|
| `browser` | New Chrome, Brave, Firefox, and Edge releases |
|
|
99
113
|
| `feed` | Anything else with an RSS or Atom feed |
|
|
@@ -104,6 +118,8 @@ Dynamic: license-file
|
|
|
104
118
|
|
|
105
119
|
Want an app version? [Youpdated for Mac](https://github.com/Void1-1/youpdated/blob/main/docs/macos-app.md) and [Youpdated for Windows](https://github.com/Void1-1/youpdated/blob/main/docs/windows-app.md) are in beta.
|
|
106
120
|
|
|
121
|
+
> Youpdated CLI v1.0.0 and full App releases are planned for January 1, 2027!
|
|
122
|
+
|
|
107
123
|
### 1. Install
|
|
108
124
|
|
|
109
125
|
Works on macOS, Linux, and Windows. Needs **Python 3.11 or newer** (`python3 --version` to check). Then:
|
|
@@ -127,7 +143,7 @@ youpdated --version
|
|
|
127
143
|
youpdated init
|
|
128
144
|
```
|
|
129
145
|
|
|
130
|
-
This creates a starter config
|
|
146
|
+
This creates a short starter config, with the default settings and nothing watched yet, and **prints where it was placed**.
|
|
131
147
|
|
|
132
148
|
### 3. Add sources to watch
|
|
133
149
|
|
|
@@ -139,7 +155,7 @@ youpdated add npm react
|
|
|
139
155
|
youpdated add youtube @NASA
|
|
140
156
|
```
|
|
141
157
|
|
|
142
|
-
A link or handle that can only work with one source doesn't need to be named: `youpdated add https://github.com/neovim/neovim`. An address ending `.json`, `.yml`, or `.yaml` goes under `json
|
|
158
|
+
A link or handle that can only work with one source doesn't need to be named: `youpdated add https://github.com/neovim/neovim`. An address ending `.json`, `.yml`, or `.yaml` goes under `json`. Any other web address can be fetched first, once confirmed: a page that links a feed offers it, and a YouTube video adds its channel. See [usage](docs/usage.md#command-reference).
|
|
143
159
|
|
|
144
160
|
To watch all dependencies of a project, import its `package.json`, `requirements.txt`, `pyproject.toml`, or `Brewfile`: `youpdated import package.json`.
|
|
145
161
|
|
|
@@ -174,8 +190,21 @@ youpdated check
|
|
|
174
190
|
| An npm package | `express`, `"@types/node"` | The package name on npmjs.com. **Quote names starting with `@`.** |
|
|
175
191
|
| A Homebrew formula or cask | `wget`, `cask:firefox` | The name after `brew install`. Put `cask:` in front of casks. |
|
|
176
192
|
| A PyPI package | `httpx` | The name after `pip install`. |
|
|
193
|
+
| A Rust crate | `serde` | The name on crates.io, or after `cargo add`. |
|
|
194
|
+
| A Go module | `github.com/spf13/cobra` | The path after `go get`. A `pkg.go.dev` URL also works. |
|
|
195
|
+
| A Ruby gem | `rails` | The name after `gem install`. |
|
|
196
|
+
| A PHP package | `monolog/monolog` | The `vendor/package` after `composer require`. |
|
|
197
|
+
| A NuGet package | `Newtonsoft.Json` | The id after `dotnet add package`. |
|
|
198
|
+
| A Maven artifact | `com.google.guava:guava` | `group:artifact`, as in a Gradle dependency. |
|
|
199
|
+
| A Mac app with Sparkle | `https://www.iterm2.com/appcasts/final_modern.xml` | The app's appcast URL: `defaults read /Applications/<App>.app/Contents/Info SUFeedURL`. |
|
|
200
|
+
| An App Store app | `284882215` | The number after `id` in its `apps.apple.com` URL. The URL also works. |
|
|
201
|
+
| A Flathub app | `org.mozilla.firefox` | The app id at the end of its `flathub.org/apps/` URL, or after `flatpak install`. |
|
|
202
|
+
| An F-Droid app | `org.fdroid.fdroid` | The package name at the end of its `f-droid.org/packages/` URL. |
|
|
203
|
+
| A winget package | `Mozilla.Firefox` | The id `winget search` shows. |
|
|
177
204
|
| A Steam game | `440` | The number in the store URL: `store.steampowered.com/app/`**`440`**`/Team_Fortress_2/`. The full store URL also works. |
|
|
178
205
|
| An itch.io game | `https://user.itch.io/game-name` | The game's page URL, exactly as it appears in the address bar. |
|
|
206
|
+
| A GOG game | `1207658924` | The game's product id. `youpdated add` with its store page URL looks the id up. |
|
|
207
|
+
| A Modrinth project | `sodium` | The name at the end of its `modrinth.com/mod/` URL. The URL also works. |
|
|
179
208
|
| A YouTube channel | `"@NASA"` | The `@handle` from the channel URL. **Keep the quotes with `@` characters** |
|
|
180
209
|
| A YouTube playlist | `https://www.youtube.com/playlist?list=PLxxxx` | The playlist's URL, as it appears in the address bar. `playlist: PLxxxx`, with just the `list=` section, also works. |
|
|
181
210
|
| A browser | `chrome`, `brave`, `firefox`, `edge` | Just the name. |
|
|
@@ -191,6 +220,7 @@ youpdated check --all # everything, not just what's new
|
|
|
191
220
|
youpdated check --since 7d # only things from the last week
|
|
192
221
|
youpdated check -s steam # only one source
|
|
193
222
|
youpdated check --test -v # check your config without fetching anything
|
|
223
|
+
youpdated list # everything you watch and its latest version
|
|
194
224
|
youpdated add npm react # start watching something
|
|
195
225
|
youpdated remove npm react # stop watching it
|
|
196
226
|
youpdated import Brewfile # watch everything a dependency file lists
|
|
@@ -214,4 +244,5 @@ youpdated uninstall # remove Youpdated and its files
|
|
|
214
244
|
- [Privacy](https://github.com/Void1-1/youpdated/blob/main/docs/privacy.md): proxies, Tor, and details on what information is sent where
|
|
215
245
|
- [Encryption at rest](https://github.com/Void1-1/youpdated/blob/main/docs/encryption.md): lock your config and history behind a passphrase
|
|
216
246
|
- [Troubleshooting](https://github.com/Void1-1/youpdated/blob/main/docs/troubleshooting.md): common issues, and more about uninstalling
|
|
247
|
+
- [Library](https://github.com/Void1-1/youpdated/blob/main/docs/library.md): use Youpdated from Python as a dependency tracker or to check for your own program's releases
|
|
217
248
|
- [Contributing](https://github.com/Void1-1/youpdated/blob/main/CONTRIBUTING.md): installing from source, running the tests, and [adding a source](https://github.com/Void1-1/youpdated/blob/main/ADDING_SOURCES.md)
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
<a href="#sources">Sources</a> ·
|
|
22
22
|
<a href="https://github.com/Void1-1/youpdated/blob/main/docs/macos-app.md">Youpdated MacOS App (beta)</a> ·
|
|
23
23
|
<a href="https://github.com/Void1-1/youpdated/blob/main/docs/windows-app.md">Youpdated Windows App (beta)</a> ·
|
|
24
|
+
<a href="https://github.com/Void1-1/youpdated/blob/main/CHANGELOG.md">Changelog</a> ·
|
|
24
25
|
<a href="#learn-more">Docs</a>
|
|
25
26
|
</p>
|
|
26
27
|
|
|
@@ -45,8 +46,21 @@
|
|
|
45
46
|
| `npm` | New versions of a JavaScript package |
|
|
46
47
|
| `homebrew` | New versions of a Homebrew formula or cask |
|
|
47
48
|
| `pypi` | New releases of a Python package, and if it's archived or deprecated |
|
|
49
|
+
| `crates` | New releases of a Rust crate on crates.io |
|
|
50
|
+
| `go` | New versions of a Go module |
|
|
51
|
+
| `rubygems` | New releases of a Ruby gem |
|
|
52
|
+
| `packagist` | New releases of a PHP package on Packagist |
|
|
53
|
+
| `nuget` | New releases of a NuGet (.NET) package |
|
|
54
|
+
| `maven` | New versions of a Maven artifact, on Maven Central or another repository |
|
|
55
|
+
| `sparkle` | New releases of a Mac app, from its Sparkle appcast used to check updates |
|
|
56
|
+
| `appstore` | New versions of an Apple App Store app |
|
|
57
|
+
| `flathub` | New releases of a Linux app on Flathub |
|
|
58
|
+
| `fdroid` | New versions of an Android app on F-Droid |
|
|
59
|
+
| `winget` | New versions of a Windows Package Manager package |
|
|
48
60
|
| `steam` | Patch notes and news for a game |
|
|
49
61
|
| `itch` | Devlog posts and new builds of an itch.io game |
|
|
62
|
+
| `gog` | New builds of a GOG game |
|
|
63
|
+
| `modrinth` | New versions of a Minecraft mod, plugin, or pack on Modrinth |
|
|
50
64
|
| `youtube` | New videos on a channel or playlist |
|
|
51
65
|
| `browser` | New Chrome, Brave, Firefox, and Edge releases |
|
|
52
66
|
| `feed` | Anything else with an RSS or Atom feed |
|
|
@@ -57,6 +71,8 @@
|
|
|
57
71
|
|
|
58
72
|
Want an app version? [Youpdated for Mac](https://github.com/Void1-1/youpdated/blob/main/docs/macos-app.md) and [Youpdated for Windows](https://github.com/Void1-1/youpdated/blob/main/docs/windows-app.md) are in beta.
|
|
59
73
|
|
|
74
|
+
> Youpdated CLI v1.0.0 and full App releases are planned for January 1, 2027!
|
|
75
|
+
|
|
60
76
|
### 1. Install
|
|
61
77
|
|
|
62
78
|
Works on macOS, Linux, and Windows. Needs **Python 3.11 or newer** (`python3 --version` to check). Then:
|
|
@@ -80,7 +96,7 @@ youpdated --version
|
|
|
80
96
|
youpdated init
|
|
81
97
|
```
|
|
82
98
|
|
|
83
|
-
This creates a starter config
|
|
99
|
+
This creates a short starter config, with the default settings and nothing watched yet, and **prints where it was placed**.
|
|
84
100
|
|
|
85
101
|
### 3. Add sources to watch
|
|
86
102
|
|
|
@@ -92,7 +108,7 @@ youpdated add npm react
|
|
|
92
108
|
youpdated add youtube @NASA
|
|
93
109
|
```
|
|
94
110
|
|
|
95
|
-
A link or handle that can only work with one source doesn't need to be named: `youpdated add https://github.com/neovim/neovim`. An address ending `.json`, `.yml`, or `.yaml` goes under `json
|
|
111
|
+
A link or handle that can only work with one source doesn't need to be named: `youpdated add https://github.com/neovim/neovim`. An address ending `.json`, `.yml`, or `.yaml` goes under `json`. Any other web address can be fetched first, once confirmed: a page that links a feed offers it, and a YouTube video adds its channel. See [usage](docs/usage.md#command-reference).
|
|
96
112
|
|
|
97
113
|
To watch all dependencies of a project, import its `package.json`, `requirements.txt`, `pyproject.toml`, or `Brewfile`: `youpdated import package.json`.
|
|
98
114
|
|
|
@@ -127,8 +143,21 @@ youpdated check
|
|
|
127
143
|
| An npm package | `express`, `"@types/node"` | The package name on npmjs.com. **Quote names starting with `@`.** |
|
|
128
144
|
| A Homebrew formula or cask | `wget`, `cask:firefox` | The name after `brew install`. Put `cask:` in front of casks. |
|
|
129
145
|
| A PyPI package | `httpx` | The name after `pip install`. |
|
|
146
|
+
| A Rust crate | `serde` | The name on crates.io, or after `cargo add`. |
|
|
147
|
+
| A Go module | `github.com/spf13/cobra` | The path after `go get`. A `pkg.go.dev` URL also works. |
|
|
148
|
+
| A Ruby gem | `rails` | The name after `gem install`. |
|
|
149
|
+
| A PHP package | `monolog/monolog` | The `vendor/package` after `composer require`. |
|
|
150
|
+
| A NuGet package | `Newtonsoft.Json` | The id after `dotnet add package`. |
|
|
151
|
+
| A Maven artifact | `com.google.guava:guava` | `group:artifact`, as in a Gradle dependency. |
|
|
152
|
+
| A Mac app with Sparkle | `https://www.iterm2.com/appcasts/final_modern.xml` | The app's appcast URL: `defaults read /Applications/<App>.app/Contents/Info SUFeedURL`. |
|
|
153
|
+
| An App Store app | `284882215` | The number after `id` in its `apps.apple.com` URL. The URL also works. |
|
|
154
|
+
| A Flathub app | `org.mozilla.firefox` | The app id at the end of its `flathub.org/apps/` URL, or after `flatpak install`. |
|
|
155
|
+
| An F-Droid app | `org.fdroid.fdroid` | The package name at the end of its `f-droid.org/packages/` URL. |
|
|
156
|
+
| A winget package | `Mozilla.Firefox` | The id `winget search` shows. |
|
|
130
157
|
| A Steam game | `440` | The number in the store URL: `store.steampowered.com/app/`**`440`**`/Team_Fortress_2/`. The full store URL also works. |
|
|
131
158
|
| An itch.io game | `https://user.itch.io/game-name` | The game's page URL, exactly as it appears in the address bar. |
|
|
159
|
+
| A GOG game | `1207658924` | The game's product id. `youpdated add` with its store page URL looks the id up. |
|
|
160
|
+
| A Modrinth project | `sodium` | The name at the end of its `modrinth.com/mod/` URL. The URL also works. |
|
|
132
161
|
| A YouTube channel | `"@NASA"` | The `@handle` from the channel URL. **Keep the quotes with `@` characters** |
|
|
133
162
|
| A YouTube playlist | `https://www.youtube.com/playlist?list=PLxxxx` | The playlist's URL, as it appears in the address bar. `playlist: PLxxxx`, with just the `list=` section, also works. |
|
|
134
163
|
| A browser | `chrome`, `brave`, `firefox`, `edge` | Just the name. |
|
|
@@ -144,6 +173,7 @@ youpdated check --all # everything, not just what's new
|
|
|
144
173
|
youpdated check --since 7d # only things from the last week
|
|
145
174
|
youpdated check -s steam # only one source
|
|
146
175
|
youpdated check --test -v # check your config without fetching anything
|
|
176
|
+
youpdated list # everything you watch and its latest version
|
|
147
177
|
youpdated add npm react # start watching something
|
|
148
178
|
youpdated remove npm react # stop watching it
|
|
149
179
|
youpdated import Brewfile # watch everything a dependency file lists
|
|
@@ -167,4 +197,5 @@ youpdated uninstall # remove Youpdated and its files
|
|
|
167
197
|
- [Privacy](https://github.com/Void1-1/youpdated/blob/main/docs/privacy.md): proxies, Tor, and details on what information is sent where
|
|
168
198
|
- [Encryption at rest](https://github.com/Void1-1/youpdated/blob/main/docs/encryption.md): lock your config and history behind a passphrase
|
|
169
199
|
- [Troubleshooting](https://github.com/Void1-1/youpdated/blob/main/docs/troubleshooting.md): common issues, and more about uninstalling
|
|
200
|
+
- [Library](https://github.com/Void1-1/youpdated/blob/main/docs/library.md): use Youpdated from Python as a dependency tracker or to check for your own program's releases
|
|
170
201
|
- [Contributing](https://github.com/Void1-1/youpdated/blob/main/CONTRIBUTING.md): installing from source, running the tests, and [adding a source](https://github.com/Void1-1/youpdated/blob/main/ADDING_SOURCES.md)
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"""Youpdated, a simple update tracker.
|
|
2
|
+
|
|
3
|
+
The names in ``__all__`` are the library API, see docs/library.md.
|
|
4
|
+
They follow semantic versioning from v1.0.0. (other modules and names are internal and may change in any release)
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
__version__ = "0.7.0b1"
|
|
10
|
+
|
|
11
|
+
from typing import TYPE_CHECKING, Any
|
|
12
|
+
|
|
13
|
+
_EXPORTS: dict[str, str] = {
|
|
14
|
+
"newer": "library",
|
|
15
|
+
"NoVersionsError": "library",
|
|
16
|
+
"parse_config": "library",
|
|
17
|
+
"load_config": "library",
|
|
18
|
+
"Config": "config",
|
|
19
|
+
"PrivacyConfig": "config",
|
|
20
|
+
"ConfigError": "config",
|
|
21
|
+
"State": "state",
|
|
22
|
+
"StateError": "state",
|
|
23
|
+
"StateBusy": "state",
|
|
24
|
+
"Client": "http",
|
|
25
|
+
"Fetched": "http",
|
|
26
|
+
"FetchError": "http",
|
|
27
|
+
"ProxyUnavailable": "http",
|
|
28
|
+
"run": "runner",
|
|
29
|
+
"record": "runner",
|
|
30
|
+
"RunResult": "runner",
|
|
31
|
+
"ProgressReporter": "runner",
|
|
32
|
+
"Update": "models",
|
|
33
|
+
"Target": "models",
|
|
34
|
+
"RunError": "models",
|
|
35
|
+
"Source": "sources.base",
|
|
36
|
+
"ConfigEntryError": "sources.base",
|
|
37
|
+
"entry_fields": "sources.base",
|
|
38
|
+
"require": "sources.base",
|
|
39
|
+
"parse_iso": "sources.base",
|
|
40
|
+
"url_parts": "sources.base",
|
|
41
|
+
"parse_feed": "sources.feed",
|
|
42
|
+
"register": "registry",
|
|
43
|
+
"all_sources": "registry",
|
|
44
|
+
"get_source": "registry",
|
|
45
|
+
"EncryptionError": "crypto",
|
|
46
|
+
"WrongPassphrase": "crypto",
|
|
47
|
+
"YoupdatedError": "errors",
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
__all__ = [
|
|
51
|
+
"__version__",
|
|
52
|
+
"newer", "NoVersionsError", "parse_config", "load_config",
|
|
53
|
+
"Config", "PrivacyConfig", "ConfigError",
|
|
54
|
+
"State", "StateError", "StateBusy",
|
|
55
|
+
"Client", "Fetched", "FetchError", "ProxyUnavailable",
|
|
56
|
+
"run", "record", "RunResult", "ProgressReporter",
|
|
57
|
+
"Update", "Target", "RunError",
|
|
58
|
+
"Source", "ConfigEntryError",
|
|
59
|
+
"entry_fields", "require", "parse_iso", "url_parts", "parse_feed",
|
|
60
|
+
"register", "all_sources", "get_source",
|
|
61
|
+
"EncryptionError", "WrongPassphrase", "YoupdatedError",
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# Hidden from type checkers
|
|
66
|
+
if not TYPE_CHECKING:
|
|
67
|
+
|
|
68
|
+
def __getattr__(name: str) -> Any:
|
|
69
|
+
module = _EXPORTS.get(name)
|
|
70
|
+
if module is None:
|
|
71
|
+
raise AttributeError(f"module 'youpdated' has no attribute {name!r}")
|
|
72
|
+
from importlib import import_module
|
|
73
|
+
|
|
74
|
+
value = getattr(import_module(f".{module}", __name__), name)
|
|
75
|
+
# Later lookups skip this function
|
|
76
|
+
globals()[name] = value
|
|
77
|
+
return value
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def __dir__() -> list[str]:
|
|
81
|
+
return sorted({*globals(), *_EXPORTS})
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
if TYPE_CHECKING:
|
|
85
|
+
from .config import Config, ConfigError, PrivacyConfig
|
|
86
|
+
from .crypto import EncryptionError, WrongPassphrase
|
|
87
|
+
from .errors import YoupdatedError
|
|
88
|
+
from .http import Client, Fetched, FetchError, ProxyUnavailable
|
|
89
|
+
from .library import NoVersionsError, load_config, newer, parse_config
|
|
90
|
+
from .models import RunError, Target, Update
|
|
91
|
+
from .registry import all_sources, get_source, register
|
|
92
|
+
from .runner import ProgressReporter, RunResult, record, run
|
|
93
|
+
from .sources.base import (
|
|
94
|
+
ConfigEntryError,
|
|
95
|
+
Source,
|
|
96
|
+
entry_fields,
|
|
97
|
+
parse_iso,
|
|
98
|
+
require,
|
|
99
|
+
url_parts,
|
|
100
|
+
)
|
|
101
|
+
from .sources.feed import parse_feed
|
|
102
|
+
from .state import State, StateBusy, StateError
|