Don't start the web server if imported not from inside Anki
Make sure Anki Connect instance is not garbage collected.
This kills the timer that's responsible for the web server.
The method was failing due to Anki API changes.
Also, make it mandatory to call the method with `cardsToo=True`,
since deleting decks on Anki >= 2.1.28 without cards is
no longer supported, and the deprecated `decks.rem()` method
on Anki >= 2.1.45 ignores keyword arguments.
Anki deprecated access to the model from the API and the new MockModel
contained no attribute 'cards' leading to an error message being thrown
instead of card ids being returned. This change uses findCards to find
card ids instead of the model so no error is thrown while keeping
guiBrowse functionally equivalent to the previous version.
Closes#277.
* feat: cardsInfo now also returns the modification time
* minor: wrong indentation
* new method: get modification time of cards
* docs: mentions new method cardsModTime
* docs: readme now mentions that modification time is in the result from cardsInfo
Co-authored-by: thiswillbeyourgithub <github@32mail.33mail.comm>
The follow deck configuration actions were updated to conform to Anki’s current deck configuration access. Specifically, `decks.conf` is no longer available.
setDeckConfigId no longer check for existence of configuration id, because the access to the list of config id’s appears to be only through decks; and the config may theoretically be orphaned.
* Added guiCheckDatabase action
This action initiates a check database action in Anki but doesn’t wait for the action to complete before returning.
* Fixed#202 no dconf attribute in saveDeckConfig
Anki manages access to deck configuration differently now. This adapts saveDeckConfig to new style of access.
* Fix error message in updateNoteFields method
* Fix error handling in cardsInfo, notesInfo methods
* Add more tests for updateNoteFields, notesInfo
* Fix error handling in several methods
Also fixed obvious bugs in replaceTags and replaceTagsInAllNotes
methods.
* Add more tests for cards methods
* Add more tests for notes methods
* Update documentation on cards methods
* added findAndReplaceInModels api call
* added documentation for findAndReplaceInModels
* added findAndReplaceInModels api call
* updatd findAndReplaceInModels function
* added unit test for findAndReplaceInModels in models
* updated findAndReplaceInModels
* added unit test for findAndReplaceInModels
* removed 'all_models' in findAndReplaceInModels
Bug: if sync is enabled for profile, then we have alot of recursive
calls to loadProfile method because main window is still active until
sync is ended. And this freezes Anki app.
* clearUnusedTags and replaceTags are added
* added clearUnusedTags and replaceTags
* added clearUnusedTags and replaceTags
* removed whitespaces and indentations
* removed white spaces and indentations
* added removeEmptyNotes
* clearUnusedTags and replaceTags are added
* added clearUnusedTags and replaceTags
* added clearUnusedTags and replaceTags
* removed whitespaces and indentations
* removed white spaces and indentations
- Sound and video share same [sound:..] tag. See 0c08ff5317/pylib/anki/sound.py (L33)
- Tested and verified picture is added and video is added when `addNote` API.
* Don't call note.dupeOrEmpty when mode is 'deck'
* Update return type to be consistent with latest note.duplicateOrEmpty
* Fix main deck ID not always being included
* Add endpoint to retrieve collection stats report
* Create separate test for statistics
* Add test for collectionStats
* Fixed typo
* Change endpoint name to use a verb
* Change name to getCollectionStatsHTML
* Allow stats for whole collection
* Allow stats for whole collection
* Add endpoint to retrieve collection stats report
* Create separate test for statistics
* Add test for collectionStats
* Fixed typo
* Change endpoint name to use a verb
* Change name to getCollectionStatsHTML