diff options
author | makefu <makefu@nixos.dev> | 2016-05-02 16:08:30 +0200 |
---|---|---|
committer | makefu <makefu@nixos.dev> | 2016-05-02 16:08:30 +0200 |
commit | 64aa4f6912fb7425d8063e5d143f59c43fb31b8f (patch) | |
tree | 07fe7c386d32bd5e1375a7d01f623cd357a1d09d /lass/5pkgs/yt-next/default.nix | |
parent | 3f77b6c89f4a3a28d62e9117712481489ac56fa1 (diff) | |
parent | 6f4bc4b34c3cbac56f6a23740dca566980823990 (diff) |
Merge branch 'master' of gum:stockholm
Diffstat (limited to 'lass/5pkgs/yt-next/default.nix')
-rw-r--r-- | lass/5pkgs/yt-next/default.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lass/5pkgs/yt-next/default.nix b/lass/5pkgs/yt-next/default.nix new file mode 100644 index 000000000..8132b4f05 --- /dev/null +++ b/lass/5pkgs/yt-next/default.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: + +pkgs.writeScriptBin "yt-next" '' + #! ${pkgs.bash}/bin/bash + + vid=$1 + num=''${NUM:-1} + + curl -Ls $1 \ + | grep 'href="/watch?v=' \ + | head -n$num \ + | sed 's,.*href="\([^"]*\)".*,https://youtube.com\1,' +'' |