new audio script
This commit is contained in:
parent
8a2f146473
commit
4695b1f7ea
4 changed files with 30 additions and 4 deletions
|
@ -2495,11 +2495,11 @@ config.bind("v", 'hint links spawn --detach empv "{hint-url}"')
|
||||||
config.bind("gc", 'spawn org-capture "{url}"')
|
config.bind("gc", 'spawn org-capture "{url}"')
|
||||||
config.bind(
|
config.bind(
|
||||||
"gV",
|
"gV",
|
||||||
"hint links spawn alacritty -e yt-dlp -o ~/vids/%(title)s.%(ext)s {hint-url}",
|
"hint links spawn alacritty -e dlvid.lisp {hint-url}",
|
||||||
)
|
)
|
||||||
config.bind(
|
config.bind(
|
||||||
"ga",
|
"ga",
|
||||||
"hint links spawn alacritty -e yt-dlp -x --audio-format mp3 --audio-quality 0 -f bestaudio --embed-thumbnail --add-metadata --embed-metadata -o ~/music/%(title)s.%(ext)s {hint-url}",
|
"hint links spawn alacritty -e dlaudio.lisp {hint-url}",
|
||||||
)
|
)
|
||||||
|
|
||||||
config.bind(
|
config.bind(
|
||||||
|
|
|
@ -259,7 +259,7 @@ const Instances = {
|
||||||
// "libreddit.tiekoetter.com",
|
// "libreddit.tiekoetter.com",
|
||||||
// "l.opnxng.com",
|
// "l.opnxng.com",
|
||||||
// "libreddit.projectsegfau.lt",
|
// "libreddit.projectsegfau.lt",
|
||||||
"libreddit.privacydev.net",
|
// "libreddit.privacydev.net",
|
||||||
// "libreddit.freedit.eu",
|
// "libreddit.freedit.eu",
|
||||||
// "libreddit.mha.fi",
|
// "libreddit.mha.fi",
|
||||||
// "lr.artemislena.eu",
|
// "lr.artemislena.eu",
|
||||||
|
|
26
scripts/dlaudio.lisp
Executable file
26
scripts/dlaudio.lisp
Executable file
|
@ -0,0 +1,26 @@
|
||||||
|
#!/usr/bin/env -S sbcl --script
|
||||||
|
(require "uiop")
|
||||||
|
(load "/home/chris/.sbclrc")
|
||||||
|
(ql:quickload :serapeum)
|
||||||
|
|
||||||
|
(defvar *url* (car (uiop:command-line-arguments)))
|
||||||
|
|
||||||
|
(defun dlvid (url)
|
||||||
|
(run-program "yt-dlp"
|
||||||
|
`("-x"
|
||||||
|
"-o"
|
||||||
|
"~/music/%(playlist)s-%(artist)s/%(playlist_index)s - %(title)s.%(ext)s"
|
||||||
|
,url
|
||||||
|
"--embed-thumbnail"
|
||||||
|
"--sponsorblock-remove=sponsor,intro,outro")
|
||||||
|
:search "/run/current-system/sw/bin/"
|
||||||
|
:output t))
|
||||||
|
|
||||||
|
(defun main ()
|
||||||
|
(if (serapeum:string-contains-p "inv.cochrun.xyz" *url*)
|
||||||
|
(let ((url (serapeum:string-replace-all
|
||||||
|
"inv.cochrun.xyz" *url* "youtube.com")))
|
||||||
|
(dlvid (string url)))
|
||||||
|
(dlvid (string url))))
|
||||||
|
|
||||||
|
(main)
|
|
@ -1,3 +1,3 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
transmission-remote 192.168.1.2 -a "$@" && notify-send " Transmission On Server" "Torrent added"
|
transmission-remote "home.cochrun.xyz/transmission/rpc" -a "$@" && notify-send " Transmission On Server" "Torrent added"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue