Thanks for the quick reply! This is actually happening on cards that were already reviewed (see below)… I’m also attempting to use some JS to conditionally hide portions when a card has already been reviewed…
Any idea what could be happening?
Hello. I was wondering if there is a field that represents the average review time for x number of reviews of a single card and not ALL reviews for a single card.
That’s not possible at the moment. You would have to change s ome lines of code in the addon (what’s queried from the database, etc). I can see that it’s useful but honestly my todo list is already too long. If someone sends me the code for this I can include this when I make the next release of this addon (though I don’t when this will be).
How about adding a new config field reps_limit_for_stats
that defaults to nothing but can be set to a number to limit the query to that amount of reps?
Since it seems the repo is private on github, I’ll post my code here
reps_limit = gc("reps_limit_for_stats", None)
if isinstance(reps_limit, int) and reps_limit > 0:
rev_log_query = f"limit {reps_limit}"
else:
rev_log_query = ""
if anki_21_version < 24:
(first, last) = mw.col.db.first(
"select min(id), max(id) sum(time)/1000 from revlog where cid = :id",
id=card.id,
)
times = mw.col.db.list(
"select time from revlog where cid = :id :rev_log_query",
id=card.id,
rev_log_query=rev_log_query,
)
else:
(first, last) = mw.col.db.first(
f"select min(id), max(id) from revlog where cid = {card.id}"
)
times = mw.col.db.list(
f"select time from revlog where cid = {card.id} {rev_log_query}"
)
cnt = len(times)
total = sum(times) / 1000
config.json
"reps_limit_for_stats": null
config.md
- `reps_limit_for_stats` (default "null"): Limit stats about card reps to this number. When null, all reps are included. Affects stats like TimeAvg, TimeTotal
thanks for the code. When I have more time I’ll integrate this. Unfortunately I’m really busy at the moment.
Having issues getting it to run:
Anki 24.06.3 (d678e393) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-14.2-arm64-arm-64bit
===Add-ons (active)===
(add-on provided name [Add-on folder, installed at, version, is config changed])
AMBOSS add-on [‘0amboss_addon’, 2024-08-05T10:24, ‘None’, ‘’]
Add Hyperlink [‘318752047’, 2023-06-18T07:39, ‘None’, ‘’]
Add Table [‘1237621971’, 2023-06-18T07:37, ‘None’, mod]
Add a tag to notes with missing media [‘2027876532’, 2022-06-04T20:28, ‘None’, ‘’]
Advanced Browser [‘874215009’, 2023-10-21T10:34, ‘None’, ‘’]
Advanced Card Styles [‘1625103157’, 2021-12-28T12:50, ‘None’, ‘’]
Advanced Copy Fields [‘1898445115’, 2024-01-08T12:01, ‘v0.4.01’, ‘’]
AnKing Note Types Easy Customization [‘952691989’, 2024-08-19T04:41, ‘None’, mod]
Anki Simulator [‘817108664’, 2023-11-06T12:26, ‘None’, ‘’]
Anki Zoom [‘538879081’, 2020-04-03T20:20, ‘v1.1.3’, mod]
AnkiHub [‘1322529746’, 2024-09-30T07:21, ‘None’, ‘’]
Asset Manager [‘656021484’, 2021-08-29T17:07, ‘None’, ‘’]
Audiovisual Feedback [‘231569866’, 2023-07-08T23:34, ‘0.8’, mod]
Batch Editing [‘291119185’, 2023-10-25T20:38, ‘None’, ‘’]
BetterSearch [‘1052724801’, 2024-03-06T11:25, ‘None’, ‘’]
Browser Resizer [‘1435775540’, 2023-11-11T12:16, ‘None’, ‘’]
Calculate New Cards To Do [‘2014569756’, 2022-05-19T01:38, ‘None’, mod]
Clickable Tags v20 [‘1739176371’, 2022-01-30T17:58, ‘None’, ‘’]
Closet For Anki [‘272311064’, 2022-08-12T04:27, ‘None’, ‘’]
Cloze Hide All [‘1709973686’, 2024-09-10T22:45, ‘24.9.11i29’, ‘’]
Colorful Tags Hierarchical Tags [‘594329229’, 2022-09-15T11:06, ‘None’, ‘’]
Contanki - Controller Support for Anki beta [‘1898790263’, 2024-02-29T20:22, ‘v0.9.2-beta’, ‘’]
Correct Answers Graph [‘993120073’, 2022-03-14T16:52, ‘None’, ‘’]
Countdown To Events and Exams [‘1143540799’, 2022-06-27T07:50, ‘None’, ‘’]
Custom Background Image and Gear Icon [‘1210908941’, 2023-04-18T21:19, ‘None’, mod]
Customize Keyboard Shortcuts [‘24411424’, 2023-11-01T05:17, ‘None’, ‘’]
Duplicate and Reorder [‘1114271285’, 2023-08-27T16:55, ‘None’, ‘’]
Edit Field During Review Cloze [‘385888438’, 2024-01-03T02:19, ‘6.18’, mod]
Editor ProToolBox - Web importer, quick format, & media scraper [‘editor_pro_toolbox’, 2023-10-22T17:38, ‘None’, ‘’]
Exam Notifier [‘236593452’, 2023-01-19T12:12, ‘None’, ‘’]
Export Single Tag For Sharing [‘960563361’, 2022-04-10T17:30, ‘None’, ‘’]
Extended Card Stats During Review [‘1008566916’, 2024-02-26T14:07, ‘None’, ‘’]
Extended Tag AddEdit Dialog [‘1135507717’, 2023-11-11T11:58, ‘None’, ‘’]
FSRS Helper Postpone Advance Load Balance Easy Days Disperse Siblings [‘759844606’, 2024-10-09T22:36, ‘None’, ‘’]
Fastbar- with nightmode support [‘46611790’, 2023-06-27T07:47, ‘None’, ‘’]
Field AutoComplete [‘511710206’, 2024-07-20T10:07, ‘None’, mod]
High Yield Tags [‘1918380616’, 2023-01-10T14:14, ‘None’, ‘’]
Image Editor [‘307397307’, 2022-09-08T00:09, ‘None’, ‘’]
Image Occlusion Enhanced [‘1374772155’, 2022-04-09T03:15, ‘None’, ‘’]
Keep card displayed in reviewer until it is modified [‘1894745652’, 2020-01-23T20:22, ‘None’, ‘’]
Learning Step and Review Interval Retention [‘1949865265’, 2024-01-06T12:48, ‘None’, ‘’]
Mobile Pop-up Dictionary [‘1143247763’, 2024-01-29T17:11, ‘None’, mod]
More Decks Stats and Time Left [‘1556734708’, 2024-08-19T18:49, ‘None’, ‘’]
More Overview Stats 21 [‘738807903’, 2024-08-22T05:14, ‘None’, ‘’]
New Cards Counter [‘635082046’, 2022-04-20T16:37, ‘None’, ‘’]
Open Add-on Folder Shortcut [‘830940686’, 2022-07-20T13:06, ‘None’, ‘’]
Postpone cards review [‘1152543397’, 2023-04-14T22:29, ‘None’, ‘’]
Progress Graphs and Stats for Learned and Matured Cards [‘266436365’, 2020-03-29T02:26, ‘None’, ‘’]
Quick Field Navigation [‘734297936’, 2019-12-29T21:24, ‘None’, ‘’]
Quick tagging 21 [‘304770511’, 2020-02-11T01:17, ‘None’, ‘’]
Quizlet to Anki 21 Importer with audio support [‘1362209126’, 2024-10-10T14:19, ‘None’, ‘’]
Rebuild All Empty All for Anki 21 [‘1810938259’, 2018-07-20T00:40, ‘None’, ‘’]
Reset Ease [‘947935257’, 2023-11-11T20:22, ‘None’, ‘’]
Review Heatmap [‘1771074083’, 2022-06-29T21:43, ‘None’, ‘’]
Review Pass Rate Bar [‘1821339370’, 2021-09-20T19:41, ‘None’, ‘’]
Searching PDF Reading Note-Taking in Add Dialog - Qt6 port [‘572933442’, 2024-04-02T13:18, ‘None’, mod]
Set Card Ease [‘1387847178’, 2022-12-26T03:44, ‘None’, ‘’]
Show total review count in main screen [‘1730200873’, 2023-10-14T13:00, ‘None’, ‘’]
Special Fields [‘1102281552’, 2024-03-19T19:34, ‘None’, ‘’]
Speed Focus Mode auto-alert auto-reveal auto-answer [‘1046608507’, 2022-12-16T06:24, ‘None’, ‘’]
Spell Checker with Custom Dictionaries [‘390813456’, 2023-10-20T12:00, ‘None’, mod]
Straight Reward [‘957961234’, 2023-11-01T10:11, ‘None’, ‘’]
SwiftAnki Quick Anki Navigation with Keyboard Shortcuts [‘1467361433’, 2024-09-13T17:38, ‘None’, ‘’]
Symbols As You Type updated for 2310 [‘1957191470’, 2023-12-16T10:27, ‘None’, ‘’]
Symbols [‘1461102936’, 2024-02-10T11:53, ‘None’, mod]
Tag Data to CSV [‘1656094334’, 2021-05-12T18:53, ‘None’, ‘’]
The KING of Button Add-ons [‘374005964’, 2024-09-23T08:14, ‘None’, ‘’]
The KING of Study Timers [‘907028815’, 2022-04-20T14:14, ‘None’, ‘’]
True Retention [‘613684242’, 2017-11-19T15:43, ‘None’, ‘’]
Web Browser - Search terms Import texts and images automatically [‘864545277’, 2023-11-17T14:28, ‘None’, mod]
Weekends and Holidays [‘1992008104’, 2022-12-19T20:24, ‘None’, mod]
Wrapper meta-addon [‘396502676’, 2024-06-10T06:00, ‘None’, ‘’]
Ze Add Note Id [‘886709118’, 2021-03-02T15:06, ‘None’, ‘’]
add-on dialog searchfilter bar [‘561945101’, 2023-10-18T12:22, ‘None’, ‘’]
deck and card info sidebar during review [‘673114053’, 2022-08-16T06:30, ‘None’, mod]
extended html editor for fields and card templates with some versioning [‘1043915942’, 2023-03-19T13:30, ‘None’, ‘’]
uworld_qid_to_anki_search [‘607963104’, 2024-04-09T18:31, ‘None’, mod]
===IDs of active AnkiWeb add-ons===
1008566916 1043915942 1046608507 1052724801 1102281552 1114271285 1135507717 1143247763 1143540799 1152543397 1210908941 1237621971 1322529746 1362209126 1374772155 1387847178 1435775540 1461102936 1467361433 1556734708 1625103157 1656094334 1709973686 1730200873 1739176371 1771074083 1810938259 1821339370 1894745652 1898445115 1898790263 1918380616 1949865265 1957191470 1992008104 2014569756 2027876532 231569866 236593452 24411424 266436365 272311064 291119185 304770511 307397307 318752047 374005964 385888438 390813456 396502676 46611790 511710206 538879081 561945101 572933442 594329229 607963104 613684242 635082046 656021484 673114053 734297936 738807903 759844606 817108664 830940686 864545277 874215009 886709118 907028815 947935257 952691989 957961234 960563361 993120073
===Add-ons (inactive)===
(add-on provided name [Add-on folder, installed at, version, is config changed])