Importing .anki (old anki 1) files

AnkiWeb addon 175027074

Imports legacy .anki files from Anki 1, then recommends restarting Anki to avoid potential interference.
AI-generated summary; may contain mistakes.

import

Open on AnkiWeb GitHub Ask about alternatives

AnkiWeb

Rating
6 (πŸ‘ 5 Β· πŸ‘Ž 1)
Updated
2022-10-07
Anki versions
2.1.55~
Description language
en

Maintenance

abandoned

  • Last update or commit was 1455 days before the snapshot (2022-10-07).
  • The repository has 10 test files.

Will it work on my Anki?

Version branches
Min AnkiMax AnkiUpdated
2.1.02.1.342020-05-04
2.1.352.1.402020-12-22
2.1.412.1.482021-08-20
2.1.49–2021-12-09
2.1.502.1.55+2022-10-07
History across monthly snapshots

Loading…

Similar addons

Multi Deck Importer

Batch imports multiple .apkg decks from files or folders, optionally recursively or via zip, with backup, modern import options, progress reporting, and safeguards against collection packages.

importdeck-managementbackup-maintenance

Rating 2 πŸ‘ 2 Β· πŸ‘Ž 0 Anki 25.09.2~ Updated 2026-05-07

README

Import .anki files

Rationale

A long time ago, there was Anki 1. It used a file format called ".anki". Very different from today's Anki2's ".anki2" format. You can still find on the web some old decks, shared a decade ago, in this format. This add-on allow to import them.

Warning

You should probably restart anki once you're done importing data. Importing .anki data essentially starts a copy of anki 2.0 which itself starts a copy of anki 1.0; that's not things you want to keep running and potentially interfering with your normal study. I can't guarantee there won't be any interference (especially in hooks)

Internal

The only new code is in aqt/importing.py, where I change the "onImport" function in order to deal with ".anki" file. If importing such a file is requested, it will import anki/importing/__init__.py, which itself will add all the required codebase. It essentially is a copy of the backend code and anki1 code, as it was before this feature was removed in all https://github.com/ankitects/anki/commit/1dce3eaaff649e2c1dbfd53bfe289cf42971045e#diff-c60e37732e601ec3d7f7e7146624b3a1 .

Technical

My best guess is that anki 1 was in python 2. Dropping the importer ensured that the code didn't have to be porter to python 3. I'm not certain, because tools exists to do the port.

Anyway, to get code from anki 1, anki 2.0 did used anki1 code to compute all cards. It actually simply opened this file as a collection and then used the function which ports collection from 1 to 2.0. I believe that there was no difference between decks and collection in anki 1; which might explain why it used anki 2.0 can import a deck and consider it as a collection.

TODO

Remove all part of the code not actually useful for anki

Links, licence and credits

Key Value
Copyright Arthur Milchior arthur@milchior.fr
Based on Anki code by Damien Elmes anki@ichi2.net
License GNU GPL, version 3 or later; http://www.gnu.org/licenses/gpl.html
Source in https://github.com/Arthur-Milchior/anki-import-anki1-files
Addon number 175027074