branch: elpa/gnosis commit 8ae553f03fc745d1881126f21e966be72a609c47 Author: Thanos Apollo <pub...@thanosapollo.org> Commit: Thanos Apollo <pub...@thanosapollo.org>
Remove deprecated demo. + Demo deck will be provided as an org-mode file. --- gnosis.el | 88 --------------------------------------------------------------- 1 file changed, 88 deletions(-) diff --git a/gnosis.el b/gnosis.el index a504b2c2d0..f4611ca120 100644 --- a/gnosis.el +++ b/gnosis.el @@ -2399,94 +2399,6 @@ Return note ids for notes that match QUERY." (gnosis-db-update-v3))))) (gnosis-db-init) -;;;; Gnosis Demo ;;;; -;;;;;;;;;;;;;;;;;;;;; - -(defun gnosis-animate-string (string vpos &optional hpos string-section face) - "Display STRING animations starting at position VPOS, HPOS in BUFFER-NAME. - -If STRING-SECTION and FACE are provided, highlight the occurrences of -STRING-SECTION in the STRING with FACE. - -If STRING-SECTION is nil, apply FACE to the entire STRING." - (let ((animate-n-steps 60)) - (goto-char (point-min)) - (animate-string string vpos hpos) - (and face - (if string-section - (progn - (goto-char (point-min)) - (while (search-forward string-section nil t) - (add-text-properties (match-beginning 0) (match-end 0) `(face ,face)))) - (add-text-properties (line-beginning-position) (line-end-position) `(face ,face)))))) - -;;;###autoload -(defun gnosis-demo () - "Start gnosis demo." - (interactive) - (pop-to-buffer-same-window "*Gnosis Demo*") - (fundamental-mode) - (setq-local display-line-numbers nil) - (erase-buffer) - (gnosis-animate-string "Welcome to the Gnosis demo!" 2 nil "Gnosis demo" 'underline) - (sit-for 1) - (gnosis-animate-string "Gnosis is a tool designed to create a gnosiotheke" - 3 nil "gnosiotheke" 'bold-italic) - (sit-for 1.5) - (gnosis-animate-string "--A place to store & test your knowledge--" 4 nil nil 'italic) - (sit-for 1) - (gnosis-animate-string - "The objective of gnosis is to maximize memory retention, through repetition." 6 nil - "maximize memory retention" 'underline) - (sit-for 1) - (gnosis-animate-string "Remember, repetitio est mater memoriae" 8 nil - "repetitio est mater memoriae" 'bold-italic) - (sit-for 0.5) - (gnosis-animate-string "-- repetition is the mother of memory --" 9 nil - "repetition is the mother of memory" 'italic) - (sit-for 1) - (gnosis-animate-string "Consistency is key; be sure to do your daily reviews!" - 11 nil "Consistency is key" 'bold) - (sit-for 1) - (when (y-or-n-p "Try out demo gnosis review session?") - (gnosis-demo-create-deck) - (gnosis-review-session (gnosis-select-by-tag '("demo"))))) - -(defun gnosis-demo-create-deck () - "Create demo deck." - (let ((deck-name "demo") - (note-tags '("demo"))) - (if (not (cl-some #'(lambda (x) (member "demo" x)) (gnosis-select 'name 'decks))) - (progn (gnosis-add-deck deck-name) - (gnosis-add-note--basic :deck deck-name - :question "Repetitio est mater memoriae" - :hint "Translate this Latin phrase to English." - :answer "Repetition is the mother of memory" - :extra "Regular reviews at increasing intervals *reinforce* memory retention by strengthening neural connections, thereby making _long-term_ information recall easier." - :tags note-tags) - (gnosis-add-note--mc-cloze :deck deck-name - :question "Consistency is _key_ to using gnosis effectively." - :options '("Consistency" "Procrastination" "Incosistency") - :answer "Consistency" - :extra "Avoid monotony, try to engage with the material actively, and stay _consistent_!" - :tags note-tags) - (gnosis-add-note--mcq :deck deck-name - :question "Which one is the capital of Greece?" - :choices '("Athens" "Sparta" "Rome" "Constantinople") - :correct-answer 1 - :extra "Athens (Ἀθήνα) is the largest city of Greece & one of the world's oldest cities, with it's recorded history spanning over 3,500 years." - :tags note-tags) - (gnosis-add-note--cloze :deck deck-name - :note "GNU Emacs is an extensible editor created by {{c1::Richard}} {{c1::Stallman}} in {{c2::1984::year}}" - :tags note-tags - :extra "Emacs was originally implemented in 1976 on the MIT AI Lab's Incompatible Timesharing System (ITS), as a collection of TECO macros. The name “Emacs” was originally chosen as an abbreviation of “Editor MACroS”. This version of Emacs, =GNU= =Emacs=, was originally written in _1984_") - (gnosis-add-note--y-or-n :deck deck-name - :question "Is GNU Emacs the unparalleled pinnacle of all software creation?" - :hint "Duh" - :answer 121 - :extra "" - :tags note-tags)) - (error "Demo deck already exists")))) ;; Dashboard ;;;;;;;;;;;;