summaryrefslogtreecommitdiff
path: root/gnosis.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-03-03 02:19:18 +0200
committerThanos Apollo <[email protected]>2024-03-03 02:19:18 +0200
commitd04392c8b41b7b1add7a6eeb6f4686673b61f308 (patch)
tree4b24bd1751240be1ca66ef7ecddf8dd0cfb4cf85 /gnosis.el
parent2d8cf433510b6e5bdf2b203d7b8b85b876b98e99 (diff)
Add gnosis-edit-deck--export
Diffstat (limited to 'gnosis.el')
-rw-r--r--gnosis.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index f06bf01..dcdb964 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1223,6 +1223,20 @@ changes."
(gnosis-edit-read-only-values (format ":id %s" id) ":main" ":options" ":answer"
":tags" ":extra-notes" ":image" ":second-image"
":ef" ":ff" ":suspend"))
+(defun gnosis-edit-deck--export (id)
+ "Export deck with ID.
+
+WARNING: This export is only for editing said deck!
+
+Insert deck values `ef-increase', `ef-decrease', `ef-threshold', `failure-factor'"
+ (let ((name (gnosis-get 'name 'decks `(= id ,id)))
+ (ef-increase (gnosis-get 'ef-increase 'decks `(= id ,id)))
+ (ef-decrease (gnosis-get 'ef-decrease 'decks `(= id ,id)))
+ (ef-threshold (gnosis-get 'ef-threshold 'decks `(= id ,id)))
+ (failure-factor (gnosis-get 'failure-factor 'decks `(= id ,id))))
+ (insert (format "\n:id %s\n:name \"%s\"\n:ef-increase %s\n:ef-decrease %s\n:ef-threshold %s\n:failure-factor %s"
+ id name ef-increase ef-decrease ef-threshold failure-factor))))
+
(cl-defun gnosis-edit-save-exit (&optional deck-edit (exit-func 'exit-recursive-edit) &rest args)
"Save edits and exit.