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:
parent
47743ced49
commit
ff31652a3a
1 changed files with 1548 additions and 37 deletions
|
|
@ -196,6 +196,82 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||
String get libraryImportAnkiHint =>
|
||||
'Becomes a studyset of its own, from an .apkg or .colpkg file';
|
||||
|
||||
@override
|
||||
String get libraryImportArchive => 'Halkyon archive';
|
||||
|
||||
@override
|
||||
String get libraryImportArchiveHint =>
|
||||
'A studyset with everything in it and its progress, from a .zip file';
|
||||
|
||||
@override
|
||||
String get archiveFileType => 'Halkyon archive';
|
||||
|
||||
@override
|
||||
String get archiveImportTitle => 'Import archive';
|
||||
|
||||
@override
|
||||
String get archiveImportReading => 'Reading the archive…';
|
||||
|
||||
@override
|
||||
String archiveImportHolds(String title) {
|
||||
return '“$title” holds:';
|
||||
}
|
||||
|
||||
@override
|
||||
String archiveCountStudysets(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count studysets',
|
||||
one: '1 studyset',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String archiveCountReviews(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count reviews',
|
||||
one: '1 review',
|
||||
);
|
||||
return '$_temp0';
|
||||
}
|
||||
|
||||
@override
|
||||
String get archiveImportConfirm => 'Import';
|
||||
|
||||
@override
|
||||
String archiveImported(String cards, String reviews) {
|
||||
return 'Imported: $cards and $reviews.';
|
||||
}
|
||||
|
||||
@override
|
||||
String archiveImportMissingEntries(int count) {
|
||||
String _temp0 = intl.Intl.pluralLogic(
|
||||
count,
|
||||
locale: localeName,
|
||||
other: '$count words aren\'t',
|
||||
one: '1 word isn\'t',
|
||||
);
|
||||
return '$_temp0 in this instance\'s dictionary and stayed out.';
|
||||
}
|
||||
|
||||
@override
|
||||
String get archiveNotAnArchive => 'This file isn\'t a Halkyon archive.';
|
||||
|
||||
@override
|
||||
String get archiveNewerFormat =>
|
||||
'This archive comes from a newer version of the app. Update the app to import it.';
|
||||
|
||||
@override
|
||||
String get archiveUnreadable => 'This archive can\'t be read.';
|
||||
|
||||
@override
|
||||
String get archiveImportBrokeOff =>
|
||||
'The import broke off. Check the connection and try again.';
|
||||
|
||||
@override
|
||||
String get libraryRetry => 'Retry';
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue