Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #58564
| References | <l5dj1j$8gr$6@dont-email.me> |
|---|---|
| Date | 2013-11-06 10:02 -0500 |
| Subject | Re: Anki add-on - Help needed |
| From | Joel Goldstick <joel.goldstick@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2081.1383750127.18130.python-list@python.org> (permalink) |
On Wed, Nov 6, 2013 at 9:17 AM, SH <sshhhhhh@invalid.invalid> wrote:
> Is anybody here able to help me finish off an Anki add-on? If you're not
> familiar with it, Anki (http://ankisrs.net/) 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
>
> --
> https://mail.python.org/mailman/listinfo/python-list
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
there.
--
Joel Goldstick
http://joelgoldstick.com
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Anki add-on - Help needed SH <sshhhhhh@invalid.invalid> - 2013-11-06 14:17 +0000 Re: Anki add-on - Help needed Joel Goldstick <joel.goldstick@gmail.com> - 2013-11-06 10:02 -0500
csiph-web