From 845df83a4598d0998666a972244e2594a6e0ddf3 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 4 Jan 2024 04:43:14 +0200 Subject: Remove gnosis-faces.el & notes.el Add faces on gnosis.el --- gnosis-faces.el | 87 --------------------------------------------------------- gnosis.el | 57 +++++++++++++++++++++++++++++++++++-- notes.el | 48 ------------------------------- 3 files changed, 55 insertions(+), 137 deletions(-) delete mode 100644 gnosis-faces.el delete mode 100644 notes.el diff --git a/gnosis-faces.el b/gnosis-faces.el deleted file mode 100644 index b51e338..0000000 --- a/gnosis-faces.el +++ /dev/null @@ -1,87 +0,0 @@ -;;; gnosis-faces.el --- Spaced Repetition Learning Tool -*- lexical-binding: t; -*- - -;; Copyright (C) 2023 Thanos Apollo - -;; Author: Thanos Apollo -;; Keywords: extensions -;; URL: https://git.thanosapollo.org/gnosis -;; Version: 0.0.1 - -;; Package-Requires: ((emacs "27.2") (compat "29.1.4.2")) - -;; 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 . - -;;; Commentary: - -;; This is part of the package gnosis.el - -;;; Code: - -(defgroup gnosis-faces nil - "Faces used by gnosis." - :group 'gnosis - :tag "Gnosis Faces" - :prefix 'gnosis-face) - - -(defface gnosis-face-extra - '((t :inherit markdown-italic-face)) - "Face for extra-notes from note." - :group 'gnosis-faces) - -(defface gnosis-face-main - '((t :inherit default)) - "Face for main section from note." - :group 'gnosis-face-faces) - -(defface gnosis-face-seperator - '((t :inherit warning)) - "Face for section seperator." - :group 'gnosis-face) - -(defface gnosis-face-directions - '((t :inherit underline)) - "Face for gnosis directions." - :group 'gnosis-face) - -(defface gnosis-face-correct - '((t :inherit match)) - "Face for user choice." - :group 'gnosis-face) - -(defface gnosis-face-cloze - '((t :inherit cursor)) - "Face for clozes." - :group 'gnosis-face) - -(defface gnosis-face-false - '((t :inherit error)) - "Face for user choice." - :group 'gnosis-face) - -(defface gnosis-face-hint - '((t :inherit warning)) - "Face for user choice." - :group 'gnosis-face) - -(defface gnosis-face-cloze-unanswered - '((t :inherit underline)) - "Face for user choice." - :group 'gnosis-face) - - -(provide 'gnosis-faces) -;;; gnosis-faces.el ends here - - diff --git a/gnosis.el b/gnosis.el index 26e2754..abda991 100644 --- a/gnosis.el +++ b/gnosis.el @@ -34,8 +34,6 @@ (require 'cl-lib) (require 'gnosis-algorithm) -(require 'gnosis-faces) - (defgroup gnosis nil "Spaced repetition learning tool." @@ -67,6 +65,61 @@ WARNING: Do not change this value!") (defconst gnosis-db-version 1 "Gnosis database version.") +;;; Faces + +(defgroup gnosis-faces nil + "Faces used by gnosis." + :group 'gnosis + :tag "Gnosis Faces" + :prefix 'gnosis-face) + +(defface gnosis-face-extra + '((t :inherit markdown-italic-face)) + "Face for extra-notes from note." + :group 'gnosis-faces) + +(defface gnosis-face-main + '((t :inherit default)) + "Face for main section from note." + :group 'gnosis-face-faces) + +(defface gnosis-face-seperator + '((t :inherit warning)) + "Face for section seperator." + :group 'gnosis-face) + +(defface gnosis-face-directions + '((t :inherit underline)) + "Face for gnosis directions." + :group 'gnosis-face) + +(defface gnosis-face-correct + '((t :inherit match)) + "Face for user choice." + :group 'gnosis-face) + +(defface gnosis-face-cloze + '((t :inherit cursor)) + "Face for clozes." + :group 'gnosis-face) + +(defface gnosis-face-false + '((t :inherit error)) + "Face for user choice." + :group 'gnosis-face) + +(defface gnosis-face-hint + '((t :inherit warning)) + "Face for user choice." + :group 'gnosis-face) + +(defface gnosis-face-cloze-unanswered + '((t :inherit underline)) + "Face for user choice." + :group 'gnosis-face) + + + (cl-defun gnosis-select (value table &optional (restrictions '1=1)) "Select VALUE from TABLE, optionally with RESTRICTIONS." (gnosis-db-init) diff --git a/notes.el b/notes.el deleted file mode 100644 index 5642e54..0000000 --- a/notes.el +++ /dev/null @@ -1,48 +0,0 @@ - - - -;; -(gnosis-add-deck "Biochemistry") -(gnosis-add-note-mcq :deck "Biochemistry" - :question "A type 1 diabetic is brought to the emergency department due to lethargy and rapid breathing. Blood measurements indicated elevated levels of glucose and ketone bodies. Blood pH was 7.1. The patient was exhibiting enhanced breathing to exhale which one of the following gases in order to correct the abnormal blood pH?" - :choices '("Oxygen" "Nitrogen" "Nitrous Oxide" - "Carbon Dioxide" "Superoxide") - :correct-answer 4 - :extra "The patient is in the midst of diabetic ketoacidosis, in which the production, but nonuse, of ketone bodies (which are acids) results in a significant lowering of blood pH. This patient will be creating a respiratory alkalosis to attempt to compensate for a metabolic acidosis. Under conditions of an acidosis, the proton concentration of the blood needs to be reduced. Due to the presence of carbonic anhy- drase in the red blood cell, as carbon dioxide is exhaled, protons are removed from solution. As the concentra- tion of carbon dioxide is reduced, bicarbonate (HCO3−) reacts with a proton (H+) to form carbonic acid, which then dissociates to form water (H2O) and carbon diox- ide (CO2). These reactions are summarized in the figure below. Thus, as carbon dioxide is exhaled, the proton concentration decreases, and the acidosis is reduced. The exhalation of oxygen or nitrogen will not affect the proton levels in the blood, nor will the loss of nitrous oxide or superoxide." - :tags '("biochemistry" "amino-acids") - :suspend t) -;; -(gnosis-add-deck "Surgery") -(gnosis-add-note-mcq :deck "Surgery" - :question "A 35-year-old man is admitted with systolic blood pressure (BP) of 60 mm Hg and a heart rate (HR) of 150 bpm following a gunshot wound to the liver (Fig. 1–1). What is the effect on the kidneys?" - :choices '("They tolerate satisfactorily ischemia of 3–4 hours duration." - "They undergo further ischemia if hypothermia is present." - "They can become damaged, even though urine output exceeds 1500 mL/d." - "They are affected and cause an increased creatinine clearance." - "They are prevented from further damage by a vasopressor.") - :correct-answer 3 - :extra "High-output renal failure should be sus- -pected if the BUN continues to rise with urine output >1000–1500 mL/d. -It is associated with mild-to-moderate renal insufficiency; in -comparison, severe renal injury results in olig- uric renal failure. -The kidneys do not tolerate ischemia for more than 30–90 minutes. -Hypothermia is protective. There is a decrease in creatinine -clearance. Vasopressors aggravate the deleterious effects of shock." - :image "2023.png" - :tags "surgery renal kidneys") -;; -(gnosis-add-note-mcq :deck "Anatomy" - :question "A 37-year-old man is admitted to the -emergency department after a severe car crash. After examining the -patient the emergency medicine physician concludes that the serratus -anterior muscle is damaged. Which of the following nerves innervates -the serratus anterior muscle?" - :choices '("Long thoracic" "Axillary" "Spinal accessory" "Dorsal scapular" "Thoracodorsal") - :correct-answer 1 - :extra "The long thoracic is the only nerve that -innervates the serratus anterior. The axillary nerve innervates the -deltoid, the spinal accessory nerve innervates the sternocleidomastoid -and trapezius, the dorsal scapular nerve supplies the rhomboid muscles -and levator scapulae, and the latissimus dorsi is the muscle supplied -by the thoracodorsal nerve." - :tags '("anatomy" "thoracic" "serratus-anterior")) -- cgit v1.2.3