Documentation

DeckImportSettings
in package

FinalYes

What the user chose on the import-configuration screen.

LWT cannot infer any of this: field names in a shared deck are arbitrary, and an .apkg carries no language.

Table of Contents

Constants

MATURE_INTERVAL_DAYS  : mixed = 21
Anki interval (days) at which a card is treated as genuinely known.

Properties

$deriveStatus  : bool
$fixedStatus  : int
$importTags  : bool
$languageId  : int
$notetypeId  : int
$termField  : string
$translationField  : string|null

Methods

__construct()  : mixed
statusFor()  : int
The LWT status a note should land on.

Constants

MATURE_INTERVAL_DAYS

Anki interval (days) at which a card is treated as genuinely known.

public mixed MATURE_INTERVAL_DAYS = 21

Anki's own "mature card" threshold is 21 days, and its statistics screen uses the same line, so users already read it that way.

Properties

Methods

__construct()

public __construct(int $notetypeId, string $termField, string|null $translationField, int $languageId[, bool $deriveStatus = true ][, int $fixedStatus = 1 ][, bool $importTags = true ]) : mixed
Parameters
$notetypeId : int

Which notetype to import

$termField : string

Field holding the term

$translationField : string|null

Field holding the translation, if any

$languageId : int

Target LWT language

$deriveStatus : bool = true

Map Anki maturity onto LWT status

$fixedStatus : int = 1

Status for every term when $deriveStatus is false

$importTags : bool = true

Carry Anki tags across

statusFor()

The LWT status a note should land on.

public statusFor(ForeignNote $note) : int

The whole value of importing a deck rather than reclassifying by hand is that Anki already knows how well each word is learned — that lives in cards.ivl. The mapping is deliberately coarse; the user can refine individual terms afterwards.

suspended -> 98 (ignored) — the user parked it in Anki never studied -> 1 (learning) — no evidence of knowledge < 21 days -> 2..4 — young, scaled by interval

= 21 days -> 99 (well-known) — Anki's own "mature" threshold

Parameters
$note : ForeignNote
Return values
int
On this page

Search results