srs

package
v0.0.0-...-719087c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReviewConfidence

type ReviewConfidence int
const (
	EasyReviewConfidence ReviewConfidence = iota
	MediumReviewConfidence
	HardReviewConfidence
)

type SRS

type SRS struct {
	Cards []*SRSCard
	// contains filtered or unexported fields
}

func NewSRS

func NewSRS(deckDir string) *SRS

func (*SRS) CheckOrCreateCard

func (s *SRS) CheckOrCreateCard(cardID string, deck *storage.Deck) *SRSCard

func (*SRS) GetReviewCards

func (s *SRS) GetReviewCards(numCards int) []storage.Flashcard

func (*SRS) LoadCardsFromMarkdown

func (s *SRS) LoadCardsFromMarkdown(deckDir string) error

func (*SRS) LoadSRSFromFile

func (s *SRS) LoadSRSFromFile() error

func (*SRS) SaveSRSToFile

func (s *SRS) SaveSRSToFile() error

func (*SRS) UpdateSRSData

func (s *SRS) UpdateSRSData(deck *storage.Deck, cardID string, outcome int)

type SRSCard

type SRSCard struct {
	Card           *storage.Flashcard
	ReviewInterval int       `json:"reviewInterval"`
	LastReviewed   time.Time `json:"lastReviewed"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL