open-spaced-repetition / py-fsrs

Python Package for FSRS
https://pypi.org/project/fsrs/
MIT License
145 stars 23 forks source link

feat/add review_card function #43

Closed joshdavham closed 4 months ago

joshdavham commented 4 months ago

I added a new function review_card to the FSRS class to make reviewing cards more straightforward.

Now instead of having to review cards like:

rating = Rating.Good
scheduling_cards = f.repeat(card)

card = scheduling_cards[rating].card
review_log = scheduling_cards[rating].review_log

Developers can write:

rating = Rating.Good

card, review_log = f.review_card(card, rating)

Let me know if this level of abstraction is welcome 👍

Other changes:

joshdavham commented 4 months ago

Ah that makes sense. Just like how anki shows the intervals above the review buttons.