The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Title: Read 'Anki' Flashcard Databases
Version: 0.2.0
Author: Christos Longros [aut, cre]
Maintainer: Christos Longros <chris.longros@gmail.com>
Description: Read and analyze Anki flashcard collection databases. Provides functions to access notes, cards, and review logs from 'Anki' 'SQLite' database with a tidy interface.
License: MIT + file LICENSE
Encoding: UTF-8
RoxygenNote: 7.3.3
Imports: jsonlite, DBI, RSQLite, tibble
URL: https://github.com/chrislongros/ankiR
BugReports: https://github.com/chrislongros/ankiR/issues
NeedsCompilation: no
Packaged: 2026-01-16 19:32:09 UTC; chris
Repository: CRAN
Date/Publication: 2026-01-19 09:20:02 UTC

Get Anki base path

Description

Returns the default Anki2 directory for the current platform.

Usage

anki_base_path()

Value

Character string path to Anki2 directory

Examples

## Not run: 
anki_base_path()

## End(Not run)

Read cards from Anki collection

Description

Read cards from Anki collection

Usage

anki_cards(path = NULL, profile = NULL)

Arguments

path

Path to collection.anki2 (auto-detected if NULL)

profile

Profile name (first profile if NULL)

Value

A tibble of cards

Examples

## Not run: 
anki_cards()

## End(Not run)

Read cards with FSRS parameters

Description

Read cards with FSRS parameters

Usage

anki_cards_fsrs(path = NULL, profile = NULL)

Arguments

path

Path to collection.anki2 (auto-detected if NULL)

profile

Profile name (first profile if NULL)

Value

A tibble of cards with FSRS parameters (stability, difficulty, retention)

Examples

## Not run: 
anki_cards_fsrs()

## End(Not run)

Open an Anki collection

Description

Open an Anki collection

Usage

anki_collection(path = NULL, profile = NULL)

Arguments

path

Path to collection.anki2 (auto-detected if NULL)

profile

Profile name (first profile if NULL)

Value

An anki_collection object with methods: notes(), cards(), revlog(), tables(), close()

Examples

## Not run: 
col <- anki_collection()
col$notes()
col$close()

## End(Not run)

Get path to Anki database

Description

Get path to Anki database

Usage

anki_db_path(profile = NULL, base_path = NULL)

Arguments

profile

Profile name (first profile if NULL)

base_path

Path to Anki2 directory (auto-detected if NULL)

Value

Character string path to collection.anki2

Examples

## Not run: 
anki_db_path()

## End(Not run)

Read notes from Anki collection

Description

Read notes from Anki collection

Usage

anki_notes(path = NULL, profile = NULL)

Arguments

path

Path to collection.anki2 (auto-detected if NULL)

profile

Profile name (first profile if NULL)

Value

A tibble of notes

Examples

## Not run: 
anki_notes()

## End(Not run)

List Anki profiles

Description

List Anki profiles

Usage

anki_profiles(base_path = NULL)

Arguments

base_path

Path to Anki2 directory (auto-detected if NULL)

Value

Character vector of profile names

Examples

## Not run: 
anki_profiles()

## End(Not run)

Read review log from Anki collection

Description

Read review log from Anki collection

Usage

anki_revlog(path = NULL, profile = NULL)

Arguments

path

Path to collection.anki2 (auto-detected if NULL)

profile

Profile name (first profile if NULL)

Value

A tibble of review log entries

Examples

## Not run: 
anki_revlog()

## End(Not run)

Convert Anki timestamp to date

Description

Convert Anki timestamp to date

Usage

anki_timestamp_to_date(x)

Arguments

x

Numeric timestamp in milliseconds since epoch

Value

Date object

Examples

anki_timestamp_to_date(1368291917470)

Convert Anki timestamp to datetime

Description

Convert Anki timestamp to datetime

Usage

anki_timestamp_to_datetime(x)

Arguments

x

Numeric timestamp in milliseconds since epoch

Value

POSIXct datetime object

Examples

anki_timestamp_to_datetime(1368291917470)

Calculate current retrievability for FSRS cards

Description

Calculate current retrievability for FSRS cards

Usage

fsrs_retrievability(stability, days_since_review, decay = 0.256)

Arguments

stability

Stability in days

days_since_review

Days since last review

decay

Decay parameter (default 0.256)

Value

Retrievability (0-1)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.