Skip to Content Skip to Search

AnkiPackage represents the Anki deck package file which has the .apkg file extension

This is a zip file containing two SQLite databases (collection.anki21 and collection.anki2), a media file, and possibly the media (images and sound files). The gem currently does not have any support for adding or changing media in the Anki package.

Methods
C
U

Class Public methods

create(name:, target_directory: Dir.pwd, &closure)

Creates a new Anki package file (see the README)

# File lib/anki_record/anki_package/anki_package.rb, line 25
def self.create(name:, target_directory: Dir.pwd, &closure)
  anki_package = new
  anki_package.create_initialize(name:, target_directory:, &closure)
  anki_package
end

update(path:, &closure)

Opens an existing Anki package file to update its contents (see the README)

# File lib/anki_record/anki_package/anki_package.rb, line 46
def self.update(path:, &closure)
  anki_package = new
  anki_package.update_initialize(path:, &closure)
  anki_package
end