dracosh 0.1.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.
- package/README.md +49 -22
- package/assets/sounds/badge-1.wav +0 -0
- package/assets/sounds/badge-2.wav +0 -0
- package/assets/sounds/badge-3.wav +0 -0
- package/assets/sounds/badge-4.wav +0 -0
- package/locales/de.json +1046 -0
- package/locales/en.json +1029 -0
- package/locales/fr.json +1094 -0
- package/locales/pl.json +1117 -0
- package/locales/uk.json +1118 -0
- package/package.json +2 -2
- package/src/alerts.js +7 -4
- package/src/backup.js +96 -0
- package/src/cardline.js +71 -0
- package/src/cli.js +106 -38
- package/src/commands.js +15 -13
- package/src/demo.js +11 -0
- package/src/diff.js +13 -7
- package/src/i18n.js +68 -0
- package/src/judge.js +51 -12
- package/src/library.js +154 -0
- package/src/lock.js +64 -0
- package/src/manage.js +165 -0
- package/src/pause.js +22 -0
- package/src/progress.js +202 -93
- package/src/quiet.js +4 -3
- package/src/scheduler.js +39 -30
- package/src/session.js +181 -33
- package/src/settings.js +15 -13
- package/src/starter.js +47 -0
- package/src/store.js +58 -17
- package/src/tips.js +17 -25
- package/src/ui/AddCard.js +496 -0
- package/src/ui/AnswerInput.js +28 -13
- package/src/ui/App.js +360 -89
- package/src/ui/BadgeUnlock.js +51 -0
- package/src/ui/Badges.js +79 -20
- package/src/ui/Choice.js +38 -0
- package/src/ui/Companion.js +24 -39
- package/src/ui/Confetti.js +2 -2
- package/src/ui/Decks.js +99 -0
- package/src/ui/DieRoll.js +104 -0
- package/src/ui/Evolution.js +11 -10
- package/src/ui/Hatch.js +9 -7
- package/src/ui/Header.js +62 -19
- package/src/ui/Help.js +74 -0
- package/src/ui/Mascot.js +89 -40
- package/src/ui/Missed.js +15 -13
- package/src/ui/Preview.js +123 -29
- package/src/ui/Reset.js +71 -0
- package/src/ui/Settings.js +34 -23
- package/src/ui/Stats.js +28 -24
- package/src/ui/Summary.js +18 -10
- package/src/ui/TheOne.js +122 -0
- package/src/ui/icons.js +156 -25
- package/src/ui/kit.js +87 -2
- package/src/vacation.js +9 -3
- package/src/words.js +22 -14
- package/assets/sounds/badge.wav +0 -0
- package/data/tips.json +0 -1362
- package/src/ui/Tip.js +0 -25
package/README.md
CHANGED
|
@@ -2,16 +2,29 @@
|
|
|
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
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
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
|
+
- 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
|
|
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
|
|
22
|
+
- Leitner boxes, so the cards you know come back less and less often; a card is only asked when it's due
|
|
23
|
+
- Daily goal, streaks (weekends and days off don't break them) and 36 badges (one of them a secret)
|
|
12
24
|
- A pixel dragon that hatches from an egg, evolves over a year of streaks, blinks, and falls asleep if you ignore it
|
|
13
25
|
- 8-bit sound effects, generated from code
|
|
14
|
-
-
|
|
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
|
|
15
28
|
|
|
16
29
|
## Install
|
|
17
30
|
|
|
@@ -21,42 +34,44 @@ You need Node 22 or newer.
|
|
|
21
34
|
npm install -g dracosh
|
|
22
35
|
```
|
|
23
36
|
|
|
24
|
-
|
|
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).
|
|
25
38
|
|
|
26
|
-
|
|
39
|
+
Want a look first? `dracosh --preview` shows every screen and animation on made-up data.
|
|
27
40
|
|
|
28
41
|
## Usage
|
|
29
42
|
|
|
30
43
|
```bash
|
|
31
|
-
dracosh --deck "
|
|
32
|
-
dracosh --every 5m # a
|
|
44
|
+
dracosh --deck "Polish" # quiz this deck, this run only (otherwise the one picked in /decks)
|
|
45
|
+
dracosh --every 5m # a card every 5 minutes instead of 10, this run only
|
|
33
46
|
dracosh --no-sound
|
|
34
47
|
dracosh --stats # print your progress and exit
|
|
48
|
+
dracosh --data # show where your cards, progress and backups are kept
|
|
35
49
|
dracosh --preview
|
|
50
|
+
dracosh restore # list your backups; dracosh restore 2 brings one back
|
|
36
51
|
```
|
|
37
52
|
|
|
38
|
-
Type the answer and press Enter. 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:
|
|
39
54
|
|
|
40
55
|
| Command | What it does |
|
|
41
56
|
| --- | --- |
|
|
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 |
|
|
42
59
|
| `/hint` | reveal one more letter |
|
|
43
|
-
| `/correct` | your answer was right after all; it's accepted from now on |
|
|
44
|
-
| `/
|
|
45
|
-
| `/settings` | interval, daily goal, sound, quiet hours, weekends, tips, direction |
|
|
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 |
|
|
46
62
|
| `/stats` | streak and a calendar of your month |
|
|
47
63
|
| `/badges` | all badges and how to get them |
|
|
48
|
-
| `/companion` |
|
|
49
|
-
| `/missed` |
|
|
50
|
-
| `/
|
|
51
|
-
| `/
|
|
52
|
-
| `/vacation 7` | days off that keep your streak safe |
|
|
64
|
+
| `/companion` | your dragon, its element and the forms ahead |
|
|
65
|
+
| `/missed` | cards you got wrong today |
|
|
66
|
+
| `/pause 30m` | a break: `30m`, `2h`; or days off that keep your streak: `3d`, `24.12 2.01`; `off` ends it |
|
|
67
|
+
| `/help` | the keys, how cards come back, the streak |
|
|
53
68
|
| `/quit` | quit (you'll get a short session summary) |
|
|
54
69
|
|
|
55
|
-
They're slash commands because "
|
|
70
|
+
They're slash commands because "pause" and "quit" are perfectly good English answers.
|
|
56
71
|
|
|
57
72
|
## Your data
|
|
58
73
|
|
|
59
|
-
Everything stays on your machine, in `~/.dracosh
|
|
74
|
+
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
75
|
|
|
61
76
|
Sounds currently play on macOS only.
|
|
62
77
|
|
|
@@ -70,7 +85,19 @@ npm link # puts `dracosh` on your PATH
|
|
|
70
85
|
npm test
|
|
71
86
|
```
|
|
72
87
|
|
|
73
|
-
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
|
|
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`).
|
|
91
|
+
|
|
92
|
+
## What's next
|
|
93
|
+
|
|
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:
|
|
95
|
+
|
|
96
|
+
- More languages for your decks: answer checking that forgives a missing accent in European languages and Cyrillic (other scripts are checked exactly).
|
|
97
|
+
- Import and export: Anki (plain-text exports and `.apkg` decks from AnkiWeb), CSV, JSON and pasted lists, and export back to Anki.
|
|
98
|
+
- Decks and cards in the app: browse, edit and delete with undo, plus a welcome flow for new users.
|
|
99
|
+
- Optional AI help for writing cards, with your own API key or a local model.
|
|
100
|
+
- Linux and Windows.
|
|
74
101
|
|
|
75
102
|
## License
|
|
76
103
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|