-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpatchfoo.el
36 lines (27 loc) · 882 Bytes
/
patchfoo.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Render via Patchfoo ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;
; This is probably the easiest way to get started.
; ssb is rendered locally via Patchfoo, then
; viewed with eww.
; Install patchfoo as a sbot plugin, then run
; M-x ssb-eww-patchfoo
(defun ssb-start-patchfoo ()
(interactive)
(start-process "ssb-patchfoo"
"ssb-patchfoo-buffer"
"sbot" "server" "-patchfoo.port" "8027"))
(defun ssb-stop-patchfoo ()
(interactive)
(process-send-eof "ssb-patchfoo")
(kill-buffer "ssb-patchfoo-buffer"))
(defun ssb-check-patchfoo ()
(if (not (process-status "ssb-patchfoo"))
(if (y-or-n-p "Patchfoo is not running, start?")
(progn
(ssb-start-patchfoo)
(sleep-for 1)))))
(defun ssb-eww-patchfoo ()
(interactive)
(ssb-check-patchfoo)
(eww "http://localhost:8027"))