akdasa-studios / shlokas-core Goto Github PK
View Code? Open in Web Editor NEWCore library for Shlokas app
Core library for Shlokas app
class ReviewLog {
reviewCardId: CardId
grade: ReviewGrade
timestamp: number
}
interface CardsReviewStatistics {
[date: string /* 2000-01-01 */] : count: number
}
const cardReviewsCount: CardsReviewStatistics = service.cardsReviewed(
from: Date,
to: Date = Today
)
If there is at least one card in the Review deck set InDeck property of VerseSatus to Review
"Easy" and "Good" are increasing ease. But "Hard" should decrease ease.
One verse might belong to several collections.
Example of collections:
Calculate the average interval for all cards in a review of a verse. Consider the interval to 0 if a card is not in a review state or not added.
progress = (average interval in days / 90 days) * 100%
UpdateVerseStatus
commandIt helps to avoid collision while syncing.
Scenario: User removes accidentally added verse from the Inbox deck
I, as a user, want to remove an accidentally added verse from the Inbox
Given Empty Inbox deck
When I add a verse "BG 1.1" to the Inbox deck
And I revert the last action
Then Inbox deck contains no cards
ReviewCardReviewed should create a new ReviewLog
instance:
reviewCardId: reviewCard.id // from constructor
grade: grade // from constructor
timestamp: context.timeMachine.now.getTime()
const versesMemorized: number = service.versesMemorized(
from: Date,
to: Date = Today
)
Find the count of from <= VerseStatus.memorizedAt <= to
Make some fields public readonly
Verse
should have two options:
publish
to make it available in the libraryunpublish
to make it unavailable to users in the libraryUsers should still be able to find unpublished verses if they set a special flag while searching.
Scenario: User removes previously added verse from the Inbox deck
I, as a user, want to remove an accidentally added verse from the Inbox
Given Empty Inbox deck
When I add a verse "BG 1.1" to the Inbox deck
And I revert the last action
Then Inbox deck contains no cards
story: akdasa-studios/shlokas#10
AddVerseToInboxDeck
commandAdd field to VerseStatus model
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.