earshot-cli 0.3.0__tar.gz → 0.3.1__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 (34) hide show
  1. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/PKG-INFO +96 -4
  2. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/README.md +95 -3
  3. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/pyproject.toml +1 -1
  4. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/src/earshot/cli.py +3 -1
  5. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/tests/test_me.py +1 -1
  6. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/.github/workflows/ci.yml +0 -0
  7. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/.github/workflows/publish.yml +0 -0
  8. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/.gitignore +0 -0
  9. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/LICENSE +0 -0
  10. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/scripts/download_models.sh +0 -0
  11. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/src/earshot/__init__.py +0 -0
  12. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/src/earshot/auth.py +0 -0
  13. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/src/earshot/capture.py +0 -0
  14. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/src/earshot/compose.py +0 -0
  15. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/src/earshot/config.py +0 -0
  16. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/src/earshot/deliver.py +0 -0
  17. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/src/earshot/extract.py +0 -0
  18. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/src/earshot/live.py +0 -0
  19. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/src/earshot/models.py +0 -0
  20. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/src/earshot/subtitle.py +0 -0
  21. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/src/earshot/transcribe.py +0 -0
  22. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/src/earshot/transcribe_cloud.py +0 -0
  23. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/tests/conftest.py +0 -0
  24. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/tests/test_auth.py +0 -0
  25. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/tests/test_compose.py +0 -0
  26. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/tests/test_config.py +0 -0
  27. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/tests/test_deliver.py +0 -0
  28. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/tests/test_deliver_api.py +0 -0
  29. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/tests/test_do_deliver.py +0 -0
  30. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/tests/test_extract.py +0 -0
  31. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/tests/test_live.py +0 -0
  32. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/tests/test_subtitle.py +0 -0
  33. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/tests/test_wizard.py +0 -0
  34. {earshot_cli-0.3.0 → earshot_cli-0.3.1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: earshot-cli
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: 旁听剪藏:跨平台桌面端系统声录制 → 本地转写 → 投递知识库(默认 ExoMind,可插拔)
5
5
  Project-URL: Homepage, https://github.com/helloworldtang/earshot
6
6
  Project-URL: Repository, https://github.com/helloworldtang/earshot
@@ -44,11 +44,103 @@ Description-Content-Type: text/markdown
44
44
 
45
45
  ## 安装(开箱即用)
46
46
 
47
+ 唯一的依赖是 [uv](https://docs.astral.sh/uv/)(Python 的包管理器)。**不需要预装 Python**——uv 会自动下载并管理所需版本(earshot 需要 Python ≥3.12,uv 全程代劳)。
48
+
49
+ 按顺序三步:
50
+
51
+ **第 1 步:安装 uv**(已装可跳过,`uv --version` 可验证)
52
+
53
+ ```bash
54
+ # macOS / Linux
55
+ curl -LsSf https://astral.sh/uv/install.sh | sh
56
+
57
+ # Windows(PowerShell)
58
+ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
59
+ ```
60
+
61
+ 装完**重开一个终端**(或按安装器提示把 uv 加进 PATH),再验证:
62
+
63
+ ```bash
64
+ uv --version
65
+ ```
66
+
67
+ <details>
68
+ <summary><b>国内网络看这里</b>(直连 GitHub/PyPI 慢或超时;两条路线均已在 macOS 实测通过,Windows 命令来自镜像官方文档)</summary>
69
+
70
+ **路线 A(推荐——什么都不用预装,一条命令搞定)**
71
+
72
+ A1. 用国内镜像安装 uv([uv.agentsmirror.com](https://github.com/Wangnov/uv-custom) 公益镜像,分发的是官方原版安装脚本,只把下载源切到国内):
73
+
47
74
  ```bash
48
- uv tool install earshot-cli # 或 pipx install earshot-cli
49
- earshot doctor # 环境自检;earshot 与 earshot-cli 两个命令名等价可用
75
+ # macOS / Linux
76
+ curl -LsSf https://uv.agentsmirror.com/install-cn.sh | sh
77
+ # Windows(PowerShell)
78
+ powershell -ExecutionPolicy ByPass -c "irm https://uv.agentsmirror.com/install-cn.ps1 | iex"
50
79
  ```
51
80
 
81
+ A2. **重开一个终端**(关键:镜像的 PyPI 源配置写在 shell 配置里,不重开终端不生效),验证 uv:
82
+
83
+ ```bash
84
+ uv --version # 输出版本号(如 uv 0.13.7)即成功
85
+ ```
86
+
87
+ A3. 安装 earshot(Python 与全部依赖自动下载,均走国内源):
88
+
89
+ ```bash
90
+ uv tool install earshot-cli
91
+ ```
92
+
93
+ A4. 验证命令可用:
94
+
95
+ ```bash
96
+ earshot me # 看到「凭据:未配置(earshot login …)」即安装成功,接着看下方第 3 步登录
97
+ ```
98
+
99
+ **路线 B(机器上已有 Python 和 pip)**
100
+
101
+ B1. 用清华源装 uv:
102
+
103
+ ```bash
104
+ pip install uv -i https://pypi.tuna.tsinghua.edu.cn/simple
105
+ ```
106
+
107
+ B2. 写入国内源配置(包索引走清华、Python 下载走 agentsmirror,一劳永逸):
108
+
109
+ ```bash
110
+ mkdir -p ~/.config/uv
111
+ printf '[[index]]\nurl = "https://pypi.tuna.tsinghua.edu.cn/simple"\ndefault = true\n\npython-install-mirror = "https://uv.agentsmirror.com/python-build-standalone/releases/download"\n' > ~/.config/uv/uv.toml
112
+ ```
113
+
114
+ (Windows 路径为 `%APPDATA%\uv\uv.toml`,内容相同)
115
+
116
+ B3. 安装并验证:
117
+
118
+ ```bash
119
+ uv tool install earshot-cli
120
+ earshot me
121
+ ```
122
+
123
+ </details>
124
+
125
+ **第 2 步:安装 earshot**(uv 自动下载 Python ≥3.12 与全部依赖,含内置 ffmpeg)
126
+
127
+ ```bash
128
+ uv tool install earshot-cli
129
+ ```
130
+
131
+ > 若提示 `command not found: earshot`:uv 把命令装到了 `~/.local/bin`(Windows 为 `%USERPROFILE%\.local\bin`),按提示把它加入 PATH 或重开终端。
132
+
133
+ **第 3 步:登录并自检**
134
+
135
+ ```bash
136
+ earshot login # 浏览器打开授权页,点「授权登录」即完成(已登录过 exomind 则免)
137
+ earshot me # 显示凭据状态与服务连通性(「凭据状态:有效」即就绪)
138
+ ```
139
+
140
+ 没有 ExoMind 账号?投递可换任意 webhook(`--deliver webhook --webhook <url>`),或 `--deliver none` 只本地存档,两者都不需要登录。
141
+
142
+ `earshot` 与 `earshot-cli` 两个命令名等价可用;`earshot doctor` 可做完整环境自检。
143
+
52
144
  升级:
53
145
 
54
146
  ```bash
@@ -60,7 +152,7 @@ uv tool upgrade earshot-cli
60
152
  源码安装请**锁版本 tag**,不要引滚动的 `main`(消费方 `uv sync`/`pip install` 会隐性升级到未审阅代码;升级应当是显式改版本号的决策):
61
153
 
62
154
  ```bash
63
- uv tool install "earshot-cli @ https://github.com/helloworldtang/earshot/archive/refs/tags/v0.3.0.tar.gz"
155
+ uv tool install "earshot-cli @ https://github.com/helloworldtang/earshot/archive/refs/tags/v0.3.1.tar.gz"
64
156
  ```
65
157
 
66
158
  - **零系统依赖**:ffmpeg 已随 Python wheel 内置([imageio-ffmpeg](https://pypi.org/project/imageio-ffmpeg),MoviePy 同款),无需 brew/apt。
@@ -11,11 +11,103 @@
11
11
 
12
12
  ## 安装(开箱即用)
13
13
 
14
+ 唯一的依赖是 [uv](https://docs.astral.sh/uv/)(Python 的包管理器)。**不需要预装 Python**——uv 会自动下载并管理所需版本(earshot 需要 Python ≥3.12,uv 全程代劳)。
15
+
16
+ 按顺序三步:
17
+
18
+ **第 1 步:安装 uv**(已装可跳过,`uv --version` 可验证)
19
+
20
+ ```bash
21
+ # macOS / Linux
22
+ curl -LsSf https://astral.sh/uv/install.sh | sh
23
+
24
+ # Windows(PowerShell)
25
+ powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
26
+ ```
27
+
28
+ 装完**重开一个终端**(或按安装器提示把 uv 加进 PATH),再验证:
29
+
30
+ ```bash
31
+ uv --version
32
+ ```
33
+
34
+ <details>
35
+ <summary><b>国内网络看这里</b>(直连 GitHub/PyPI 慢或超时;两条路线均已在 macOS 实测通过,Windows 命令来自镜像官方文档)</summary>
36
+
37
+ **路线 A(推荐——什么都不用预装,一条命令搞定)**
38
+
39
+ A1. 用国内镜像安装 uv([uv.agentsmirror.com](https://github.com/Wangnov/uv-custom) 公益镜像,分发的是官方原版安装脚本,只把下载源切到国内):
40
+
14
41
  ```bash
15
- uv tool install earshot-cli # 或 pipx install earshot-cli
16
- earshot doctor # 环境自检;earshot 与 earshot-cli 两个命令名等价可用
42
+ # macOS / Linux
43
+ curl -LsSf https://uv.agentsmirror.com/install-cn.sh | sh
44
+ # Windows(PowerShell)
45
+ powershell -ExecutionPolicy ByPass -c "irm https://uv.agentsmirror.com/install-cn.ps1 | iex"
17
46
  ```
18
47
 
48
+ A2. **重开一个终端**(关键:镜像的 PyPI 源配置写在 shell 配置里,不重开终端不生效),验证 uv:
49
+
50
+ ```bash
51
+ uv --version # 输出版本号(如 uv 0.13.7)即成功
52
+ ```
53
+
54
+ A3. 安装 earshot(Python 与全部依赖自动下载,均走国内源):
55
+
56
+ ```bash
57
+ uv tool install earshot-cli
58
+ ```
59
+
60
+ A4. 验证命令可用:
61
+
62
+ ```bash
63
+ earshot me # 看到「凭据:未配置(earshot login …)」即安装成功,接着看下方第 3 步登录
64
+ ```
65
+
66
+ **路线 B(机器上已有 Python 和 pip)**
67
+
68
+ B1. 用清华源装 uv:
69
+
70
+ ```bash
71
+ pip install uv -i https://pypi.tuna.tsinghua.edu.cn/simple
72
+ ```
73
+
74
+ B2. 写入国内源配置(包索引走清华、Python 下载走 agentsmirror,一劳永逸):
75
+
76
+ ```bash
77
+ mkdir -p ~/.config/uv
78
+ printf '[[index]]\nurl = "https://pypi.tuna.tsinghua.edu.cn/simple"\ndefault = true\n\npython-install-mirror = "https://uv.agentsmirror.com/python-build-standalone/releases/download"\n' > ~/.config/uv/uv.toml
79
+ ```
80
+
81
+ (Windows 路径为 `%APPDATA%\uv\uv.toml`,内容相同)
82
+
83
+ B3. 安装并验证:
84
+
85
+ ```bash
86
+ uv tool install earshot-cli
87
+ earshot me
88
+ ```
89
+
90
+ </details>
91
+
92
+ **第 2 步:安装 earshot**(uv 自动下载 Python ≥3.12 与全部依赖,含内置 ffmpeg)
93
+
94
+ ```bash
95
+ uv tool install earshot-cli
96
+ ```
97
+
98
+ > 若提示 `command not found: earshot`:uv 把命令装到了 `~/.local/bin`(Windows 为 `%USERPROFILE%\.local\bin`),按提示把它加入 PATH 或重开终端。
99
+
100
+ **第 3 步:登录并自检**
101
+
102
+ ```bash
103
+ earshot login # 浏览器打开授权页,点「授权登录」即完成(已登录过 exomind 则免)
104
+ earshot me # 显示凭据状态与服务连通性(「凭据状态:有效」即就绪)
105
+ ```
106
+
107
+ 没有 ExoMind 账号?投递可换任意 webhook(`--deliver webhook --webhook <url>`),或 `--deliver none` 只本地存档,两者都不需要登录。
108
+
109
+ `earshot` 与 `earshot-cli` 两个命令名等价可用;`earshot doctor` 可做完整环境自检。
110
+
19
111
  升级:
20
112
 
21
113
  ```bash
@@ -27,7 +119,7 @@ uv tool upgrade earshot-cli
27
119
  源码安装请**锁版本 tag**,不要引滚动的 `main`(消费方 `uv sync`/`pip install` 会隐性升级到未审阅代码;升级应当是显式改版本号的决策):
28
120
 
29
121
  ```bash
30
- uv tool install "earshot-cli @ https://github.com/helloworldtang/earshot/archive/refs/tags/v0.3.0.tar.gz"
122
+ uv tool install "earshot-cli @ https://github.com/helloworldtang/earshot/archive/refs/tags/v0.3.1.tar.gz"
31
123
  ```
32
124
 
33
125
  - **零系统依赖**:ffmpeg 已随 Python wheel 内置([imageio-ffmpeg](https://pypi.org/project/imageio-ffmpeg),MoviePy 同款),无需 brew/apt。
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "earshot-cli"
3
- version = "0.3.0"
3
+ version = "0.3.1"
4
4
  description = "旁听剪藏:跨平台桌面端系统声录制 → 本地转写 → 投递知识库(默认 ExoMind,可插拔)"
5
5
  readme = "README.md"
6
6
  license = "MIT"
@@ -525,7 +525,9 @@ def cmd_me(_args: argparse.Namespace, settings: Settings) -> int:
525
525
  masked = f"{key[:8]}…{key[-4:]}" if len(key) > 12 else key
526
526
  print(f"凭据:{masked}")
527
527
  if verify_key(settings.exomind_base_url, key):
528
- print("凭据状态:有效")
528
+ # 设备流签发的是长期 API Key(无 expires_at),与 wxpub 委托票的 15 分钟 TTL 不同——
529
+ # 一致性口径对齐 wxpub me 的 sk_ 分支:「长期有效」;失效才需要重登
530
+ print("凭据状态:有效(长期 API Key,无到期时间)")
529
531
  return EXIT_OK
530
532
  print("凭据状态:无效或服务不可达(重登用: earshot login --force)")
531
533
  return EXIT_FAIL
@@ -30,7 +30,7 @@ def test_me_valid_key(
30
30
  assert code == 0
31
31
  assert "https://exomind.example" in out
32
32
  assert "sk_live_…_key" in out, "凭据掩码展示"
33
- assert "凭据状态:有效" in out
33
+ assert "凭据状态:有效(长期 API Key,无到期时间)" in out, "长期 key 无 TTL,口径对齐 wxpub sk_ 分支"
34
34
 
35
35
 
36
36
  def test_me_invalid_key(
File without changes
File without changes
File without changes