feat(notetaking): anki integration
This commit is contained in:
parent
d9babbd49a
commit
f6ec07f646
4 changed files with 131 additions and 44 deletions
59
notetaking/.gitignore
vendored
Normal file
59
notetaking/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
# -*- mode: gitignore; -*-
|
||||||
|
*~
|
||||||
|
\#*\#
|
||||||
|
/.emacs.desktop
|
||||||
|
/.emacs.desktop.lock
|
||||||
|
*.elc
|
||||||
|
auto-save-list
|
||||||
|
tramp
|
||||||
|
.\#*
|
||||||
|
|
||||||
|
# Org-mode
|
||||||
|
.org-id-locations
|
||||||
|
*_archive
|
||||||
|
|
||||||
|
# flymake-mode
|
||||||
|
*_flymake.*
|
||||||
|
|
||||||
|
# eshell files
|
||||||
|
/eshell/history
|
||||||
|
/eshell/lastdir
|
||||||
|
|
||||||
|
# elpa packages
|
||||||
|
/elpa/
|
||||||
|
|
||||||
|
# reftex files
|
||||||
|
*.rel
|
||||||
|
|
||||||
|
# AUCTeX auto folder
|
||||||
|
/auto/
|
||||||
|
|
||||||
|
# cask packages
|
||||||
|
.cask/
|
||||||
|
dist/
|
||||||
|
|
||||||
|
# Flycheck
|
||||||
|
flycheck_*.el
|
||||||
|
|
||||||
|
# server auth directory
|
||||||
|
/server/
|
||||||
|
|
||||||
|
# projectiles files
|
||||||
|
.projectile
|
||||||
|
|
||||||
|
# directory configuration
|
||||||
|
.dir-locals.el
|
||||||
|
|
||||||
|
# network security
|
||||||
|
/network-security.data
|
||||||
|
|
||||||
|
# undo-tree
|
||||||
|
*.~undo-tree~
|
||||||
|
|
||||||
|
# org-roam
|
||||||
|
bookmarks
|
||||||
|
eln-cache/
|
||||||
|
history
|
||||||
|
org-roam.db
|
||||||
|
places
|
||||||
|
request/
|
||||||
|
|
@ -19,6 +19,32 @@
|
||||||
|
|
||||||
plugins = with pkgs.emacsPackages; [
|
plugins = with pkgs.emacsPackages; [
|
||||||
];
|
];
|
||||||
|
|
||||||
|
emacsDependencies = with pkgs; [
|
||||||
|
hunspell
|
||||||
|
hunspellDicts.nl_NL
|
||||||
|
hunspellDicts.en_GB-large
|
||||||
|
ghostscript
|
||||||
|
graphviz
|
||||||
|
imagemagickBig
|
||||||
|
poppler-utils
|
||||||
|
ripgrep
|
||||||
|
|
||||||
|
wl-clipboard
|
||||||
|
|
||||||
|
# Any less than medium isn't guaranteed to work
|
||||||
|
(texlive.withPackages (ps: with ps; [
|
||||||
|
scheme-medium
|
||||||
|
latexmk
|
||||||
|
# File '*.sty' not found
|
||||||
|
capt-of
|
||||||
|
preview
|
||||||
|
standalone
|
||||||
|
wrapfig
|
||||||
|
]))
|
||||||
|
# required by +jupyter
|
||||||
|
(python314.withPackages (ps: with ps; [ jupyter ]))
|
||||||
|
];
|
||||||
in {
|
in {
|
||||||
devShells.default = pkgs.mkShell {
|
devShells.default = pkgs.mkShell {
|
||||||
packages = [
|
packages = [
|
||||||
|
|
@ -28,38 +54,27 @@
|
||||||
|
|
||||||
package = pkgs.emacs; # pkgs.emacs-git
|
package = pkgs.emacs; # pkgs.emacs-git
|
||||||
extraEmacsPackages = epkgs: [
|
extraEmacsPackages = epkgs: [
|
||||||
epkgs.unicode-fonts
|
epkgs.org-anki
|
||||||
epkgs.pdf-tools
|
|
||||||
epkgs.org-pdftools
|
epkgs.org-pdftools
|
||||||
|
epkgs.pdf-tools
|
||||||
|
epkgs.unicode-fonts
|
||||||
|
|
||||||
pkgs.shellcheck
|
pkgs.shellcheck
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
|
||||||
pkgs.hunspell
|
(pkgs.anki.withAddons [
|
||||||
pkgs.hunspellDicts.nl_NL
|
#(pkgs.ankiAddons.passfail2.withConfig {
|
||||||
pkgs.hunspellDicts.en_GB-large
|
# config = {
|
||||||
pkgs.ghostscript
|
# again_button_name = "Incorrect";
|
||||||
pkgs.graphviz
|
# good_button_name = "Correct";
|
||||||
pkgs.imagemagickBig
|
# };
|
||||||
pkgs.poppler-utils
|
#})
|
||||||
pkgs.ripgrep
|
|
||||||
|
|
||||||
pkgs.wl-clipboard
|
pkgs.ankiAddons.anki-connect
|
||||||
|
pkgs.pandoc
|
||||||
# Any less than medium isn't guaranteed to work
|
])
|
||||||
(pkgs.texlive.withPackages (ps: with ps; [
|
] ++ emacsDependencies;
|
||||||
scheme-medium
|
|
||||||
latexmk
|
|
||||||
# File '*.sty' not found
|
|
||||||
capt-of
|
|
||||||
preview
|
|
||||||
standalone
|
|
||||||
wrapfig
|
|
||||||
]))
|
|
||||||
# required by +jupyter
|
|
||||||
(pkgs.python314.withPackages (ps: with ps; [ jupyter ]))
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -114,22 +114,7 @@
|
||||||
(pdf-loader-install)
|
(pdf-loader-install)
|
||||||
)
|
)
|
||||||
|
|
||||||
(use-package org-preview-html ;; https://github.com/jakebox/org-preview-html
|
;; Theming
|
||||||
:ensure t
|
|
||||||
:bind (:map org-mode-map ("C-c p" . org-preview-html-mode))
|
|
||||||
:custom
|
|
||||||
(org-preview-html-viewer 'eww) ;; Use built-in EWW browser
|
|
||||||
(org-preview-html-refresh-configuration 'save)
|
|
||||||
(add-hook 'eww-mode-hook (lambda () (display-line-numbers-mode -1)))
|
|
||||||
;; Pin the preview window layout to the right
|
|
||||||
(add-to-list 'display-buffer-alist
|
|
||||||
'("\\*eww\\*"
|
|
||||||
(display-buffer-in-direction)
|
|
||||||
(direction . right)
|
|
||||||
(window-width . 0.5)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
(use-package olivetti
|
(use-package olivetti
|
||||||
:ensure t
|
:ensure t
|
||||||
|
|
@ -169,8 +154,6 @@
|
||||||
;; TODO Automatically save buffer when going to other file -- maybe interactively?
|
;; TODO Automatically save buffer when going to other file -- maybe interactively?
|
||||||
;; TODO Spellchecking (UK & Dutch)
|
;; TODO Spellchecking (UK & Dutch)
|
||||||
|
|
||||||
;; TODO Some automation to create anki cards intext without having to write the boilerplate
|
|
||||||
|
|
||||||
;; TODO Finally, compare experience to organice https://organice.200ok.ch/
|
;; TODO Finally, compare experience to organice https://organice.200ok.ch/
|
||||||
|
|
||||||
;; TODO org-compile-file: File "/tmp/nix-shell.UEk6Ye/orgtexcJso3E.dvi" wasn’t produced Please adjust ‘dvipng’ part of ‘org-preview-latex-process-alist’.
|
;; TODO org-compile-file: File "/tmp/nix-shell.UEk6Ye/orgtexcJso3E.dvi" wasn’t produced Please adjust ‘dvipng’ part of ‘org-preview-latex-process-alist’.
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@
|
||||||
(org-roam-dailies-directory "dailies/")
|
(org-roam-dailies-directory "dailies/")
|
||||||
(org-roam-completion-everywhere t)
|
(org-roam-completion-everywhere t)
|
||||||
:bind (
|
:bind (
|
||||||
("C-c r f" . org-roam-node-find)
|
("C-c r f" . org-roam-node-find) ;; TODO This is case sensitive, make it insensitive
|
||||||
("C-c r j" . org-roam-dailies-capture-today)
|
("C-c r j" . org-roam-dailies-capture-today)
|
||||||
("C-c r t" . org-roam-dailies-goto-today)
|
("C-c r t" . org-roam-dailies-goto-today)
|
||||||
)
|
)
|
||||||
|
|
@ -110,3 +110,33 @@
|
||||||
("C-c i" . org-download-clipboard)
|
("C-c i" . org-download-clipboard)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(use-package org-preview-html ;; https://github.com/jakebox/org-preview-html
|
||||||
|
:ensure t
|
||||||
|
:bind (:map org-mode-map ("C-c p" . org-preview-html-mode))
|
||||||
|
:custom
|
||||||
|
(org-preview-html-viewer 'eww) ;; Use built-in EWW browser
|
||||||
|
(org-preview-html-refresh-configuration 'save)
|
||||||
|
(add-hook 'eww-mode-hook (lambda () (display-line-numbers-mode -1)))
|
||||||
|
;; Pin the preview window layout to the right
|
||||||
|
(add-to-list 'display-buffer-alist
|
||||||
|
'("\\*eww\\*"
|
||||||
|
(display-buffer-in-direction)
|
||||||
|
(direction . right)
|
||||||
|
(window-width . 0.5)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
;; Integrations
|
||||||
|
|
||||||
|
(use-package org-anki ;; https://github.com/eyeinsky/org-anki
|
||||||
|
:ensure t
|
||||||
|
:bind (:map org-mode-map
|
||||||
|
("C-c a c" . org-anki-cloze-dwim) ;; Insert cloze on cursor
|
||||||
|
("C-c a d" . org-anki-delete-entry) ;; Delete cards from Anki
|
||||||
|
("C-c a i" . org-anki-sync-entry) ;; Create card from current header
|
||||||
|
("C-c a s" . org-anki-sync-all) ;; Sync all cards in buffer
|
||||||
|
("C-c a u" . org-anki-update-all) ;; Update existing cards in buffer
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue