预览:
图片描述

高清视频预览 - 土豆网

环境:
1. OS X 10.10.4
2. Emacs 24.5.1

需求:
1.MPV
2.BiliDan

配置:
bilidan.py做一个软连接到/usr/local/bin/bili,之后在Emacs的W3M配置中加入以下:

;; mpv
(defun w3m-play-movie ()
  (interactive)
  (let ((url (w3m-anchor)))
    (cond ((string-match "^http:\\/\\/www\\.youtube\\.com" url)
           (message (concat "loading from youtube... " url))
           (call-process "mpv" nil nil nil url))
          ((string-match "^http:\\/\\/www\\.bilibili\\.com" url)
           (message (concat "loading from bilibili..." url))
           (call-process "bili" nil nil nil url)))))

使用:
在W3M里搜索结果之中将光标移动到Youtube或BiliBili的链接之上,然后M-x输入w3m-play-movie,即会自动调用mpv播放选中链接.


venmos
462 声望15 粉丝

Maccon, Emacscon, Lolicon, ACG. False geek, Looks like a quiet guy. Love open source, Loves photography and outdoor sports. Favorite programming language is Ruby and Lisp.


引用和评论

0 条评论