Anki add-on: Additional Card Fields (Fork for 2.1)

This add-on allows to include additional special fields to a card template, e.g. {{info-LastReview:}} or - {{info-Review?:}} . For a full list of fields see below. Note that some of these names end with "?" and some don't. Check the documentation below. Some of these fields sometimes return an empty string. Conditional replacement no longer works in Anki 2.1.20 or later. But there are workarounds, see here and here . Add-ons don't work on mobile . If you have some text that only makes sense with the additional card fields you can hide it on mobile like this . If your Anki version is 2.1.19 or lower you use {{info::Ivl}} or {{info::LastReview}} . For Anki version 2.1.20 or later you use {{info-Ivl:}} or {{info-LastReview:}} . All templates need to be updated to the new syntax. This should happen automatically the first time you start Anki 2.1.20. This change was necessary because of changes in Anki 2.1.20 that made Anki faster and more robust. Note for Anki 2.1.20 or later: Some people reported that updating the add-on to the latest version doesn't work for them but that uninstalling and reinstalling works. If you have problems with updating this add-on you should try this, for details see here . other addons The add-on Anki JS API which was released in 2021-02 seems to offer some similar functionality. I haven't tested it. bugs, etc. Use this version at your own risk. Please do not use reviews for bug reports or support requests. I don't get notified of your reviews, you don't get notified about my answers and properly troubleshooting an issue through them is nearly impossible (formatting is limited and I can't reply multiple times). If you find a bug let me know in the official Anki support forum , on github . Versions - 2022-10-23 fix overdue days/percent of scheduled ivl with latest code from Advanced browser, fix previewer bug, add two new props - 2022-02-22 anki renamed a function (fix deprecation warning) - 2021-12-06 remove unused code - 2021-11-21 add some note properties (for newer anki verisons) - 2020-09-20 2.1.28+: no longer use deprecated col.backend.format_time_span() - 2020-04-16 new value: reviewCardPercentageDueString, load user values, remove deprecated fmtTimeSpan() - 2020-03-30 fix for 2.1.24 - 2020-01-22 new version for 2.1.20 (adjusted by the Anki creator Damien Elmes) - 2020-01-12 fix for 2.1.17 - 2019-07-04 added config options, disabled deck options by default, helper for 1994996371 - 2019-02-24 fix for 2.1.9 (thanks for the fix IIRC to /u/khonkhortisan) - 2019-01-30 initial release Details (for version Anki 2.1.20 or later) You can include information about the current card: - {{info-FirstReview:}} - the first day that this card got reviewed - {{info-LastReview:}} - the last reviewed day - {{info-TimeAvg:}} - average time spent on this card - {{info-TimeTotal:}} - total time spent - {{info-overdue_fmt:}} - overdue days formatted - {{info-overdue_days:}} - overdue days - {{info-Ord:}} - the number of the template. The first template gets the number 0, the second the number 1, etc. Useful e.g. for clozed cards, where you want Javascript code to behave different for certain cards - {{info-Did:}} - deck id - {{info-Due:}} - due date - {{info-Id:}} - card id - {{info-Ivl:}} - current interval - {{info-Queue:}} - 0=new, 1=learning, 2=due, 3=(re)learning - next day or later, -1=suspended, -2=user buried, -3=sched buried - {{info-Reviews:}} - number of reviews that you had on a card - {{info-Lapses:}} - number of lapses - {{info-Type:}} - 0=suspended, 1=learning, 2=normal, 3=relearning - {{info-Nid:}} - note id - {{info-Mod:}} - last modification date - {{info-Usn:}} - universal serial number which is incremented everytime you upload to AnkiWeb - {{info-Factor:}} - the easiness of a card, e.g. 2500 would be 250% - {{info-Ease:}} - the easiness of a card, e.g. 250 is the default Anki uses for new cards. More readable version of "Factor" - {{info-Review?:}} - is this card being reviewed? - {{info-New?:}} - is this card new? - {{info-Learning?:}} - is this card being learned? - {{info-TodayLearning?:}} - shown if card in learning and in queue 1 - {{info-DayLearning?:}} - shown if card in learning and in queue 3 - {{info-Young:}} - shown if card in "review" and interval shorter than 21 days - {{info-Mature:}} - shown if card in "review" and interval longer than 21 days - {{info-Date_Created:}} - Date of card creation = noteID formatted If you enable it in the settings of this add-on you can also show some deck options. I don't use this. To view deck options I prefer the add-ons deck and card info sidebar during review or Extended Card Stats During Review because these work for all note types. - {{info-Options_Group_ID:}} - {{info-Options_Group_Name:}} - {{info-Ignore_answer_times_longer_than:}} - {{info-Show_answer_time:}} - {{info-Auto_play_audio:}} - {{info-When_answer_shown_replay_q:}} - {{info-is_filtered_deck:}} - {{info-deck_usn:}} - {{info-deck_mod_time:}} - {{info-new__steps_in_minutes:}} - {{info-new__order_of_new_cards:}} - {{info-new__cards_per_day:}} - {{info-graduating_interval:}} - {{info-easy_interval:}} - {{info-Starting_ease:}} - {{info-bury_related_new_cards:}} - {{info-MaxiumReviewsPerDay:}} - {{info-EasyBonus:}} - {{info-IntervalModifier:}} - {{info-MaximumInterval:}} - {{info-bur_related_reviews_until_next_day:}} - {{info-lapse_learning_steps:}} - {{info-lapse_new_ivl:}} - {{info-lapse_min_ivl:}} - {{info-lapse_leech_threshold:}} - {{info-lapse_leech_action:}}

GitHub repository: ijgnd/anki21__reviewer_additional_card_fields