talks-reducer 0.6.1__py3-none-any.whl → 0.6.3__py3-none-any.whl
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.
- talks_reducer/__about__.py +1 -1
- talks_reducer/gui.py +28 -43
- talks_reducer/resources/__init__.py +0 -0
- talks_reducer/server.py +8 -2
- talks_reducer/server_tray.py +4 -6
- {talks_reducer-0.6.1.dist-info → talks_reducer-0.6.3.dist-info}/METADATA +10 -9
- {talks_reducer-0.6.1.dist-info → talks_reducer-0.6.3.dist-info}/RECORD +11 -10
- {talks_reducer-0.6.1.dist-info → talks_reducer-0.6.3.dist-info}/WHEEL +0 -0
- {talks_reducer-0.6.1.dist-info → talks_reducer-0.6.3.dist-info}/entry_points.txt +0 -0
- {talks_reducer-0.6.1.dist-info → talks_reducer-0.6.3.dist-info}/licenses/LICENSE +0 -0
- {talks_reducer-0.6.1.dist-info → talks_reducer-0.6.3.dist-info}/top_level.txt +0 -0
talks_reducer/__about__.py
CHANGED
talks_reducer/gui.py
CHANGED
@@ -167,10 +167,6 @@ DARK_THEME = {
|
|
167
167
|
}
|
168
168
|
|
169
169
|
|
170
|
-
_TRAY_LOCK = threading.Lock()
|
171
|
-
_TRAY_PROCESS: Optional[subprocess.Popen[Any]] = None
|
172
|
-
|
173
|
-
|
174
170
|
def _default_remote_destination(input_file: Path, *, small: bool) -> Path:
|
175
171
|
"""Return the default remote output path for *input_file*.
|
176
172
|
|
@@ -190,34 +186,6 @@ def _default_remote_destination(input_file: Path, *, small: bool) -> Path:
|
|
190
186
|
return input_file.with_name(new_name)
|
191
187
|
|
192
188
|
|
193
|
-
def _ensure_server_tray_running(extra_args: Optional[Sequence[str]] = None) -> None:
|
194
|
-
"""Start the server tray in a background process if one is not active."""
|
195
|
-
|
196
|
-
global _TRAY_PROCESS
|
197
|
-
|
198
|
-
with _TRAY_LOCK:
|
199
|
-
if _TRAY_PROCESS is not None and _TRAY_PROCESS.poll() is None:
|
200
|
-
return
|
201
|
-
|
202
|
-
package_name = __package__ or "talks_reducer"
|
203
|
-
|
204
|
-
if getattr(sys, "frozen", False):
|
205
|
-
command = [sys.executable, "--server"]
|
206
|
-
else:
|
207
|
-
command = [sys.executable, "-m", f"{package_name}.server_tray"]
|
208
|
-
|
209
|
-
if extra_args:
|
210
|
-
command.extend(extra_args)
|
211
|
-
|
212
|
-
try:
|
213
|
-
_TRAY_PROCESS = subprocess.Popen(command)
|
214
|
-
except Exception as exc: # pragma: no cover - best-effort fallback
|
215
|
-
_TRAY_PROCESS = None
|
216
|
-
sys.stderr.write(
|
217
|
-
f"Warning: failed to launch Talks Reducer server tray: {exc}\n"
|
218
|
-
)
|
219
|
-
|
220
|
-
|
221
189
|
def _parse_ratios_from_summary(summary: str) -> Tuple[Optional[float], Optional[float]]:
|
222
190
|
"""Extract time and size ratios from a Markdown *summary* string."""
|
223
191
|
|
@@ -528,8 +496,26 @@ class TalksReducerGUI:
|
|
528
496
|
|
529
497
|
icon_candidates: list[tuple[Path, str]] = []
|
530
498
|
if sys.platform.startswith("win"):
|
531
|
-
icon_candidates.append(
|
532
|
-
|
499
|
+
icon_candidates.append(
|
500
|
+
(
|
501
|
+
base_path
|
502
|
+
/ "talks_reducer"
|
503
|
+
/ "resources"
|
504
|
+
/ "icons"
|
505
|
+
/ "icon.ico",
|
506
|
+
"ico",
|
507
|
+
)
|
508
|
+
)
|
509
|
+
icon_candidates.append(
|
510
|
+
(
|
511
|
+
base_path
|
512
|
+
/ "talks_reducer"
|
513
|
+
/ "resources"
|
514
|
+
/ "icons"
|
515
|
+
/ "icon.png",
|
516
|
+
"png",
|
517
|
+
)
|
518
|
+
)
|
533
519
|
|
534
520
|
for icon_path, icon_type in icon_candidates:
|
535
521
|
if not icon_path.is_file():
|
@@ -2265,24 +2251,27 @@ def main(argv: Optional[Sequence[str]] = None) -> bool:
|
|
2265
2251
|
|
2266
2252
|
parser = argparse.ArgumentParser(add_help=False)
|
2267
2253
|
parser.add_argument(
|
2268
|
-
"--
|
2254
|
+
"--server",
|
2269
2255
|
action="store_true",
|
2270
|
-
help="
|
2256
|
+
help="Launch the Talks Reducer server tray instead of the desktop GUI.",
|
2271
2257
|
)
|
2272
2258
|
parser.add_argument(
|
2273
|
-
"--
|
2259
|
+
"--no-tray",
|
2274
2260
|
action="store_true",
|
2275
|
-
help="
|
2261
|
+
help="Deprecated: the GUI no longer starts the server tray automatically.",
|
2276
2262
|
)
|
2277
2263
|
|
2278
2264
|
parsed_args, remaining = parser.parse_known_args(argv)
|
2279
|
-
no_tray = parsed_args.no_tray
|
2280
2265
|
if parsed_args.server:
|
2281
2266
|
package_name = __package__ or "talks_reducer"
|
2282
2267
|
tray_module = importlib.import_module(f"{package_name}.server_tray")
|
2283
2268
|
tray_main = getattr(tray_module, "main")
|
2284
2269
|
tray_main(remaining)
|
2285
2270
|
return False
|
2271
|
+
if parsed_args.no_tray:
|
2272
|
+
sys.stderr.write(
|
2273
|
+
"Warning: --no-tray is deprecated; the GUI no longer starts the server tray automatically.\n"
|
2274
|
+
)
|
2286
2275
|
argv = remaining
|
2287
2276
|
|
2288
2277
|
if argv:
|
@@ -2298,8 +2287,6 @@ def main(argv: Optional[Sequence[str]] = None) -> bool:
|
|
2298
2287
|
if launch_gui:
|
2299
2288
|
try:
|
2300
2289
|
app = TalksReducerGUI(argv, auto_run=True)
|
2301
|
-
if not no_tray:
|
2302
|
-
_ensure_server_tray_running()
|
2303
2290
|
app.run()
|
2304
2291
|
return True
|
2305
2292
|
except Exception:
|
@@ -2361,8 +2348,6 @@ def main(argv: Optional[Sequence[str]] = None) -> bool:
|
|
2361
2348
|
# Catch and report any errors during GUI initialization
|
2362
2349
|
try:
|
2363
2350
|
app = TalksReducerGUI()
|
2364
|
-
if not no_tray:
|
2365
|
-
_ensure_server_tray_running()
|
2366
2351
|
app.run()
|
2367
2352
|
return True
|
2368
2353
|
except Exception as e:
|
File without changes
|
talks_reducer/server.py
CHANGED
@@ -144,8 +144,14 @@ class GradioProgressReporter(SignalProgressReporter):
|
|
144
144
|
self._progress_callback(bounded_current, total_value, display_desc)
|
145
145
|
|
146
146
|
|
147
|
-
|
148
|
-
|
147
|
+
_FAVICON_CANDIDATES = (
|
148
|
+
Path(__file__).resolve().parent / "resources" / "icons" / "icon.ico",
|
149
|
+
Path(__file__).resolve().parent.parent / "docs" / "assets" / "icon.ico",
|
150
|
+
)
|
151
|
+
_FAVICON_PATH: Optional[Path] = next(
|
152
|
+
(path for path in _FAVICON_CANDIDATES if path.exists()), None
|
153
|
+
)
|
154
|
+
_FAVICON_PATH_STR = str(_FAVICON_PATH) if _FAVICON_PATH else None
|
149
155
|
_WORKSPACES: list[Path] = []
|
150
156
|
|
151
157
|
|
talks_reducer/server_tray.py
CHANGED
@@ -123,14 +123,12 @@ def _iter_icon_candidates() -> Iterator[Path]:
|
|
123
123
|
if candidate_root not in expanded_roots:
|
124
124
|
expanded_roots.append(candidate_root)
|
125
125
|
|
126
|
-
if sys.platform == "win32"
|
127
|
-
icon_names = ("icon.ico", "icon.png")
|
128
|
-
else:
|
129
|
-
icon_names = ("icon.png", "icon.ico")
|
126
|
+
icon_names = ("icon.ico", "icon.png") if sys.platform == "win32" else ("icon.png", "icon.ico")
|
130
127
|
relative_paths = (
|
128
|
+
Path("talks_reducer") / "resources" / "icons",
|
129
|
+
Path("talks_reducer") / "assets",
|
131
130
|
Path("docs") / "assets",
|
132
131
|
Path("assets"),
|
133
|
-
Path("talks_reducer") / "assets",
|
134
132
|
Path(""),
|
135
133
|
)
|
136
134
|
|
@@ -409,7 +407,7 @@ class _ServerTrayApplication:
|
|
409
407
|
try:
|
410
408
|
LOGGER.info("Launching Talks Reducer GUI via %s", sys.executable)
|
411
409
|
process = subprocess.Popen(
|
412
|
-
[sys.executable, "-m", "talks_reducer.gui"
|
410
|
+
[sys.executable, "-m", "talks_reducer.gui"]
|
413
411
|
)
|
414
412
|
except Exception as exc: # pragma: no cover - platform specific
|
415
413
|
LOGGER.error("Failed to launch Talks Reducer GUI: %s", exc)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: talks-reducer
|
3
|
-
Version: 0.6.
|
3
|
+
Version: 0.6.3
|
4
4
|
Summary: CLI for speeding up long-form talks by removing silence
|
5
5
|
Author: Talks Reducer Maintainers
|
6
6
|
License-Expression: MIT
|
@@ -116,14 +116,15 @@ running Talks Reducer version and includes an **Open GUI**
|
|
116
116
|
item (also triggered by double-clicking the icon) that launches the desktop
|
117
117
|
Talks Reducer interface alongside an **Open WebUI** entry that opens the Gradio
|
118
118
|
page in your browser. Close the GUI window to return to the tray without
|
119
|
-
stopping the server.
|
120
|
-
server
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
119
|
+
stopping the server. Launch the tray explicitly whenever you need it—either run
|
120
|
+
`talks-reducer server-tray` directly or start the GUI with
|
121
|
+
`python -m talks_reducer.gui --server` to boot the tray-managed server instead
|
122
|
+
of the desktop window. The GUI now runs standalone and no longer spawns the tray
|
123
|
+
automatically; the deprecated `--no-tray` flag is ignored for compatibility.
|
124
|
+
The tray command itself never launches the GUI automatically, so use the menu
|
125
|
+
item (or relaunch the GUI separately) whenever you want to reopen it. The tray
|
126
|
+
no longer opens a browser automatically—pass `--open-browser` if you prefer the
|
127
|
+
web page to launch as soon as the server is ready.
|
127
128
|
|
128
129
|
This opens a local web page featuring a drag-and-drop upload zone, a **Small video** checkbox that mirrors the CLI preset, a live
|
129
130
|
progress indicator, and automatic previews of the processed output. The page header and browser tab title include the current
|
@@ -1,4 +1,4 @@
|
|
1
|
-
talks_reducer/__about__.py,sha256=
|
1
|
+
talks_reducer/__about__.py,sha256=Ru7aBsnrNGQTUXUg8QmcQLNkibVg9YI78rRvvzMAfek,92
|
2
2
|
talks_reducer/__init__.py,sha256=Kzh1hXaw6Vq3DyTqrnJGOq8pn0P8lvaDcsg1bFUjFKk,208
|
3
3
|
talks_reducer/__main__.py,sha256=azR_vh8HFPLaOnh-L6gUFWsL67I6iHtbeH5rQhsipGY,299
|
4
4
|
talks_reducer/audio.py,sha256=sjHMeY0H9ESG-Gn5BX0wFRBX7sXjWwsgS8u9Vb0bJ88,4396
|
@@ -6,17 +6,18 @@ talks_reducer/chunks.py,sha256=IpdZxRFPURSG5wP-OQ_p09CVP8wcKwIFysV29zOTSWI,2959
|
|
6
6
|
talks_reducer/cli.py,sha256=JH8lvPUyk6jWGcnNRIGJeIh2ZcOvC5CORvj5GLuqq0c,16075
|
7
7
|
talks_reducer/discovery.py,sha256=BJ-iMir65cJMs0u-_EYdknBQT_grvCZaJNOx1xGi2PU,4590
|
8
8
|
talks_reducer/ffmpeg.py,sha256=dsHBOBcr5XCSg0q3xmzLOcibBiEdyrXdEQa-ze5vQsM,12551
|
9
|
-
talks_reducer/gui.py,sha256=
|
9
|
+
talks_reducer/gui.py,sha256=Rzwsho7Y1nXxYP-8glthrFuRFImTyxHDW9nWlazehi4,89125
|
10
10
|
talks_reducer/models.py,sha256=6Q_8rmHLyImXp88D4B7ptTbFaH_xXa_yxs8A2dypz2Y,2004
|
11
11
|
talks_reducer/pipeline.py,sha256=naAP8gli9MahoxVdla2tRn2vdDuBBU5ywWkYfZLkMcE,12211
|
12
12
|
talks_reducer/progress.py,sha256=Mh43M6VWhjjUv9CI22xfD2EJ_7Aq3PCueqefQ9Bd5-o,4565
|
13
|
-
talks_reducer/server.py,sha256=
|
14
|
-
talks_reducer/server_tray.py,sha256=
|
13
|
+
talks_reducer/server.py,sha256=QVMBSgxeTLCanUjf2CgeveOYmSuyGzJCVIIS7uJxX-E,14163
|
14
|
+
talks_reducer/server_tray.py,sha256=GBjx7Fr18Uy5O38ZjM5VXR77ou2_AEUqx2wN8MOZuss,23380
|
15
15
|
talks_reducer/service_client.py,sha256=JnhQhRxVwrGo9eUlduoZ6f_YYyXvjU7hF8UTNprH7TM,10984
|
16
16
|
talks_reducer/version_utils.py,sha256=TkYrTznVb2JqxFXzVzPd6PEnYP2MH7dxKl1J4-3DjMA,755
|
17
|
-
talks_reducer
|
18
|
-
talks_reducer-0.6.
|
19
|
-
talks_reducer-0.6.
|
20
|
-
talks_reducer-0.6.
|
21
|
-
talks_reducer-0.6.
|
22
|
-
talks_reducer-0.6.
|
17
|
+
talks_reducer/resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
|
+
talks_reducer-0.6.3.dist-info/licenses/LICENSE,sha256=jN17mHNR3e84awmH3AbpWBcBDBzPxEH0rcOFoj1s7sQ,1124
|
19
|
+
talks_reducer-0.6.3.dist-info/METADATA,sha256=OSRp6SEzDtAV-4EJS6JNXkkSRlNKMojzPMCiq5Udev8,8415
|
20
|
+
talks_reducer-0.6.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
21
|
+
talks_reducer-0.6.3.dist-info/entry_points.txt,sha256=X2pjoh2vWBXXExVWorv1mbA1aTEVP3fyuZH4AixqZK4,208
|
22
|
+
talks_reducer-0.6.3.dist-info/top_level.txt,sha256=pJWGcy__LR9JIEKH3QJyFmk9XrIsiFtqvuMNxFdIzDU,14
|
23
|
+
talks_reducer-0.6.3.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|