mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
summarize progress for the day
This commit is contained in:
parent
f145855132
commit
4f99bcdae4
2 changed files with 28 additions and 0 deletions
|
@ -778,6 +778,8 @@ To upgrade an old deck, download Anki 0.9.8.7."""))
|
||||||
d['due'] = self.deck.failedSoonCount + self.deck.revCount
|
d['due'] = self.deck.failedSoonCount + self.deck.revCount
|
||||||
d['new'] = self.deck.newCountToday
|
d['new'] = self.deck.newCountToday
|
||||||
d['mod'] = self.deck.modified
|
d['mod'] = self.deck.modified
|
||||||
|
d['time'] = self.deck._dailyStats.reviewTime
|
||||||
|
d['reps'] = self.deck._dailyStats.reps
|
||||||
if self.deck.modifiedSinceSave():
|
if self.deck.modifiedSinceSave():
|
||||||
if (self.deck.path is None or
|
if (self.deck.path is None or
|
||||||
(not self.config['saveOnClose'] and
|
(not self.config['saveOnClose'] and
|
||||||
|
@ -1030,6 +1032,8 @@ your deck."""))
|
||||||
'due': deck.failedSoonCount + deck.revCount,
|
'due': deck.failedSoonCount + deck.revCount,
|
||||||
'new': deck.newCountToday,
|
'new': deck.newCountToday,
|
||||||
'mod': deck.modified,
|
'mod': deck.modified,
|
||||||
|
'time': deck._dailyStats.reviewTime,
|
||||||
|
'reps': deck._dailyStats.reps,
|
||||||
})
|
})
|
||||||
deck.close()
|
deck.close()
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
@ -1175,6 +1179,20 @@ your deck."""))
|
||||||
layout.addItem(QSpacerItem(1,1, QSizePolicy.Expanding,
|
layout.addItem(QSpacerItem(1,1, QSizePolicy.Expanding,
|
||||||
QSizePolicy.Expanding),
|
QSizePolicy.Expanding),
|
||||||
c+3, 5)
|
c+3, 5)
|
||||||
|
# summarize
|
||||||
|
reps = 0
|
||||||
|
mins = 0
|
||||||
|
due = 0
|
||||||
|
for d in self.browserDecks:
|
||||||
|
reps += d['reps']
|
||||||
|
mins += d['time']
|
||||||
|
self.mainWin.deckBrowserSummary.setText(ngettext(
|
||||||
|
"Studied <b>%(reps)d card</b> in <b>%(time)s</b> today.",
|
||||||
|
"Studied <b>%(reps)d cards</b> in <b>%(time)s</b> today.",
|
||||||
|
reps) % {
|
||||||
|
'reps': reps,
|
||||||
|
'time': anki.utils.fmtTimeSpan(mins),
|
||||||
|
})
|
||||||
else:
|
else:
|
||||||
l = QLabel(_("""\
|
l = QLabel(_("""\
|
||||||
<br>
|
<br>
|
||||||
|
|
|
@ -1158,6 +1158,16 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="deckBrowserSummary">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="Line" name="line_4">
|
<widget class="Line" name="line_4">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
|
Loading…
Reference in a new issue