feat(archive): import a studyset with everything in it and its progress

Your call (2026-10-11): an archive, imported from the Library's Import, to
bring a library from elsewhere as one's own, and later to restore backups
and move studysets between instances before federation.

An archive is a .zip: archive.json says its format; the studyset is laid
out as a release (ADR 0005, rule 3), so the release copier writes it, now
also unlinked from any publication (ReleaseCopier.write), its cards marked
"archive" as imported ones are, handing back each item's new id. A card may
name a dictionary entry instead of its payload: the import makes it from
the instance's dictionary as adding from it does, with today's entry,
examples and tags, and leaves out (counting) one the instance lacks; for
that, DictionaryEndpoint.entries gives entries by their ids, at most 1,000
at once. reviews.json lists reviews of the archive's cards; they go into
the person's review log once the cards are in, so every card's schedule
goes on from them.

The sheet says what the archive holds ("Japanese" holds: 12 studysets,
7,745 flashcards, 3 paths, 20,317 reviews), imports once confirmed, busy
meanwhile, and opens the studyset made. Not an archive, a newer format or
an unreadable one says so and imports nothing. No export into the format
yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi
Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
Tizian 「ティツィアーン」 2026-10-11 16:39:07 +02:00
commit ff31652a3a
Signed by: raisondetredev
GPG key ID: 07F6FCF405488B64

View file

@ -56,6 +56,26 @@
"libraryRefresh": "Refresh",
"libraryImport": "Import",
"libraryImportAnkiHint": "Becomes a studyset of its own, from an .apkg or .colpkg file",
"libraryImportArchive": "Halkyon archive",
"libraryImportArchiveHint": "A studyset with everything in it and its progress, from a .zip file",
"archiveFileType": "Halkyon archive",
"archiveImportTitle": "Import archive",
"archiveImportReading": "Reading the archive…",
"archiveImportHolds": "“{title}” holds:",
"@archiveImportHolds": {"placeholders": {"title": {"type": "String"}}},
"archiveCountStudysets": "{count, plural, =1{1 studyset} other{{count} studysets}}",
"@archiveCountStudysets": {"placeholders": {"count": {"type": "int"}}},
"archiveCountReviews": "{count, plural, =1{1 review} other{{count} reviews}}",
"@archiveCountReviews": {"placeholders": {"count": {"type": "int"}}},
"archiveImportConfirm": "Import",
"archiveImported": "Imported: {cards} and {reviews}.",
"@archiveImported": {"placeholders": {"cards": {"type": "String"}, "reviews": {"type": "String"}}},
"archiveImportMissingEntries": "{count, plural, =1{1 word isn't} other{{count} words aren't}} in this instance's dictionary and stayed out.",
"@archiveImportMissingEntries": {"placeholders": {"count": {"type": "int"}}},
"archiveNotAnArchive": "This file isn't a Halkyon archive.",
"archiveNewerFormat": "This archive comes from a newer version of the app. Update the app to import it.",
"archiveUnreadable": "This archive can't be read.",
"archiveImportBrokeOff": "The import broke off. Check the connection and try again.",
"libraryRetry": "Retry",
"studysetNoContent": "No content yet",
"studysetEmpty": "Empty",