Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #58564

Re: Anki add-on - Help needed

Path csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <joel.goldstick@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.014
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'source,': 0.04; 'function,': 0.09; "people's": 0.09; 'snippet': 0.09; 'cc:addr :python-list': 0.11; 'subject:Help': 0.11; 'python': 0.11; 'def': 0.12; "(i'm": 0.16; 'add-ons': 0.16; 'guessing': 0.16; 'programmer,': 0.16; 'url:)': 0.16; 'wrote:': 0.18; 'looked': 0.18; 'wed,': 0.18; 'trying': 0.19; 'import': 0.22; 'separate': 0.22; 'cc:addr:python.org': 0.22; 'header': 0.24; 'file.': 0.24; 'question': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'options': 0.25; 'header:In-Reply-To:1': 0.27; 'appreciated.': 0.29; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; 'work.': 0.31; 'program,': 0.31; '(on': 0.31; 'dialog': 0.31; 'file': 0.32; 'lists': 0.32; 'there.': 0.32; 'figure': 0.32; 'another': 0.32; 'open': 0.33; 'says': 0.33; 'url:python': 0.33; 'screen': 0.34; 'maybe': 0.34; 'something': 0.35; 'anybody': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'really': 0.36; 'url:listinfo': 0.36; 'url:org': 0.36; 'being': 0.38; 'nov': 0.38; 'subject:needed': 0.38; 'help,': 0.39; 'mailing': 0.39; 'url:mail': 0.40; 'how': 0.40; 'above,': 0.60; "you're": 0.61; 'finish': 0.65; 'here': 0.66; 'add-on': 0.84; 'understand,': 0.84; 'joel': 0.91; 'subject:add': 0.91; 'to:none': 0.92; 'luck': 0.93; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=Jvg+NY6G90zk6XktXs75AMFqG0nE1QFIpjXZBRNH2VU=; b=d/bSZVkVifaEj8h7HW2tWsN3jwV26fqodksExLlhaub5a1RzElnBITVpUGHde3/ULZ OQRo8IRItal5vc40V5YseQ9Akmak/nkVmjUfu1a6Ll5n8zVyL40Rf9kW88+EUAI2hABK o5jJrwmR4JGW+4Lsi9b8R4o6+AGvRpQeFsCJr7PPsAkm3UB42hivwNne1MjuGkCHNzHf NKZCFgqXN+lqQ/ttQNB9Qezu5DZJk43hV9LGi7Z39rpqECiy9waYISIBpJ3w+U82AXJt SBXoW79/rPKKOM4sJrwii5g85P691OhW42S3F/7dc2ku8biazaOQxBe+wY6t5K25LaeZ 7Tjw==
MIME-Version 1.0
X-Received by 10.58.108.196 with SMTP id hm4mr2697668veb.28.1383750124754; Wed, 06 Nov 2013 07:02:04 -0800 (PST)
In-Reply-To <l5dj1j$8gr$6@dont-email.me>
References <l5dj1j$8gr$6@dont-email.me>
Date Wed, 6 Nov 2013 10:02:04 -0500
Subject Re: Anki add-on - Help needed
From Joel Goldstick <joel.goldstick@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2081.1383750127.18130.python-list@python.org> (permalink)
Lines 54
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1383750127 news.xs4all.nl 15943 [2001:888:2000:d::a6]:40896
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:58564

Show key headers only | View raw


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 | NextPrevious in thread | Find similar | Unroll thread


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