Read video from elfeed (v on elfeed entry) and feeds update
Add elfeed-view-mpv function to elfeed to play youtube video directly from emacs and using mpv. Add the following youtube channels to elfeed: EmacsConf, Pyjamas, Matrixdotorg, ENS, System Crafters, Emacs confs, CommCon, Linux fondation org, Arte, Talk Python and Python Bytes posdcast.
This commit is contained in:
@@ -4,6 +4,27 @@
|
||||
|
||||
;; https://github.com/skeeto/elfeed
|
||||
;; An Emacs web feeds client
|
||||
|
||||
(require 'elfeed)
|
||||
|
||||
;; From https://medium.com/emacs/using-elfeed-to-view-videos-6dfc798e51e6
|
||||
(defun elfeed-v-mpv (url)
|
||||
"Watch a video from URL in MPV."
|
||||
(async-shell-command (format "mpv --cache=yes --cache-secs=60 %s" url)))
|
||||
|
||||
(defun elfeed-view-mpv (&optional use-generic-p)
|
||||
"Youtube-feed link."
|
||||
(interactive "P")
|
||||
(let ((entries (elfeed-search-selected)))
|
||||
(cl-loop for entry in entries
|
||||
do (elfeed-untag entry 'unread)
|
||||
when (elfeed-entry-link entry)
|
||||
do (elfeed-v-mpv it))
|
||||
(mapc #'elfeed-search-update-entry entries)
|
||||
(unless (use-region-p) (forward-line))))
|
||||
|
||||
(define-key elfeed-search-mode-map (kbd "v") 'elfeed-view-mpv)
|
||||
|
||||
(use-package elfeed
|
||||
:ensure t
|
||||
:commands elfeed
|
||||
@@ -15,10 +36,26 @@
|
||||
"https://blog.finxter.com/feed"
|
||||
"https://planet.emacslife.com/atom.xml"
|
||||
"https://planetpython.org/rss20.xml"
|
||||
"http://www.reddit.com/r/emacs/.rss"
|
||||
;; "http://www.reddit.com/r/emacs/.rss"
|
||||
"http://linuxfr.org/journaux.atom"
|
||||
"https://xkcd.com/atom.xml"
|
||||
"https://pyjamas.live/feed.xml"
|
||||
"https://medium.com/feed/tag/python"
|
||||
"https://blog.devgenius.io/feed"
|
||||
"https://mathspp.com/blog.atom"
|
||||
"https://lwn.net/headlines/rss"
|
||||
"https://nyxt.atlas.engineer/feed"
|
||||
"https://pyvideo.org/feeds/all.rss.xml"
|
||||
"https://toobnix.org/feeds/videos.xml?videoChannelId=154" ;; EmacsConf
|
||||
"https://www.youtube.com/feeds/videos.xml?channel_id=UCWCFzEJd7PhVulMXwGjcYAA" ;; Pyjamas
|
||||
"https://www.youtube.com/feeds/videos.xml?channel_id=UCVFkW-chclhuyYRbmmfwt6w" ;; Matrixdotorg
|
||||
"https://www.youtube.com/feeds/videos.xml?channel_id=UCbn8O8WwMeoZsPRxgumfvAQ" ;; ENS
|
||||
"https://www.youtube.com/feeds/videos.xml?channel_id=UCAiiOTio8Yu69c3XnR7nQBQ" ;; System Crafters
|
||||
"https://www.youtube.com/feeds/videos.xml?channel_id=UCwuyodzTl_KdEKNuJmeo99A" ;; Emacs confs
|
||||
"https://www.youtube.com/feeds/videos.xml?channel_id=UCe_eAP4ToqFLSxzvkTlNzUQ" ;; CommCon
|
||||
"https://www.youtube.com/feeds/videos.xml?channel_id=UCfX55Sx5hEFjoC3cNs6mCUQ" ;; Linux foundation Org
|
||||
"https://www.youtube.com/feeds/videos.xml?channel_id=UCwI-JbGNsojunnHbFAc0M4Q" ;; Arte
|
||||
"https://www.youtube.com/feeds/videos.xml?channel_id=UCKPSmMfDsXTKrCZApukcJ7A" ;; Talk Python
|
||||
"https://www.youtube.com/feeds/videos.xml?channel_id=UCK_eZkV9CYCxhdf9f0dEukA" ;; Python Bytes Podcast
|
||||
)))
|
||||
|
||||
(provide 'apps/elfeed)
|
||||
|
Reference in New Issue
Block a user