summaryrefslogtreecommitdiff
path: root/src/gizmo/wasp-gcp.el
diff options
context:
space:
mode:
authorLLLL Colonq <llll@colonq>2026-04-26 23:47:18 -0400
committerLLLL Colonq <llll@colonq>2026-04-26 23:47:18 -0400
commit75e005e81b73d8471f16dc5fad7bbdc312bdbfe7 (patch)
tree1ad7d61b04c44fc52b453aef44868a42012f3551 /src/gizmo/wasp-gcp.el
parentcf266a56f30daae8b9af7c9bc3267c61b1973192 (diff)
Diffstat (limited to 'src/gizmo/wasp-gcp.el')
-rw-r--r--src/gizmo/wasp-gcp.el10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gizmo/wasp-gcp.el b/src/gizmo/wasp-gcp.el
index c9c584b0..cd1bfa81 100644
--- a/src/gizmo/wasp-gcp.el
+++ b/src/gizmo/wasp-gcp.el
@@ -16,6 +16,7 @@
:group 'wasp)
(defvar w/gcp-last-response nil)
+(defvar w/gcp 0.0)
(defun w/gcp-get (loc k)
"Get LOC from GCP, passing the returned HTML to K."
@@ -36,7 +37,9 @@
(w/gcp-get
"/gcpdot/gcpindex.php"
(lambda (d)
- (funcall k (string-to-number (caddar (last (cddr (cadddr d)))))))))
+ (when-let* ((ds (caddar (last (cddr (cadddr d))))))
+ (setf w/gcp (string-to-number ds))
+ (funcall k w/gcp)))))
(defun w/gcp-describe (n)
"Describe GCP index N."
@@ -48,5 +51,10 @@
((< n 0.95) "Light blue dot. Small network variance. Probably chance fluctuation.")
(t "Blue dot. Significantly small network variance. Suggestive of deeply shared, internally motivated group focus.")))
+(defun w/gcp-update ()
+ "Update the GCP index."
+ (w/gcp-dot (lambda (_) nil)))
+(add-hook 'w/gizmo-update-hook #'w/gcp-update)
+
(provide 'wasp-gcp)
;;; wasp-gcp.el ends here