Anki

From Gentoo Wiki
Jump to:navigation Jump to:search

Anki is a flashcard memory training program that uses the science of spaced repetition to expedite the learning process and enhance recall[1].

This article covers Anki Desktop, the official desktop application. There's also an optional web synchronization service called AnkiWeb.

Installation

Emerge

Install app-misc/anki using emerge:

root #emerge --ask app-misc/anki
Important
Anki depends on dev-qt/qtwebengine, which requires ≥48GB of available RAM depending on your MAKEOPTS. On a high core count system this dependency can be built in a reasonable amount of time, perhaps taking a few hours. On a budget quad core, building Anki can take the better part of a day. The RAM requirement can be satisfied with a swap partition if needed, not just physical RAM. If emerge fails to build app-misc/anki ensure that you have either enough physical RAM or a large enough swap partition to continue.

Flatpak

Important
This method uses third party installation from Flathub (which can be potentially compromised by attackers) and therefore should not used in trusted environments.

Anki is also packaged as a Flatpak, which may be desirable since app-misc/anki depends on dev-python/PyQtWebEngine to build.

The Anki flatpak is available from Flathub:

user $flatpak install flathub net.ankiweb.Anki
user $flatpak run net.ankiweb.Anki

Python Wheel

Anki's beta version can be installed on both x86_64 and ARM systems using pip rather easily. Advise Anki's documentation to do this.

Configuration

Environment variables

  • ANKIDEV - If set, additional logging messages will be printed to standard output and automatic backups will be disabled.[2]
  • TRACESQL - If set, SQL statements will be printed at execution time.[2]
  • LOGTERM - If set, messages bound for collection2.log will also be printed to standard output.[2]
  • ANKI_PROFILE_CODE - If set, Python profiling data will be sent to standard output upon exit.[2]

Files

  • $XDG_DATA_HOME/Anki2 - the main configuration directory[3].
Note
If Anki was installed via Flatpak, the configuration files will be located in ~/.var/app/net.ankiweb.Anki/ instead.

Usage

Invocation

user $anki --help
usage: anki [OPTIONS] [file to import]

Anki 2.1.15

optional arguments:
  -h, --help            show this help message and exit
  -b BASE, --base BASE  path to base folder
  -p PROFILE, --profile PROFILE
                        profile name to load
  -l LANG, --lang LANG  interface language (en, de, etc)

Troubleshooting

See the official Linux Anki documentation for Linux-specific issues.

External resources

  • AnkiWeb – The companion web service to the desktop Anki application.

References