diff options
author | Thanos Apollo <[email protected]> | 2023-12-25 17:35:56 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-25 17:35:56 +0200 |
commit | 55ec53bddd50cbb6cdde897ba85a62336659cf44 (patch) | |
tree | 44804c9480e1711800ef53b096cfff1b06cc234f /gnosis.el | |
parent | a3e2f9a9289f709bad01e44f442dfaa762533b08 (diff) |
Add gnosis-dir & subdirectorites/files
All files for gnosis will be located in gnosis-dir
Diffstat (limited to 'gnosis.el')
-rw-r--r-- | gnosis.el | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -43,7 +43,21 @@ :group 'external :prefix "gnosis-") -(defvar gnosis-db (emacsql-sqlite (concat user-emacs-directory "gnosis.db"))) +(defcustom gnosis-dir (concat user-emacs-directory "gnosis") + "Gnosis directory." + :type 'directory + :group 'gnosis) + + +(defvar gnosis-images-dir (concat gnosis-dir "/" "images") + "Gnosis images directory.") + +(unless (file-exists-p gnosis-images-dir) + (make-directory gnosis-dir) + (make-directory gnosis-images-dir)) + +(defvar gnosis-db (emacsql-sqlite (concat gnosis-dir "/" "gnosis.db")) + "Gnosis database.") (cl-defun gnosis--select (value table &optional (restrictions '1=1)) "Select VALUE from TABLE, optionally with RESTRICTIONS." |