Files
anki-static/AnkiStatic.Lib/Domain/Review.fs
patrick 3e3d092c27
All checks were successful
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/all-checks-complete Pipeline was successful
Add JSON input (#3)
Co-authored-by: Smaug123 <patrick+github@patrickstevens.co.uk>
Reviewed-on: #3
2023-09-08 18:19:06 +00:00

26 lines
599 B
Forth

namespace AnkiStatic
open System
type ReviewConfiguration =
{
Bury : bool
EasinessPerEasyReview : float
Fuzz : float
IntervalFactor : int
MaxInterval : TimeSpan
/// Unused; set to 1
MinSpace : int
PerDay : int
}
static member toJson (this : ReviewConfiguration) : string =
$"""{{
"perDay": %i{this.PerDay},
"ivlFct": %i{this.IntervalFactor},
"maxIvl": %i{int this.MaxInterval.TotalDays},
"minSpace": %i{this.MinSpace},
"ease4": %f{this.EasinessPerEasyReview},
"fuzz": %f{this.Fuzz}
}}"""