[Development started] - 02-02-2023
[0.1.1] - 02-24-2023
-
The initial version released.
-
The gem can create empty
.apkgfiles that import into Anki. -
SQL statements can be executed against the
collection.anki21database before the zip file is created.
[0.2.0] - 03-05-2023
-
AnkiPackage#zip_and_closerenamed toAnkiPackage#zip. -
Decks and note types can be accessed with
Collection#find_deck_byandCollection#find_note_type_by. -
Note objects can be created and updated, and then saved to the
collection.anki21database. -
This also populates corresponding records in the
cardstable.
[0.3.0] - 03-26-2023
-
AnkiPackage::newyields the collection object to the block instead of the Anki package object. -
AnkiPackage::openhas been developed to a point that it is useable. -
An “opened” Anki package now has its contents copied into the temporary
collection.anki21database. -
AnkiPackage#executewas removed. -
AnkiPackage#preparewas added. Any SQL statements executed directly againstcollection.anki21must now be prepared statements. -
Custom decks (and nested decks/subdecks) and custom note types can be created and updated, and then saved to the
collection.anki21database. -
Notes can be accessed with
Collection#find_note_by. -
Note#savenow updates a note (and its corresponding cards) if it was already in thecollection.anki21database. -
Note::newdoes not accept aclozeargument anymore; this attribute can be changed after instantiation with thecloze=setter. -
Deckhas adeck_options_groupattribute instead ofdeck_options_group_id -
#inspectadded toDeck -
Deck options groups can be accessed with
Collection#find_deck_options_group_by -
Multiple classes with
last_modified_timeandcreation_timestampattributes had these renamed tolast_modified_timestampandcreated_at_timestamp. -
More helpful error messages in various places (e.g. “The package name must be a string without spaces.”).
-
Bug fixes that may have affected previous version:
-
Instantiating a note type from an existing Anki package no longer duplicates the note type when it is saved.
-
Note types are not instantiated/saved with an invalid
reqvalue.-
In fixing this bug, other issues with
tagsandverswere introduced and then fixed. -
It was also noticed that the default note types with “Basic” in the name should not have
tagsandversso this was changed too.
-
-
API documentation changed from using RDoc to SDoc with the Rails template.
-
RSpec test suite was refactored to improve speed: 4 minutes -> 1.5 minutes.
[0.3.1] - 04-29-2023
-
Deck.newwas saving the deck to thecollection.anki21database. Now it will only instantiate it and#savemust be called to save it. -
Helpermodules moved into theHelpersmodule namespace. -
Bug fix addressing using the approximate milliseconds since the epoch as the primary key id causing the uniqueness constraint to fail when creating a lot of notes.
[0.3.2] - 05-20-2023
-
The private
Notemethodglobally_unique_idhas been moved toNoteGuidHelperand included into note. -
The
guidattribute also now has a public setter.
[0.4] - 07-08-2023
-
AnkiPackage.newandAnkiPackage.openhave been removed and replaced withAnkiPackage.createandAnkiPackage.update. -
AnkiPackage.updateis different fromAnkiPackage.openin that it does not create a new Anki package with a timestamp. It effectively updates the original Anki package file as long as no error is thrown. -
Anki21Databaseis yielded to the block of the above methods instead ofCollection. -
Responsibilites of
Collectionhave been reorganized toAnki21Database. -
The
guidattribute of notes ic computed in a different way that allows a larger number of possible values. -
globally_unique_idis now a module method rather than an included instance method.
[0.4.1] - 08-21-2023
-
Anki21Database#find_note_bynow can take the sort field value of a note as argument. -
Anki21Database#find_notes_by_exact_text_matchis a new method that returns an array of notes that have in any field text matching the argument. -
Trying to create an Anki package file with a path/name that already exists raises a more helpful error message.
-
Saving a note to the database saves the
modcolumn (last modified time) to make it easier to import an updated package into Anki.