dracosh 0.1.0 → 0.2.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 (51) hide show
  1. package/README.md +42 -20
  2. package/assets/sounds/badge-1.wav +0 -0
  3. package/assets/sounds/badge-2.wav +0 -0
  4. package/assets/sounds/badge-3.wav +0 -0
  5. package/assets/sounds/badge-4.wav +0 -0
  6. package/data/tips.json +31 -1361
  7. package/package.json +1 -1
  8. package/src/alerts.js +4 -3
  9. package/src/backup.js +95 -0
  10. package/src/cli.js +97 -16
  11. package/src/commands.js +7 -7
  12. package/src/judge.js +33 -12
  13. package/src/library.js +127 -0
  14. package/src/lock.js +63 -0
  15. package/src/manage.js +75 -0
  16. package/src/pause.js +23 -0
  17. package/src/progress.js +145 -53
  18. package/src/quiet.js +1 -1
  19. package/src/scheduler.js +38 -26
  20. package/src/session.js +128 -30
  21. package/src/settings.js +4 -9
  22. package/src/starter.js +38 -0
  23. package/src/store.js +55 -16
  24. package/src/tips.js +7 -24
  25. package/src/ui/AddCard.js +172 -0
  26. package/src/ui/AnswerInput.js +8 -5
  27. package/src/ui/App.js +211 -71
  28. package/src/ui/BadgeUnlock.js +50 -0
  29. package/src/ui/Badges.js +75 -17
  30. package/src/ui/Choice.js +33 -0
  31. package/src/ui/Companion.js +20 -35
  32. package/src/ui/Decks.js +49 -0
  33. package/src/ui/DieRoll.js +104 -0
  34. package/src/ui/Evolution.js +6 -5
  35. package/src/ui/Hatch.js +5 -4
  36. package/src/ui/Header.js +7 -6
  37. package/src/ui/Help.js +68 -0
  38. package/src/ui/Mascot.js +88 -38
  39. package/src/ui/Missed.js +6 -5
  40. package/src/ui/Preview.js +92 -17
  41. package/src/ui/Reset.js +72 -0
  42. package/src/ui/Settings.js +15 -11
  43. package/src/ui/Stats.js +10 -7
  44. package/src/ui/Summary.js +12 -5
  45. package/src/ui/TheOne.js +121 -0
  46. package/src/ui/icons.js +156 -24
  47. package/src/ui/kit.js +58 -1
  48. package/src/vacation.js +7 -2
  49. package/src/words.js +21 -14
  50. package/assets/sounds/badge.wav +0 -0
  51. package/src/ui/Tip.js +0 -25
package/README.md CHANGED
@@ -2,16 +2,25 @@
2
2
 
3
3
  A gamified language or definitions trainer for your terminal. It sits in a spare pane, challenges you every few minutes, and a small pixel dragon grows up as you keep your streak going.
4
4
 
5
+ ## Why Dracosh
6
+
7
+ Learning a language usually means another hour in the evening, after a full day at the computer. I spent plenty of those evenings myself, and I wanted something that fits into the working day instead.
8
+
9
+ The day is full of short waits: a build that takes a minute, tests running, an AI agent finishing a task for you. Dracosh turns those moments into practice. Instead of reaching for your phone, you answer a word or two, the dragon cheers, and you're back to work. A few minutes here and there add up, and your evenings stay yours.
10
+
11
+ It's made for people who live in a terminal or spend most of the day at a computer, and it's meant to be fun, not one more chore.
12
+
5
13
  ## Features
6
14
 
