dracosh 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/README.md +16 -11
  2. package/locales/de.json +1046 -0
  3. package/locales/en.json +1029 -0
  4. package/locales/fr.json +1094 -0
  5. package/locales/pl.json +1117 -0
  6. package/locales/uk.json +1118 -0
  7. package/package.json +2 -2
  8. package/src/alerts.js +3 -1
  9. package/src/backup.js +2 -1
  10. package/src/cardline.js +71 -0
  11. package/src/cli.js +39 -52
  12. package/src/commands.js +14 -12
  13. package/src/demo.js +11 -0
  14. package/src/diff.js +13 -7
  15. package/src/i18n.js +68 -0
  16. package/src/judge.js +24 -6
  17. package/src/library.js +62 -35
  18. package/src/lock.js +2 -1
  19. package/src/manage.js +150 -60
  20. package/src/pause.js +1 -2
  21. package/src/progress.js +76 -59
  22. package/src/quiet.js +3 -2
  23. package/src/scheduler.js +3 -6
  24. package/src/session.js +69 -19
  25. package/src/settings.js +13 -6
  26. package/src/starter.js +36 -27
  27. package/src/store.js +9 -7
  28. package/src/tips.js +12 -3
  29. package/src/ui/AddCard.js +405 -81
  30. package/src/ui/AnswerInput.js +22 -10
  31. package/src/ui/App.js +181 -50
  32. package/src/ui/BadgeUnlock.js +4 -3
  33. package/src/ui/Badges.js +9 -8
  34. package/src/ui/Choice.js +14 -9
  35. package/src/ui/Companion.js +13 -13
  36. package/src/ui/Confetti.js +2 -2
  37. package/src/ui/Decks.js +58 -8
  38. package/src/ui/DieRoll.js +9 -9
  39. package/src/ui/Evolution.js +7 -7
  40. package/src/ui/Hatch.js +7 -6
  41. package/src/ui/Header.js +58 -16
  42. package/src/ui/Help.js +31 -25
  43. package/src/ui/Mascot.js +1 -2
  44. package/src/ui/Missed.js +13 -12
  45. package/src/ui/Preview.js +48 -29
  46. package/src/ui/Reset.js +13 -14
  47. package/src/ui/Settings.js +26 -19
  48. package/src/ui/Stats.js +24 -23
  49. package/src/ui/Summary.js +10 -9
  50. package/src/ui/TheOne.js +7 -6
  51. package/src/ui/icons.js +1 -2
  52. package/src/ui/kit.js +34 -6
  53. package/src/vacation.js +2 -1
  54. package/src/words.js +2 -1
  55. package/data/tips.json +0 -32
package/README.md CHANGED
@@ -14,13 +14,17 @@ It's made for people who live in a terminal or spend most of the day at a comput
14
14
 
15
15
  - Your cards live in Dracosh's own library, organised in decks; no other app needs to be running
16
16
  - Add cards, start decks and switch between them right in the app (`/add`, `/decks`)
17
- - Each deck is asked both ways (kot → cat and cat → kot) or one way only, as you choose when you make it
17
+ - One line is a card: `kot = cat; kitty // Mój kot śpi.` (`;` separates right answers, `//` adds an example). Paste a whole list and check it before it's saved
18
+ - Each deck is asked the way you pick after its first card: front → back, back → front, or both ways; change it any time in `/decks`
19
+ - Type the answer, or press Enter with nothing typed to see it and say whether you knew it (`1` or `2`): handy for whole sentences, and it counts just the same
20
+ - Cloze cards for sentences: `I {{look forward}} to it` asks one gap at a time
18
21
  - Forgiving answer checks: case and punctuation don't matter, a missing Polish letter (ż, ó, ł…) still counts and shows the right spelling, one typo is fine on longer words, and after a miss you see letter by letter where you went wrong
19
22
  - Leitner boxes, so the cards you know come back less and less often; a card is only asked when it's due
