Next: Youtube-dl current page

master
Pierre Neidhardt 2018-12-10 13:43:52 +01:00
parent 927ad13a7b
commit 1b841e2ffe
1 changed files with 12 additions and 0 deletions

View File

@ -40,3 +40,15 @@
url title)))))))
(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)