Documentation

ApkgImportService
in package

FinalYes

Reads an .apkg and merges field/tag/suspension changes back into LWT terms.

Merge policy (v1, deliberately conservative):

  • Notes whose guid matches an existing LWT term update that term's translation/romanization/notes; tags become whatever the user had in Anki; suspended cards demote learning-status terms to status 98.
  • Notes referencing an LWT term that no longer exists are counted as "skipped_missing" — never recreated, since we'd lose the language link.
  • Notes from outside LWT (no lwt- guid prefix and no LwtId field) are counted as "skipped_unknown" — silently ignored. A future iteration will surface these for create-as-new with a language picker.
  • SRS scheduling state is intentionally not consumed.

Table of Contents

Properties

$reader  : ApkgReader
$terms  : TermRepositoryInterface

Methods

__construct()  : mixed
default()  : self
importApkg()  : ImportResult
sameTagSet()  : bool

Properties

Methods

sameTagSet()

private sameTagSet(array<int, string> $a, array<int, string> $b) : bool
Parameters
$a : array<int, string>
$b : array<int, string>
Return values
bool
On this page

Search results