7
- - Words come from your Anki deck (read-only, through AnkiConnect), so your Anki cards and schedule stay untouched
8
- - Asks both ways: EN → PL and PL → EN
9
- - Forgiving answer checks: case and Polish diacritics don't matter, one typo is fine on longer words, and after a miss you see letter by letter where you went wrong
10
- - Leitner boxes, so the words you know come back less and less often
11
- - Daily goal, streaks (weekends and vacations don't break them) and 32 badges
15
+ - Your cards live in Dracosh's own library, organised in decks; no other app needs to be running
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
18
+ - 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
+ - Leitner boxes, so the cards you know come back less and less often; a card is only asked when it's due
20
+ - Daily goal, streaks (weekends and days off don't break them) and 36 badges (one of them a secret)
12
21
  - A pixel dragon that hatches from an egg, evolves over a year of streaks, blinks, and falls asleep if you ignore it
13
22
  - 8-bit sound effects, generated from code
14
- - A short grammar tip while you wait for the next word
23
+ - A short tip about Dracosh while you wait for the next card
15
24
 
16
25
  ## Install
17
26
 
@@ -21,42 +30,44 @@ You need Node 22 or newer.
21
30
  npm install -g dracosh
22
31
  ```
23
32
 
24
- Words are read from [Anki](https://apps.ankiweb.net/) with the [AnkiConnect](https://git.sr.ht/~foosoft/anki-connect) add-on, so Anki has to be running. If it's closed, Dracosh uses the last word list it saw.
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).
25
34
 
26
- Just want to look around? `dracosh --preview` shows every screen and animation on made-up data, no Anki needed.
35
+ Want a look first? `dracosh --preview` shows every screen and animation on made-up data.
27
36
 
28
37
  ## Usage
29
38
 
30
39
  ```bash
31
- dracosh --deck "My Deck" # quiz from this Anki deck (default: "English")
32
- dracosh --every 5m # a word every 5 minutes instead of 10, this run only
40
+ dracosh --deck "Polish" # quiz this deck, this run only (otherwise the one picked in /decks)
41
+ dracosh --every 5m # a card every 5 minutes instead of 10, this run only
33
42
  dracosh --no-sound
34
43
  dracosh --stats # print your progress and exit
44
+ dracosh --data # show where your cards, progress and backups are kept
35
45
  dracosh --preview
46
+ dracosh restore # list your backups; dracosh restore 2 brings one back
36
47
  ```
37
48
 
38
- Type the answer and press Enter. Press `/` for commands:
49
+ Type the answer and press Enter; don't know it? Press Enter with nothing typed to see the answer. Press `/` for commands:
39
50
 
40
51
  | Command | What it does |
41
52
  | --- | --- |
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 |
42
55
  | `/hint` | reveal one more letter |
43
56
  | `/correct` | your answer was right after all; it's accepted from now on |
44
- | `/skip` | skip this word |
45
- | `/settings` | interval, daily goal, sound, quiet hours, weekends, tips, direction |
57
+ | `/settings` | interval, daily goal, sound, quiet hours, weekends, tips, and a reset |
46
58
  | `/stats` | streak and a calendar of your month |
47
59
  | `/badges` | all badges and how to get them |
48
- | `/companion` | every form your dragon can take |
49
- | `/missed` | words you got wrong today |
50
- | `/tip` | a random grammar tip |
51
- | `/snooze 30m` | pause questions for a while |
52
- | `/vacation 7` | days off that keep your streak safe |
60
+ | `/companion` | your dragon, its element and the forms ahead |
61
+ | `/missed` | cards you got wrong today |
62
+ | `/pause 30m` | a break: `30m`, `2h`; or days off that keep your streak: `3d`, `24.12 2.01`; `off` ends it |
63
+ | `/help` | the keys, how cards come back, the streak |
53
64
  | `/quit` | quit (you'll get a short session summary) |
54
65
 
55
- They're slash commands because "skip" and "quit" are perfectly good English answers.
66
+ They're slash commands because "pause" and "quit" are perfectly good English answers.
56
67
 
57
68
  ## Your data
58
69
 
59
- Everything stays on your machine, in `~/.dracosh`. Progress is saved after every answer, so you can quit any time. To use Dracosh on two computers, put that folder somewhere synced and point `DRACOSH_HOME` at it.
70
+ Everything stays on your machine, in `~/.dracosh`; `dracosh --data` shows what's there. Progress is saved after every answer, so you can quit any time. One quiz runs at a time: a second window on the same data is refused, so the two can't overwrite each other's progress. The first start of each day also saves a backup of your cards, progress and settings to `~/.dracosh/backups` (the last 7 are kept); `dracosh restore` brings one back, and backs up what you have first, so a restore can be undone too. To start over, `/settings` → Reset clears your progress only (badges, streak, the dragon) or everything; a backup is made first. To use Dracosh on two computers, put that folder somewhere synced and point `DRACOSH_HOME` at it.
60
71
 
61
72
  Sounds currently play on macOS only.
62
73
 
@@ -72,6 +83,17 @@ npm test
72
83
 
73
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`).
74
85
 
86
+ ## What's next
87
+
88
+ 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
+
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.
92
+ - Import and export: Anki (plain-text exports and `.apkg` decks from AnkiWeb), CSV, JSON and pasted lists, and export back to Anki.
93
+ - Decks and cards in the app: browse, edit and delete with undo, plus a welcome flow for new users.
94
+ - Optional AI help for writing cards, with your own API key or a local model.
95
+ - Linux and Windows.
96
+
75
97
  ## License
76
98
 
77
99
  The code is licensed under [Apache 2.0](LICENSE), so feel free to use it, change it and build on it. The name "Dracosh" and the dragon mascot aren't covered by the license, so forks need their own name. See [NOTICE](NOTICE).
Binary file
Binary file
Binary file
Binary file