20
23
  - Daily goal, streaks (weekends and days off don't break them) and 36 badges (one of them a secret)
21
24
  - A pixel dragon that hatches from an egg, evolves over a year of streaks, blinks, and falls asleep if you ignore it
22
25
  - 8-bit sound effects, generated from code
23
- - A short tip about Dracosh while you wait for the next card
26
+ - Now and then, a short tip about Dracosh while you wait for the next card
27
+ - Speaks English, Polish, German, French and Ukrainian: it follows your system's language, and `/settings` switches it
24
28
 
25
29
  ## Install
26
30
 
@@ -30,7 +34,7 @@ You need Node 22 or newer.
30
34
  npm install -g dracosh
31
35
  ```
32
36
 
33
- A fresh install starts with a short "Getting started" deck: a tour where every card tells you what to type and shows you one more thing Dracosh can do. When you're through, `/add` starts your own deck and the tour makes room for it. Importing decks (from Anki, CSV and more) is on the way, see [What's next](#whats-next).
37
+ A fresh install starts with a short "Getting started" deck, in the app's language: a tour where every card tells you what to type and shows you one more thing Dracosh can do. When you're through, `/add` starts your own deck and the tour makes room for it. Importing decks (from Anki, CSV and more) is on the way, see [What's next](#whats-next).
34
38
 
35
39
  Want a look first? `dracosh --preview` shows every screen and animation on made-up data.
36
40
 
@@ -46,15 +50,15 @@ dracosh --preview
46
50
  dracosh restore # list your backups; dracosh restore 2 brings one back
47
51
  ```
48
52
 
49
- Type the answer and press Enter; don't know it? Press Enter with nothing typed to see the answer. Press `/` for commands:
53
+ Type the answer and press Enter. Not sure, or the answer is a whole sentence? Press Enter with nothing typed: the answer shows up, then press `1` if you didn't know it or `2` if you did. Press `/` for commands:
50
54
 
51
55
  | Command | What it does |
52
56
  | --- | --- |
53
- | `/add` | add cards to one of your decks, or start a new deck |
54
- | `/decks` | switch to another deck (Dracosh remembers it), or start a new one |
57
+ | `/add` | add cards to one of your decks, or start a new deck (one line per card, ↑ fixes the last one) |
58
+ | `/decks` | switch to another deck (Dracosh remembers it), start a new one, or press → to change how a deck is asked |
55
59
  | `/hint` | reveal one more letter |
56
- | `/correct` | your answer was right after all; it's accepted from now on |
57
- | `/settings` | interval, daily goal, sound, quiet hours, weekends, tips, and a reset |
60
+ | `/correct` | your answer was right after all; after a yes it's accepted from now on |
61
+ | `/settings` | language, rhythm (a card every few minutes, or a study session), interval, daily goal, sound, quiet hours, weekends, tips, and a reset |
58
62
  | `/stats` | streak and a calendar of your month |
59
63
  | `/badges` | all badges and how to get them |
60
64
  | `/companion` | your dragon, its element and the forms ahead |
@@ -81,14 +85,15 @@ npm link # puts `dracosh` on your PATH
81
85
  npm test
82
86
  ```
83
87
 
84
- The quiz logic in `src/session.js` and `src/progress.js` does no I/O, which keeps it easy to test. The UI is built with [Ink](https://github.com/vadimdemedes/ink) and lives in `src/ui/`. Sound effects are generated by `scripts/make-sounds.js` (`npm run sounds`).
88
+ The quiz logic in `src/session.js` and `src/progress.js` does no I/O, which keeps it easy to test. The UI is built with [Ink](https://github.com/vadimdemedes/ink) and lives in `src/ui/`; every text it shows is in `locales/en.json`, read through `t("key")` from `src/i18n.js`.
89
+
90
+ The other languages live next to it in `locales/`, the tour included. `npm test` checks that each one has every English key, the same `{placeholders}` and all the plural forms its language needs. If you're a native speaker and something reads oddly, a pull request is very welcome. Sound effects are generated by `scripts/make-sounds.js` (`npm run sounds`).
85
91
 
86
92
  ## What's next
87
93
 
88
94
  Dracosh now keeps its own card library, with a short tour and `/add` to start your own deck. Coming next, roughly in this order:
89
95
 
90
- - Card types: definitions and question and answer decks, not just words. For each deck you choose whether you type the answer or just check yourself.
91
- - More languages: decks in any language, with answer checking that forgives a missing accent in European languages and Cyrillic (other scripts are checked exactly), and the app itself in English, Polish, German, French and Ukrainian.
96
+ - More languages for your decks: answer checking that forgives a missing accent in European languages and Cyrillic (other scripts are checked exactly).
92
97
  - Import and export: Anki (plain-text exports and `.apkg` decks from AnkiWeb), CSV, JSON and pasted lists, and export back to Anki.
93
98
  - Decks and cards in the app: browse, edit and delete with undo, plus a welcome flow for new users.
94
99
  - Optional AI help for writing cards, with your own API key or a local model.