studylife-cli 1.9.69__tar.gz → 1.9.71__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.
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/.github/workflows/ci.yml +2 -2
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/.github/workflows/dependabot-auto-merge.yml +1 -1
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/.github/workflows/dependabot-lockfiles.yml +1 -1
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/CONTRIBUTING.md +2 -2
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/PKG-INFO +7 -5
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/README.md +5 -3
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/pyproject.toml +1 -1
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/src/studylife_cli/_version.py +2 -2
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/src/studylife_cli/cli.py +3 -3
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/src/studylife_cli/client.py +1 -1
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/src/studylife_cli/login.py +6 -6
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/src/studylife_cli/tui.py +1 -1
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/.github/dependabot.yml +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/.github/lktec-bot.yml +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/.github/workflows/dependency-review.yml +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/.github/workflows/scorecard.yml +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/.gitignore +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/CHANGELOG.md +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/CODE_OF_CONDUCT.md +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/LICENSE +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/SECURITY.md +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/fuzz/fuzz_models_and_callback.py +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/socket.yml +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/src/studylife_cli/__init__.py +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/src/studylife_cli/credentials.py +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/src/studylife_cli/models.py +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/tests/test_cli.py +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/tests/test_client.py +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/tests/test_login.py +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/tests/test_tui.py +0 -0
- {studylife_cli-1.9.69 → studylife_cli-1.9.71}/uv.lock +0 -0
|
@@ -149,7 +149,7 @@ jobs:
|
|
|
149
149
|
get-version:
|
|
150
150
|
needs: [lint, test]
|
|
151
151
|
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
|
152
|
-
uses: lukislp/lktec-bot/.github/workflows/release.yml@
|
|
152
|
+
uses: lukislp/lktec-bot/.github/workflows/release.yml@28c711f668a7fcc6cdfe8fcd7f321a726b8189df # v0.11.0
|
|
153
153
|
with:
|
|
154
154
|
dry-run: true
|
|
155
155
|
secrets:
|
|
@@ -159,7 +159,7 @@ jobs:
|
|
|
159
159
|
release:
|
|
160
160
|
needs: [get-version]
|
|
161
161
|
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && needs.get-version.outputs.released == 'true'
|
|
162
|
-
uses: lukislp/lktec-bot/.github/workflows/release.yml@
|
|
162
|
+
uses: lukislp/lktec-bot/.github/workflows/release.yml@28c711f668a7fcc6cdfe8fcd7f321a726b8189df # v0.11.0
|
|
163
163
|
secrets:
|
|
164
164
|
app-id: ${{ secrets.LKTEC_BOT_APP_ID }}
|
|
165
165
|
private-key: ${{ secrets.LKTEC_BOT_PRIVATE_KEY }}
|
|
@@ -20,7 +20,7 @@ permissions:
|
|
|
20
20
|
|
|
21
21
|
jobs:
|
|
22
22
|
automerge:
|
|
23
|
-
uses: lukislp/lktec-bot/.github/workflows/automerge.yml@
|
|
23
|
+
uses: lukislp/lktec-bot/.github/workflows/automerge.yml@28c711f668a7fcc6cdfe8fcd7f321a726b8189df # v0.11.0
|
|
24
24
|
secrets:
|
|
25
25
|
app-id: ${{ secrets.LKTEC_BOT_APP_ID }}
|
|
26
26
|
private-key: ${{ secrets.LKTEC_BOT_PRIVATE_KEY }}
|
|
@@ -18,7 +18,7 @@ permissions:
|
|
|
18
18
|
|
|
19
19
|
jobs:
|
|
20
20
|
lockfiles:
|
|
21
|
-
uses: lukislp/lktec-bot/.github/workflows/lockfiles.yml@
|
|
21
|
+
uses: lukislp/lktec-bot/.github/workflows/lockfiles.yml@28c711f668a7fcc6cdfe8fcd7f321a726b8189df # v0.11.0
|
|
22
22
|
with:
|
|
23
23
|
uv-version: "0.12.18"
|
|
24
24
|
secrets:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Contributing to
|
|
1
|
+
# Contributing to StudyAtrium CLI
|
|
2
2
|
|
|
3
|
-
Thanks for taking the time.
|
|
3
|
+
Thanks for taking the time. StudyAtrium CLI is a single-maintainer project, so the process is
|
|
4
4
|
deliberately small - but it is the same for every change, including the maintainer's own.
|
|
5
5
|
|
|
6
6
|
## How changes get in
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: studylife-cli
|
|
3
|
-
Version: 1.9.
|
|
4
|
-
Summary: Command-line client for
|
|
3
|
+
Version: 1.9.71
|
|
4
|
+
Summary: Command-line client for StudyAtrium (self-hosted study organizer) - notes, sessions, course goals, and webhooks from your terminal.
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Requires-Python: >=3.12
|
|
7
7
|
Requires-Dist: httpx>=0.27
|
|
@@ -12,14 +12,16 @@ Requires-Dist: textual>=0.85
|
|
|
12
12
|
Requires-Dist: typer>=0.15
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
|
|
15
|
-
#
|
|
15
|
+
# StudyAtrium CLI
|
|
16
|
+
|
|
17
|
+
(formerly StudyLife)
|
|
16
18
|
|
|
17
19
|
[](https://github.com/lukislp/studylife-cli/actions/workflows/ci.yml) [](https://scorecard.dev/viewer/?uri=github.com/lukislp/studylife-cli) [](https://github.com/lukislp/studylife-cli/security/code-scanning)
|
|
18
20
|
[](https://github.com/lukislp/studylife-cli/releases)
|
|
19
21
|
[](LICENSE)
|
|
20
22
|
[](https://www.python.org/)
|
|
21
23
|
|
|
22
|
-
A command-line client for [
|
|
24
|
+
A command-line client for [StudyAtrium](https://github.com/lukislp/studylife), the self-hosted
|
|
23
25
|
study organizer. Manage notes, sessions, course goals, and webhooks from your terminal, get study
|
|
24
26
|
time reports and exports, or watch a live dashboard - scripts and shells welcome.
|
|
25
27
|
|
|
@@ -33,7 +35,7 @@ pip install studylife-cli
|
|
|
33
35
|
|
|
34
36
|
## Register the CLI on your instance
|
|
35
37
|
|
|
36
|
-
`studylife-cli` connects to your
|
|
38
|
+
`studylife-cli` connects to your StudyAtrium instance through the same add-on mechanism any
|
|
37
39
|
third-party integration uses - there is no special-cased server support to set up. Register it
|
|
38
40
|
once via your own [studylife-developers](https://github.com/lukislp/studylife-developers) portal:
|
|
39
41
|
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
#
|
|
1
|
+
# StudyAtrium CLI
|
|
2
|
+
|
|
3
|
+
(formerly StudyLife)
|
|
2
4
|
|
|
3
5
|
[](https://github.com/lukislp/studylife-cli/actions/workflows/ci.yml) [](https://scorecard.dev/viewer/?uri=github.com/lukislp/studylife-cli) [](https://github.com/lukislp/studylife-cli/security/code-scanning)
|
|
4
6
|
[](https://github.com/lukislp/studylife-cli/releases)
|
|
5
7
|
[](LICENSE)
|
|
6
8
|
[](https://www.python.org/)
|
|
7
9
|
|
|
8
|
-
A command-line client for [
|
|
10
|
+
A command-line client for [StudyAtrium](https://github.com/lukislp/studylife), the self-hosted
|
|
9
11
|
study organizer. Manage notes, sessions, course goals, and webhooks from your terminal, get study
|
|
10
12
|
time reports and exports, or watch a live dashboard - scripts and shells welcome.
|
|
11
13
|
|
|
@@ -19,7 +21,7 @@ pip install studylife-cli
|
|
|
19
21
|
|
|
20
22
|
## Register the CLI on your instance
|
|
21
23
|
|
|
22
|
-
`studylife-cli` connects to your
|
|
24
|
+
`studylife-cli` connects to your StudyAtrium instance through the same add-on mechanism any
|
|
23
25
|
third-party integration uses - there is no special-cased server support to set up. Register it
|
|
24
26
|
once via your own [studylife-developers](https://github.com/lukislp/studylife-developers) portal:
|
|
25
27
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "studylife-cli"
|
|
3
3
|
dynamic = ["version"]
|
|
4
|
-
description = "Command-line client for
|
|
4
|
+
description = "Command-line client for StudyAtrium (self-hosted study organizer) - notes, sessions, course goals, and webhooks from your terminal."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.12"
|
|
7
7
|
dependencies = [
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.9.
|
|
22
|
-
__version_tuple__ = version_tuple = (1, 9,
|
|
21
|
+
__version__ = version = '1.9.71'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 9, 71)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -170,7 +170,7 @@ def _run(ctx: typer.Context, fn: object) -> object:
|
|
|
170
170
|
@app.command()
|
|
171
171
|
def login(
|
|
172
172
|
instance_url: str = typer.Argument(
|
|
173
|
-
..., help="Base URL of your
|
|
173
|
+
..., help="Base URL of your StudyAtrium instance, e.g. https://studylife.example.com"
|
|
174
174
|
),
|
|
175
175
|
client_id: str = typer.Option(
|
|
176
176
|
DEFAULT_CLIENT_ID, help="ClientId this CLI was registered under via studylife-developers."
|
|
@@ -194,7 +194,7 @@ def logout() -> None:
|
|
|
194
194
|
|
|
195
195
|
@app.command()
|
|
196
196
|
def whoami(ctx: typer.Context, as_json: bool = JSON_OPTION) -> None:
|
|
197
|
-
"""Show which
|
|
197
|
+
"""Show which StudyAtrium account and instance the stored credential belongs to."""
|
|
198
198
|
result = _run(ctx, lambda c: c.whoami())
|
|
199
199
|
credentials = load_credentials()
|
|
200
200
|
payload = {
|
|
@@ -582,7 +582,7 @@ def report(
|
|
|
582
582
|
return
|
|
583
583
|
|
|
584
584
|
period_label = "this week" if period == "week" else "this month"
|
|
585
|
-
console.print(f"[bold]
|
|
585
|
+
console.print(f"[bold]StudyAtrium report - {period_label}[/bold]")
|
|
586
586
|
console.print(f"Total study time: {_report_format_duration(total_minutes)}")
|
|
587
587
|
if summary is not None:
|
|
588
588
|
console.print(f"Current streak: {summary.streak.current} days")
|
|
@@ -28,7 +28,7 @@ class ApiError(Exception):
|
|
|
28
28
|
"""Raised for any non-2xx response, carrying the status code and response body."""
|
|
29
29
|
|
|
30
30
|
def __init__(self, status_code: int, body: str) -> None:
|
|
31
|
-
super().__init__(f"
|
|
31
|
+
super().__init__(f"StudyAtrium API returned {status_code}: {body.strip()}")
|
|
32
32
|
self.status_code = status_code
|
|
33
33
|
self.body = body
|
|
34
34
|
|
|
@@ -187,14 +187,14 @@ def run_login(
|
|
|
187
187
|
)
|
|
188
188
|
connect_url = f"{base_url}/connect/client/{client_id}?{connect_query}"
|
|
189
189
|
|
|
190
|
-
print(f"Opening your browser to log in to
|
|
190
|
+
print(f"Opening your browser to log in to StudyAtrium:\n {connect_url}")
|
|
191
191
|
print("Waiting for you to finish logging in and approving the connection...")
|
|
192
192
|
open_browser(connect_url)
|
|
193
193
|
|
|
194
194
|
result = callback_server.wait_for_callback(timeout_seconds)
|
|
195
195
|
if result is None:
|
|
196
196
|
raise LoginError(
|
|
197
|
-
f"Timed out after {int(timeout_seconds)}s waiting for
|
|
197
|
+
f"Timed out after {int(timeout_seconds)}s waiting for StudyAtrium to redirect back. "
|
|
198
198
|
"Either the login/approval wasn't completed in the browser tab, or this client "
|
|
199
199
|
f"isn't registered on that instance yet - see the README for how to register "
|
|
200
200
|
f"'{client_id}' via studylife-developers first."
|
|
@@ -208,7 +208,7 @@ def run_login(
|
|
|
208
208
|
|
|
209
209
|
if not result.assertion:
|
|
210
210
|
raise LoginError(
|
|
211
|
-
"
|
|
211
|
+
"StudyAtrium's callback didn't include a login assertion - the connection may have "
|
|
212
212
|
"been denied."
|
|
213
213
|
)
|
|
214
214
|
|
|
@@ -239,18 +239,18 @@ def _exchange_assertion(
|
|
|
239
239
|
timeout=10.0,
|
|
240
240
|
)
|
|
241
241
|
except httpx.HTTPError as exc:
|
|
242
|
-
raise LoginError(f"Could not reach
|
|
242
|
+
raise LoginError(f"Could not reach StudyAtrium: {exc}") from exc
|
|
243
243
|
|
|
244
244
|
if response.status_code != 200:
|
|
245
245
|
raise LoginError(
|
|
246
|
-
f"
|
|
246
|
+
f"StudyAtrium rejected the login ({response.status_code}): {response.text.strip()}"
|
|
247
247
|
)
|
|
248
248
|
|
|
249
249
|
try:
|
|
250
250
|
data = response.json()
|
|
251
251
|
return int(data["userId"]), str(data["apiKey"])
|
|
252
252
|
except (KeyError, TypeError, ValueError) as exc:
|
|
253
|
-
raise LoginError("
|
|
253
|
+
raise LoginError("StudyAtrium returned an unexpected response shape.") from exc
|
|
254
254
|
|
|
255
255
|
|
|
256
256
|
def login_and_save(instance_url: str, client_id: str = DEFAULT_CLIENT_ID) -> Credentials:
|
|
@@ -132,7 +132,7 @@ class CreateNoteScreen(ModalScreen[tuple[str, str] | None]):
|
|
|
132
132
|
|
|
133
133
|
|
|
134
134
|
class StudyLifeTUI(App[None]):
|
|
135
|
-
TITLE = "
|
|
135
|
+
TITLE = "StudyAtrium"
|
|
136
136
|
CSS = """
|
|
137
137
|
Screen { background: $background; }
|
|
138
138
|
#stats { grid-size: 2; grid-gutter: 1 2; padding: 1 2; }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|