mirror of
https://github.com/thegeneralist01/archivr
synced 2026-10-09 12:55:00 +02:00
feat: add YouTube subtitles, local transcription, self-updating yt-dlp/Deno, X Article and thread titles (#39)
- Capture YouTube subtitles by default (opt-out in UI, API, CLI --no-subtitles) - Summarize YouTube videos from subtitles; fetch on demand, then local transcription, then error - Local transcription fallback: Whisper, Parakeet, Phonon-2 (English only) - Runtime-resolved, self-updating yt-dlp and Deno JS runtime (fixes YouTube 403s) - Settings > Instance > yt-dlp: status and in-app update without restart - X Article titles from article.title, with idempotent startup backfill - Thread title generation (single and bulk) with per-provider cheap models - Per-provider title model settings in Settings > Instance - Docs, mental model, AGENTS.md and transcription spec updated
This commit is contained in:
parent
4f3b2968b6
commit
094f1b0457
35 changed files with 11377 additions and 583 deletions
18
flake.nix
18
flake.nix
|
|
@ -225,6 +225,7 @@
|
|||
ytDlp
|
||||
pkgs.single-file-cli
|
||||
tweetPython
|
||||
pkgs.deno
|
||||
] ++ lib.optionals pkgs.stdenv.isLinux [ pkgs.chromium ];
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
|
|
@ -232,8 +233,12 @@
|
|||
cp ${archivr_cli_unwrapped}/bin/archivr $out/libexec/archivr/archivr
|
||||
cp ${./vendor/twitter/scrape_user_tweet_contents.py} $out/libexec/archivr/scrape_user_tweet_contents.py
|
||||
chmod +x $out/libexec/archivr/scrape_user_tweet_contents.py
|
||||
# Pinned Deno is the fallback JS runtime for yt-dlp's YouTube challenge
|
||||
# solver; a newer state-dir copy from `archivr yt-dlp update` takes precedence.
|
||||
makeWrapper $out/libexec/archivr/archivr $out/bin/archivr \
|
||||
--set ARCHIVR_YT_DLP ${ytDlp}/bin/yt-dlp \
|
||||
--set ARCHIVR_DENO ${pkgs.deno}/bin/deno \
|
||||
--set ARCHIVR_FFMPEG ${pkgs.ffmpeg}/bin/ffmpeg \
|
||||
--set ARCHIVR_SINGLE_FILE ${pkgs.single-file-cli}/bin/single-file \
|
||||
${lib.optionalString pkgs.stdenv.isLinux "--set ARCHIVR_CHROME ${pkgs.chromium}/bin/chromium"} \
|
||||
--set ARCHIVR_TWEET_PYTHON ${tweetPython}/bin/python3 \
|
||||
|
|
@ -245,6 +250,7 @@
|
|||
ytDlp
|
||||
pkgs.single-file-cli
|
||||
tweetPython
|
||||
pkgs.deno
|
||||
] ++ lib.optionals pkgs.stdenv.isLinux [ pkgs.chromium ])
|
||||
}
|
||||
'';
|
||||
|
|
@ -253,7 +259,7 @@
|
|||
pname = "archivr-server-wrapped";
|
||||
inherit version;
|
||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
||||
buildInputs = [ ytDlp tweetPython pkgs.single-file-cli ] ++ lib.optionals pkgs.stdenv.isLinux [ pkgs.chromium ];
|
||||
buildInputs = [ ytDlp tweetPython pkgs.single-file-cli pkgs.deno ] ++ lib.optionals pkgs.stdenv.isLinux [ pkgs.chromium ];
|
||||
phases = [ "installPhase" ];
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/libexec/archivr-server $out/share/archivr-server/static
|
||||
|
|
@ -261,16 +267,20 @@
|
|||
cp ${./vendor/twitter/scrape_user_tweet_contents.py} $out/libexec/archivr-server/scrape_user_tweet_contents.py
|
||||
chmod +x $out/libexec/archivr-server/scrape_user_tweet_contents.py
|
||||
cp -r ${frontendStatic}/* $out/share/archivr-server/static/
|
||||
# Pinned Deno is the fallback JS runtime for yt-dlp's YouTube challenge
|
||||
# solver; a newer state-dir copy from `archivr yt-dlp update` takes precedence.
|
||||
makeWrapper $out/libexec/archivr-server/archivr-server $out/bin/archivr-server \
|
||||
--set ARCHIVR_STATIC_DIR $out/share/archivr-server/static \
|
||||
--set ARCHIVR_YT_DLP ${ytDlp}/bin/yt-dlp \
|
||||
--set ARCHIVR_DENO ${pkgs.deno}/bin/deno \
|
||||
--set ARCHIVR_FFMPEG ${pkgs.ffmpeg}/bin/ffmpeg \
|
||||
--set ARCHIVR_SINGLE_FILE ${pkgs.single-file-cli}/bin/single-file \
|
||||
${lib.optionalString pkgs.stdenv.isLinux "--set ARCHIVR_CHROME ${pkgs.chromium}/bin/chromium"} \
|
||||
--set ARCHIVR_TWEET_PYTHON ${tweetPython}/bin/python3 \
|
||||
--set ARCHIVR_TWEET_SCRAPER $out/libexec/archivr-server/scrape_user_tweet_contents.py \
|
||||
--set ARCHIVR_UBLOCK_EXT ${ublockLite} \
|
||||
--set ARCHIVR_COOKIE_EXT ${isdcac} \
|
||||
--prefix PATH : ${lib.makeBinPath ([ ytDlp pkgs.single-file-cli tweetPython ] ++ lib.optionals pkgs.stdenv.isLinux [ pkgs.chromium ])}
|
||||
--prefix PATH : ${lib.makeBinPath ([ ytDlp pkgs.single-file-cli tweetPython pkgs.deno ] ++ lib.optionals pkgs.stdenv.isLinux [ pkgs.chromium ])}
|
||||
'';
|
||||
};
|
||||
archivr-all = pkgs.symlinkJoin {
|
||||
|
|
@ -339,11 +349,13 @@
|
|||
pkgs.yt-dlp
|
||||
pkgs.nushell
|
||||
pkgs.uv
|
||||
pkgs.deno
|
||||
pkgs.ffmpeg
|
||||
tweetPython
|
||||
];
|
||||
shellHook = ''
|
||||
export SHELL=${pkgs.nushell}/bin/nu
|
||||
echo "nushell dev shell active – yt-dlp, uv, and tweet scraper Python on PATH"
|
||||
echo "nushell dev shell active – yt-dlp, deno, uv, and tweet scraper Python on PATH"
|
||||
nu
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue