Next: Youtube-dl current page
parent
927ad13a7b
commit
1b841e2ffe
|
@ -40,3 +40,15 @@
|
||||||
url title)))))))
|
url title)))))))
|
||||||
|
|
||||||
(define-key *global-map* (key "C-M-o") #'org-capture)
|
(define-key *global-map* (key "C-M-o") #'org-capture)
|
||||||
|
|
||||||
|
(define-command youtube-dl-current-page ()
|
||||||
|
"Download a video in the currently open buffer."
|
||||||
|
(with-result (url (buffer-get-url))
|
||||||
|
(uiop:run-program
|
||||||
|
(list "emacsclient" "--eval"
|
||||||
|
(format nil
|
||||||
|
(if (search "youtu" url)
|
||||||
|
"(progn (youtube-dl \"~a\") (youtube-dl-list))"
|
||||||
|
"(ambrevar/youtube-dl-at-point \"~a\")")
|
||||||
|
url)))))
|
||||||
|
(define-key *global-map* (key "C-M-c d") 'youtube-dl-current-page)
|
||||||
|
|
Loading…
Reference in New Issue