refactor: drop yt-transcribe-watcher; transcripts belong at reclip download time
Per the captain: no watcher as primary. reclip gets the transcript patch (bind-mounted app.py/index.html override on Unraid, see data/documents/reclip/DEPLOY.md); yt-transcribe stays as the manual fallback and for captionless media. Launchd agent removed.
This commit is contained in:
1 parent
9821fde02b
commit
62923e8344
3 files changed
+6
-27
No files matched your search
+1
-18
@@ -76,23 +76,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# yt-transcribe-watcher: scans reclip's download dir (media/video on the
|
launchd.user.agents = { };
|
||||||
# Unraid share) every 5 min and transcribes new media files (Whisper — a
|
|
||||||
# bare download carries no captions). Runs the nix-store copy through a
|
|
||||||
# stable ~/.local/bin symlink — launchd can neither exec from the SMB share
|
|
||||||
# (EPERM) nor reach into TCC-protected ~/Documents. Silent exit when the
|
|
||||||
# share is unmounted.
|
|
||||||
launchd.user.agents."yt-transcribe-watcher" = {
|
|
||||||
command = "/Users/laptran/.local/bin/yt-transcribe-watcher";
|
|
||||||
serviceConfig = {
|
|
||||||
StartInterval = 300;
|
|
||||||
StandardOutPath = "/tmp/yt-transcribe-watcher.out";
|
|
||||||
StandardErrorPath = "/tmp/yt-transcribe-watcher.err";
|
|
||||||
EnvironmentVariables = {
|
|
||||||
HOME = "/Users/laptran";
|
|
||||||
PATH = "/usr/bin:/bin:/usr/sbin:/sbin";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10,7 +10,6 @@ let
|
|||||||
# ~/.local/bin symlinks below survive store-path changes between rebuilds.
|
# ~/.local/bin symlinks below survive store-path changes between rebuilds.
|
||||||
ytTranscribe = pkgs.runCommand "yt-transcribe" { } ''
|
ytTranscribe = pkgs.runCommand "yt-transcribe" { } ''
|
||||||
install -Dm755 ${./home/bin/yt-transcribe} $out/bin/yt-transcribe
|
install -Dm755 ${./home/bin/yt-transcribe} $out/bin/yt-transcribe
|
||||||
install -Dm755 ${./home/bin/yt-transcribe-watcher} $out/bin/yt-transcribe-watcher
|
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
|
|
||||||
@@ -204,15 +203,12 @@ in
|
|||||||
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/bin/security-audit-sandbox";
|
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/bin/security-audit-sandbox";
|
||||||
force = true;
|
force = true;
|
||||||
};
|
};
|
||||||
# Stable symlinks for yt-transcribe: launchd and shells exec these from local
|
# Stable symlink for yt-transcribe: shells exec it from local disk. The
|
||||||
# disk. The repo's home/bin scripts are the source of truth — a repo edit
|
# repo's home/bin script is the source of truth — a repo edit takes effect
|
||||||
# takes effect on the next rebuild; the Unraid share holds only data.
|
# on the next rebuild; the Unraid share holds only data.
|
||||||
home.file.".local/bin/yt-transcribe" = {
|
home.file.".local/bin/yt-transcribe" = {
|
||||||
source = "${ytTranscribe}/bin/yt-transcribe";
|
source = "${ytTranscribe}/bin/yt-transcribe";
|
||||||
};
|
};
|
||||||
home.file.".local/bin/yt-transcribe-watcher" = {
|
|
||||||
source = "${ytTranscribe}/bin/yt-transcribe-watcher";
|
|
||||||
};
|
|
||||||
home.file.".grok/AGENTS.md" = {
|
home.file.".grok/AGENTS.md" = {
|
||||||
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/AGENTS.md";
|
source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/AGENTS.md";
|
||||||
force = true;
|
force = true;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
# YT_TRANSCRIBE_ROOT (transcript root), YT_MEDIA_DIR (reclip download dir),
|
# YT_TRANSCRIBE_ROOT (transcript root), YT_MEDIA_DIR (reclip download dir),
|
||||||
# YT_COOKIES (cookies.txt for yt-dlp/gallery-dl).
|
# YT_COOKIES (cookies.txt for yt-dlp/gallery-dl).
|
||||||
# Index: `yt-transcribe --list` prints id->title mapping; --index rewrites
|
# Index: `yt-transcribe --list` prints id->title mapping; --index rewrites
|
||||||
# INDEX.md next to the transcripts; both modes + the watcher refresh it.
|
# INDEX.md next to the transcripts; both modes refresh it after each run.
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ for dirpath, dirs, files in os.walk(scan_dir):
|
|||||||
mt = time.strftime("%Y-%m-%d", time.localtime(os.path.getmtime(p)))
|
mt = time.strftime("%Y-%m-%d", time.localtime(os.path.getmtime(p)))
|
||||||
L.append(f"| `{clean(fn)}` | {mt} |")
|
L.append(f"| `{clean(fn)}` | {mt} |")
|
||||||
if not found:
|
if not found:
|
||||||
L.append("| _(none yet — the watcher adds one per download)_ | |")
|
L.append("| _(none yet — patched reclip or manual file-mode runs add one per download)_ | |")
|
||||||
print("\n".join(L))
|
print("\n".join(L))
|
||||||
PY
|
PY
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user