From de3df2cad7f4143cad9716cba10cf47ecce8633f Mon Sep 17 00:00:00 2001 From: Benson Chu Date: Fri, 27 Sep 2024 07:40:59 -0500 Subject: [PATCH] reddit dispatcher for org-board --- lisp/org-config/org-board-custom-dispatcher.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lisp/org-config/org-board-custom-dispatcher.el b/lisp/org-config/org-board-custom-dispatcher.el index 751c5c6..6ac1832 100644 --- a/lisp/org-config/org-board-custom-dispatcher.el +++ b/lisp/org-config/org-board-custom-dispatcher.el @@ -43,6 +43,19 @@ added as a link in the `ARCHIVED_AT' property." (let ((default-directory directory)) (start-process "org-board-youtube-dl" "*org-board-youtube-dl*" youtube-dl-binary (car site)))) + ((and + (= (length site) 1) + (string-match-p "reddit" (car site))) + (message "Invoking custom reddit dispatcher!") + (make-directory directory) + (let ((default-directory directory)) + (start-process "org-board-reddit-archive" "*org-board-reddit-archive*" + (executable-find "python3") + "/home/benson/RedditArchiver-standalone/RedditArchiver.py" + "-c" + "/home/benson/RedditArchiver-standalone/config.yaml" + "-i" + (car site)))) (t (apply orig path directory args (list site))))) (advice-add #'org-board-wget-call