1 ;;; ob-redis.el --- Execute Redis queries within org-mode blocks.
2 ;; Copyright 2016 stardiviner
4 ;; Author: stardiviner <numbchild@gmail.com>
5 ;; Maintainer: stardiviner <numbchild@gmail.com>
6 ;; Keywords: org babel redis
7 ;; URL: https://repo.or.cz/ob-redis.git
8 ;; Created: 28th Feb 2016
10 ;; Package-Requires: ((org "8"))
14 ;; Execute Redis queries within org-mode blocks.
19 (defgroup ob-redis nil
20 "org-mode blocks for Redis."
23 (defcustom ob-redis
:default-db
"127.0.0.1:6379"
24 "Default Redis database."
29 (defun org-babel-execute:redis
(body params
)
30 "org-babel redis hook."
31 (let* ((db (or (cdr (assoc :db params
))
33 (cmd (mapconcat 'identity
(list "redis-cli") " ")))
34 (org-babel-eval cmd body
)
39 '(add-to-list 'org-src-lang-modes
'("redis" . redis
)))
43 ;;; ob-redis.el ends here