This is a work-in-progress desktop application designed for quickly creating Anki cards containing LaTeX, with PDF viewer integration. It's inspired by the concept of Sentence Mining.
A (supported) PDF viewer is not necessary, but it will provide the file name and the current page number for later reference.
Note: Currently, the application is only tested on Linux systems and probably won't work on Windows.
(I am open for better names for this application)
demo.mp4
- Rust and Cargo installed on your system
- The Anki add-on AnkiConnect
-
Clone this repository:
git clone https://github.com/yourusername/bookminer.git cd bookminer
-
Build the application:
cargo build --release
-
Add the compiled binary to your PATH:
sudo cp ./target/release/bookminer /usr/local/bin/
The application uses the EDITOR
and TERMINAL
environment variables to choose the terminal and editor.
You can either set these in your environment (.bash_profile
for bash) or pass them like this:
TERMINAL=st EDITOR=nvim bookminer
Then map the binary bookminer
binary to a key in your window manager.
You can also pass arguments to the spawned terminal with the BM_TERMINAL_ARGS
environment variable:
TERMINAL="st" BM_TERMINAL_ARGS="-n floatterm -g 90x25" bookminer
In the menus, you can then either use Vim keys (j
,k
) or arrow keys to move up and down.
- Open Sioyek's
prefs_user.config
file - Add the following command:
new_command _add_to_anki bookminer --book-filename %{file_name} --page-number %{page_number}
- In
keys_user.config
, bind the command to a key (e.g.,U
):_add_to_anki U
Add the following to your Zathura configuration file, replacing <key>
with your preferred key:
map <key> exec "bookminer --book-filename \"$FILE\" --page-number \"$PAGE\""
- Take screenshot only of the focused window (Or atleast the focused monitor)
- Handle space in tags
- Display the currently selected Anki settings in the final menu
- Integrate with Okular using their D-Bus API
- Try to detect wrong Anki settings (parse AnkiConnect error and act accordingly)
- Search tags
- LaTeX lint on the fly?
- LaTeX live preview?
- Define special keywords on the front and back? E.g. !PROOF! or !REMARK! and put everything after that in a different field. Also use for adding images?