fetchforge 2.0.0__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.
fetchforge/__init__.py ADDED
@@ -0,0 +1,3 @@
1
+ """FetchForge — download YouTube videos and transcode to H.265/HEVC with NVIDIA NVENC."""
2
+
3
+ __version__ = "2.0.0"
fetchforge/__main__.py ADDED
@@ -0,0 +1,4 @@
1
+ import sys
2
+ from fetchforge.cli import main
3
+
4
+ sys.exit(main())
fetchforge/cli.py ADDED
@@ -0,0 +1,27 @@
1
+ """`fetchforge` console entry point: preflight ffmpeg/NVENC, then run the app."""
2
+ from __future__ import annotations
3
+
4
+ import shutil
5
+ import sys
6
+
7
+ from fetchforge import provision
8
+
9
+
10
+ def main(argv: list[str] | None = None) -> int:
11
+ try:
12
+ provision.ensure_ffmpeg()
13
+ except provision.ProvisionError as e:
14
+ if shutil.which("ffmpeg"):
15
+ print(
16
+ f"WARNING: {e}\n\nStarting without NVENC — YouTube download and "
17
+ "audio-extract work, but the H.265 transcode needs an NVENC-capable "
18
+ "ffmpeg + NVIDIA GPU.\n",
19
+ file=sys.stderr,
20
+ )
21
+ else:
22
+ print(f"FetchForge cannot start:\n\n{e}\n", file=sys.stderr)
23
+ return 1
24
+ # Import after preflight so tool resolution sees a provisioned ffmpeg on PATH.
25
+ from fetchforge import server
26
+ server.run_server(open_browser=True)
27
+ return 0