talks-reducer 0.6.1__tar.gz → 0.6.3__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 (35) hide show
  1. {talks_reducer-0.6.1/talks_reducer.egg-info → talks_reducer-0.6.3}/PKG-INFO +10 -9
  2. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/README.md +9 -8
  3. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/__about__.py +1 -1
  4. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/gui.py +28 -43
  5. talks_reducer-0.6.3/talks_reducer/resources/__init__.py +0 -0
  6. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/server.py +8 -2
  7. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/server_tray.py +4 -6
  8. {talks_reducer-0.6.1 → talks_reducer-0.6.3/talks_reducer.egg-info}/PKG-INFO +10 -9
  9. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer.egg-info/SOURCES.txt +1 -0
  10. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/LICENSE +0 -0
  11. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/pyproject.toml +0 -0
  12. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/setup.cfg +0 -0
  13. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/__init__.py +0 -0
  14. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/__main__.py +0 -0
  15. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/audio.py +0 -0
  16. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/chunks.py +0 -0
  17. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/cli.py +0 -0
  18. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/discovery.py +0 -0
  19. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/ffmpeg.py +0 -0
  20. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/models.py +0 -0
  21. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/pipeline.py +0 -0
  22. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/progress.py +0 -0
  23. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/service_client.py +0 -0
  24. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer/version_utils.py +0 -0
  25. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer.egg-info/dependency_links.txt +0 -0
  26. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer.egg-info/entry_points.txt +0 -0
  27. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer.egg-info/requires.txt +0 -0
  28. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/talks_reducer.egg-info/top_level.txt +0 -0
  29. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/tests/test_audio.py +0 -0
  30. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/tests/test_cli.py +0 -0
  31. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/tests/test_discovery.py +0 -0
  32. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/tests/test_gui_summary_parsing.py +0 -0
  33. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/tests/test_pipeline_service.py +0 -0
  34. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/tests/test_server.py +0 -0
  35. {talks_reducer-0.6.1 → talks_reducer-0.6.3}/tests/test_service_client.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: talks-reducer
3
- Version: 0.6.1
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. Launching the GUI directly now starts the tray-backed
120
- server in the background before the window appears so the icon stays available
121
- after you close it; add `--no-tray` when running `python -m talks_reducer.gui`
122
- if you prefer to skip the background server entirely. The tray command itself
123
- never launches the GUI automatically, so use the menu item (or rerun the GUI
124
- with `--no-tray`) whenever you want to reopen it. The tray no longer opens a
125
- browser automatically—pass `--open-browser` if you prefer the web page to
126
- launch as soon as the server is ready.
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
@@ -88,14 +88,15 @@ running Talks Reducer version and includes an **Open GUI**
88
88
  item (also triggered by double-clicking the icon) that launches the desktop
89
89
  Talks Reducer interface alongside an **Open WebUI** entry that opens the Gradio
90
90
  page in your browser. Close the GUI window to return to the tray without
91
- stopping the server. Launching the GUI directly now starts the tray-backed
92
- server in the background before the window appears so the icon stays available
93
- after you close it; add `--no-tray` when running `python -m talks_reducer.gui`
94
- if you prefer to skip the background server entirely. The tray command itself
95
- never launches the GUI automatically, so use the menu item (or rerun the GUI
96
- with `--no-tray`) whenever you want to reopen it. The tray no longer opens a
97
- browser automatically—pass `--open-browser` if you prefer the web page to
98
- launch as soon as the server is ready.
91
+ stopping the server. Launch the tray explicitly whenever you need it—either run
92
+ `talks-reducer server-tray` directly or start the GUI with
93
+ `python -m talks_reducer.gui --server` to boot the tray-managed server instead
94
+ of the desktop window. The GUI now runs standalone and no longer spawns the tray
95
+ automatically; the deprecated `--no-tray` flag is ignored for compatibility.
96
+ The tray command itself never launches the GUI automatically, so use the menu
97
+ item (or relaunch the GUI separately) whenever you want to reopen it. The tray
98
+ no longer opens a browser automatically—pass `--open-browser` if you prefer the
99
+ web page to launch as soon as the server is ready.
99
100
 
100
101
  This opens a local web page featuring a drag-and-drop upload zone, a **Small video** checkbox that mirrors the CLI preset, a live
101
102
  progress indicator, and automatic previews of the processed output. The page header and browser tab title include the current
@@ -2,4 +2,4 @@
2
2
 
3
3
  __all__ = ["__version__"]
4
4
 
5
- __version__ = "0.6.1"
5
+ __version__ = "0.6.3"
@@ -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((base_path / "docs" / "assets" / "icon.ico", "ico"))
532
- icon_candidates.append((base_path / "docs" / "assets" / "icon.png", "png"))
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
- "--no-tray",
2254
+ "--server",
2269
2255
  action="store_true",
2270
- help="Do not start the Talks Reducer server tray alongside the GUI.",
2256
+ help="Launch the Talks Reducer server tray instead of the desktop GUI.",
2271
2257
  )
2272
2258
  parser.add_argument(
2273
- "--server",
2259
+ "--no-tray",
2274
2260
  action="store_true",
2275
- help="Launch the Talks Reducer server tray instead of the desktop GUI.",
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:
@@ -144,8 +144,14 @@ class GradioProgressReporter(SignalProgressReporter):
144
144
  self._progress_callback(bounded_current, total_value, display_desc)
145
145
 
146
146
 
147
- _FAVICON_PATH = Path(__file__).resolve().parent.parent / "docs" / "assets" / "icon.ico"
148
- _FAVICON_PATH_STR = str(_FAVICON_PATH) if _FAVICON_PATH.exists() else None
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
 
@@ -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", "--no-tray"]
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.1
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. Launching the GUI directly now starts the tray-backed
120
- server in the background before the window appears so the icon stays available
121
- after you close it; add `--no-tray` when running `python -m talks_reducer.gui`
122
- if you prefer to skip the background server entirely. The tray command itself
123
- never launches the GUI automatically, so use the menu item (or rerun the GUI
124
- with `--no-tray`) whenever you want to reopen it. The tray no longer opens a
125
- browser automatically—pass `--open-browser` if you prefer the web page to
126
- launch as soon as the server is ready.
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
@@ -23,6 +23,7 @@ talks_reducer.egg-info/dependency_links.txt
23
23
  talks_reducer.egg-info/entry_points.txt
24
24
  talks_reducer.egg-info/requires.txt
25
25
  talks_reducer.egg-info/top_level.txt
26
+ talks_reducer/resources/__init__.py
26
27
  tests/test_audio.py
27
28
  tests/test_cli.py
28
29
  tests/test_discovery.py
File without changes
File without changes