From f97abacb4a545e71fa1e9d01be5be1d579f5ae6f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 18 May 2013 18:37:17 +0900 Subject: [PATCH] add mature today stat --- anki/stats.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/anki/stats.py b/anki/stats.py index 7ca0df27a..82b65eeef 100644 --- a/anki/stats.py +++ b/anki/stats.py @@ -165,6 +165,16 @@ from revlog where id > ? """+lim, (self.col.sched.dayCutoff-86400)*1000) b += "
" b += (_("Learn: %(a)s, Review: %(b)s, Relearn: %(c)s, Filtered: %(d)s") % dict(a=bold(lrn), b=bold(rev), c=bold(relrn), d=bold(filt))) + # mature today + mcnt, msum = self.col.db.first(""" +select count(), sum(case when ease = 1 then 0 else 1 end) from revlog +where lastIvl >= 21 and id > ?"""+lim, (self.col.sched.dayCutoff-86400)*1000) + b += "
" + if mcnt: + b += _("Correct answers on mature cards: %d/%d (%.1f%%)") % ( + msum, mcnt, msum / float(mcnt) * 100) + else: + b += _("No mature cards were studied today.") return b # Due and cumulative due