From 48a5e69b515861127f566110a1f82711633dcf33 Mon Sep 17 00:00:00 2001 From: Yuchen Pei Date: Mon, 6 Jan 2025 21:30:13 +1100 Subject: [emacs][rofi] browse-url jira from org-jira * emacs/.emacs.d/init/ycp-web.el: Add org link handling jira; add my-org-jira-open-url as a browse-url-handler * emacs/.emacs.d/lisp/my/my-org-jira.el: add functions to fetch jira issue given a url * emacs/.emacs.d/lisp/my/my-web.el: remove the redundant my-browse-url now that we use browse-url-handlers * emacs/.emacs.d/lisp/my/my-ytdl.el: infobox to extract from ytdl supported video urls * misc/.config/rofi/config.rasi: newer versions of rofi does not do glob matching like prefix any more --- emacs/.emacs.d/lisp/my/my-ytdl.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'emacs/.emacs.d/lisp/my/my-ytdl.el') diff --git a/emacs/.emacs.d/lisp/my/my-ytdl.el b/emacs/.emacs.d/lisp/my/my-ytdl.el index 9118493..d3998ee 100644 --- a/emacs/.emacs.d/lisp/my/my-ytdl.el +++ b/emacs/.emacs.d/lisp/my/my-ytdl.el @@ -76,6 +76,18 @@ (if (eq type 'video) my-ytdl-video-args my-ytdl-audio-args) (split-string urls))))) +(defun my-ytdl-video-info (url) + "Given a video URL, return an alist of its properties." + (with-temp-buffer + (call-process my-ytdl-program nil t nil "-j" url) + (let ((start (point))) + (call-process-region + nil nil "jq" nil t nil + "pick(.webpage_url, .fulltitle, .description, .channel_url, .channel, .channel_follower_count, .thumbnail, .duration_string, .view_count, .upload_date, .like_count, .is_live, .was_live, .categories, .tags, .chapters, .availability)") + (goto-char start) + (json-read))) + ) + ;;; fixme: autoload (defun my-ytdl-video (urls) "Download videos with ytdl." -- cgit v1.2.3