Anki add-on - Help needed

Joel Goldstick joel.goldstick at
Wed Nov 6 16:02:04 CET 2013

On Wed, Nov 6, 2013 at 9:17 AM, SH <sshhhhhh at invalid.invalid> wrote:
> Is anybody here able to help me finish off an Anki add-on? If you're not
> familiar with it, Anki ( is an open source, cross
> platform flashcard learning program, in PyQT. It's extensible, with add-
> ons.
> Thing is, I'm not a programmer, but I've managed to make my own add-on by
> trying to figure out how other people's add-ons work. I've got something
> that works, but it needs finishing off.
> There is a lot I don't understand, but I've got this snippet which will
> retrieve a value associated with the key 'dictKey' from a dictionary held
> in a file. However, it will only do it if I open the Options dialog in
> Anki (I'm guessing that's what DeckConf.loadConf is about). How can I get
> that value for use in another function, without having to open the dialog?
> [code]
> from aqt.deckconf import DeckConf
> from anki.hooks import wrap
> def load_dictVal(self):
>     c = self.conf
>     x = c.get('dictKey')
>     print(x)
> DeckConf.loadConf = wrap(DeckConf.loadConf, load_dictVal)
> [/code]
> The dictionary is in a file at (on Linux) ~/Anki/User 1/collection.anki2.
> 'User 1' may vary, and each user has their own collection.anki2 file. The
> file's header says it's 'SQLite format 3'.
> Secondly, separate from the above, I want to get a True/False value from
> whether a deck is currently being studied? Maybe whether the review screen
> is open, or something?
> Any help would be greatly appreciated.
> --
> Stew
> --

Best to you if someone here can help, but your question isn't really a
python question as much as one about how anki or pyqt work.  Have you
looked for mailing lists for pyqt or anki? you might have better luck

Joel Goldstick

More information about the Python-list mailing list