summaryrefslogtreecommitdiffhomepage
path: root/lib/doc/jao-devon.el
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2025-09-27 19:32:02 +0100
committerjao <jao@gnu.org>2025-09-27 19:32:02 +0100
commitfd27d027d8c48045723914632d0a115eab52f7cd (patch)
treec1e31df0b8b1e0453212f453a2c6a3b8ecf58d13 /lib/doc/jao-devon.el
parentd5ba2e907bfafc5ce110fbce99a8e851649d0c9e (diff)
downloadelibs-fd27d027d8c48045723914632d0a115eab52f7cd.tar.gz
elibs-fd27d027d8c48045723914632d0a115eab52f7cd.tar.bz2
reading pdfs in a mac
Diffstat (limited to 'lib/doc/jao-devon.el')
-rw-r--r--lib/doc/jao-devon.el55
1 files changed, 0 insertions, 55 deletions
diff --git a/lib/doc/jao-devon.el b/lib/doc/jao-devon.el
deleted file mode 100644
index 489307e..0000000
--- a/lib/doc/jao-devon.el
+++ /dev/null
@@ -1,55 +0,0 @@
-;;; jao-devon.el --- Utilities to interact with devonthink -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2025 Jose Antonio Ortega Ruiz
-
-;; Author: Jose Antonio Ortega Ruiz <mail@jao.io>
-;; Keywords: docs
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; Searches and general scripting in devon.
-
-;;; Code:
-
-(defun jao-devon--do-applescript (script)
- (let (start cmd return)
- (while (string-match "\n" script)
- (setq script (replace-match "\r" t t script)))
- (while (string-match "'" script start)
- (setq start (+ 2 (match-beginning 0))
- script (replace-match "\\'" t t script)))
- (setq cmd (concat "osascript -e '" script "'"))
- (setq return (shell-command-to-string cmd))
- (string-trim return)))
-
-(defun jao-devon-tell (&rest script-lines)
- (let ((scpt (mapconcat 'identity
- (append (cons "tell application id \"DNtp\""
- script-lines)
- '("end tell\n"))
- "\n")))
- (jao-devon--do-applescript scpt)))
-
-(defun jao-devon-find-url (file)
- (jao-devon-tell
- "repeat with db in databases"
- (format "set res to lookup records with path %S in db" (file-truename file))
- "if res /= {} then return the reference URL of (item 1 of res)"
- "end repeat"
- "return \"\""))
-
-(provide 'jao-devon)
-;;; jao-devon.el ends here