oboeru

a collection of simple, scriptable flashcard programs
git clone anongit@rnpnr.xyz:oboeru.git
Log | Files | Refs | Feed | README | LICENSE

Commit: d346825950cdd2e20c1c8efba1aeb9f0e59a3fb3
Parent: efd4e68e07774eaafb85ad29ac22a917f2dc2368
Author: Randy Palamar
Date:   Sun, 22 May 2022 08:30:17 -0600

oboeru: add a small random offset to new review time

specifically, once a card's review time is greater than LEECH_AGE an
offset of +1 day can be added randomly. this is used to prevent cards
added at the same time from always growing at exactly the same rate.

Diffstat:
MLICENSE | 2+-
Moboeru.c | 5++++-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/LICENSE b/LICENSE @@ -1,6 +1,6 @@ ISC License (ISC) -© 2021 Randy Palamar <palamar@ualberta.ca> +© 2021-2022 Randy Palamar <palamar@ualberta.ca> Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above diff --git a/oboeru.c b/oboeru.c @@ -188,8 +188,11 @@ bump_card(Card *card, int8_t status) if (diff < MINIMUM_INCREASE - 1) { card->due = t + MINIMUM_INCREASE; return 1; + } else if (diff > LEECH_AGE) { + card->due = t + diff * GROWTH_RATE + 24 * 3600 * (rand() % 2); + } else { + card->due = t + diff * GROWTH_RATE; } - card->due = t + diff * GROWTH_RATE; break; case CARD_FAIL: if (diff > LEECH_AGE && !card->nobump)