Anki media extractor script (ames): Update Anki cards with desktop audio, screenshots, and clipboard sentences on GNU/Linux.
ames automates the process of adding information and media to your latest added Anki card, making immersion mining smoother and more efficient.
contrib/wayland
pactl
: detecting and recording from audio monitors
(pulseaudio
and pipewire-pulse
tested).ffmpeg
: encoding desktop audio.maim
: screenshots.xdotool
: detecting active windows.libnotify
: sending notifications.xclip
: pasting clipboard content (xsel
is supported, but may be
removed in the future)bash ~/path/to/ames.sh -r
: press once to start recording, and again
to stop and export the audio clip to your latest-created Anki card.bash ~/path/to/ames.sh -s
: prompt for an interactive
screenshot selection.bash ~/path/to/ames.sh -a
: repeat the previous screenshot selection.
If there is no previous selection, default to -s
.bash ~/path/to/ames.sh -w
: screenshot the currently active window
(requires xdotool).bash ~/path/to/ames.sh -c
: exports the currently copied
text in the clipboard to the sentence field (requires xclip).ames
package from the AUR.mkdir -p ~/.config/ames/ && cp /usr/share/ames/config ~/.config/ames/config
ames
command should be in your PATH
, so you can bind, for
example, ames -s
instead of bash ~/path/to/ames.sh -s
.contrib/Makefile.contrib
to the root of the project:
cp contrib/Makefile.contrib Makefile
sudo make install
.~/.config/ames/config
.
These must be Bash variable declarations, with no spaces like
in the script or in the sample configuration.pactl list | grep -A2 '^Source #'
and then redefine the OUTPUT_MONITOR
variable with the name
of the correct sink.LANG=ja
for
Japanese notifications to achieve maximum immersion.The contrib
directory stores some custom configurations that modify
the functionality of ames
.
wayland
: replace X11-dependent tools with wayland (wlroots)
compatible toolspython
: replace command line tools with python programs, which
should work cross-platform. Also deals with ffmpeg's
recording/encoding delay.jq
: replace regex-based response parsing with jq
, leading to
better error messages.Please see the README files in each of their respective directories for more information about usage.