unoffice

Reclaim text from office documents
git clone https://logand.com/git/unoffice.git/
Log | Files | Refs | README

commit 1f08a3941df295f0018972de9c56e4bdd4e7b660
parent 6337b07096a2470640ee1ee8b7a486b72e6ea407
Author: Tomas Hlavaty <tom@logand.com>
Date:   Thu, 26 Sep 2019 08:39:12 +0200

customizable program paths

Diffstat:
Munoffice.el | 24+++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/unoffice.el b/unoffice.el @@ -6,6 +6,24 @@ ;;; ;;; License: GPL v3 or later +(defcustom unoffice-unabw-program + "unabw" + "Path of the unabw program." + :group 'unoffice + :type 'string) + +(defcustom unoffice-undocx-program + "undocx" + "Path of the undocx program." + :group 'unoffice + :type 'string) + +(defcustom unoffice-unodt-program + "unodt" + "Path of the unodt program." + :group 'unoffice + :type 'string) + (defun unoffice-buffer (program) (setq buffer-read-only nil) (let ((coding-system-for-read 'utf-8-unix)) @@ -18,13 +36,13 @@ (set-buffer-modified-p nil)) (defun unabw () - (unoffice-buffer "unabw")) + (unoffice-buffer unoffice-unabw-program)) (defun undocx () - (unoffice-buffer "undocx")) + (unoffice-buffer unoffice-undocx-program)) (defun unodt () - (unoffice-buffer "unodt")) + (unoffice-buffer unoffice-unodt-program)) (add-to-list 'auto-mode-alist '("\\.abw\\'" . unabw)) (add-to-list 'auto-mode-alist '("\\.docx\\'" . undocx))