This repository has been archived on 2026-07-30. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
2026-07-29 16:50:43 +02:00

26 lines
1001 B
Nix

{ pkgs, ... }:
{
environment.systemPackages = [
(pkgs.writeShellScriptBin "scan" ''
find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.ogg" -o -iname "*.wav" -o -iname "*.aiff" \) -print0 |
xargs -0 -P"$(nproc)" -I{} bash -c '
if ffprobe -v quiet -show_entries format_tags \
-of default=nw=1:nk=1 "$1" 2>/dev/null |
grep -q -E "Visit https?://[^ ]+"; then
echo "Match found in: $1"
fi
' _ {} | sort
'')
(pkgs.writeShellScriptBin "2scan" ''
find . -type f \( -iname "*.mp3" -o -iname "*.flac" -o -iname "*.m4a" -o -iname "*.ogg" -o -iname "*.wav" -o -iname "*.aiff" \) -print0 |
xargs -0 -P"$(nproc)" -I{} sh -c '
if ! ffprobe -v quiet -show_entries format_tags \
-of default=nw=1:nk=1 "$1" 2>/dev/null |
grep -q -E "Visit https?://[^ ]+"; then
echo "Match found in: $1"
fi
' _ {}
'')
];
}