typing-genius-content 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Typing Genius
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,221 @@
1
+ # Typing Genius Content 📝
2
+
3
+ [![npm version](https://img.shields.io/npm/v/typing-genius-content.svg)](https://www.npmjs.com/package/typing-genius-content)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ Open-source typing test content library with quotes and words in multiple languages. Perfect for typing practice applications, speed tests, and educational tools.
7
+
8
+ ## 🌍 Supported Languages
9
+
10
+ | Language | Code | Quotes | Words | Status |
11
+ |----------|------|--------|-------|--------|
12
+ | English | `en` | ✅ 5,000+ | ✅ 158,000+ | Active |
13
+ | Kyrgyz | `kg` | ✅ 4,900+ | ✅ 8,500+ | Active |
14
+ | Russian | `ru` | ❌ | ❌ | **Needs Contributors!** |
15
+ | Kazakh | `kz` | ❌ | ❌ | **Needs Contributors!** |
16
+ | Uzbek | `uz` | ❌ | ❌ | **Needs Contributors!** |
17
+
18
+ **Want to add content for your language?** See [CONTRIBUTING.md](CONTRIBUTING.md)!
19
+
20
+ ## 📦 Installation
21
+
22
+ ```bash
23
+ npm install typing-genius-content
24
+ # or
25
+ yarn add typing-genius-content
26
+ # or
27
+ pnpm add typing-genius-content
28
+ ```
29
+
30
+ ## 🚀 Usage
31
+
32
+ ### Basic Usage
33
+
34
+ ```typescript
35
+ import {
36
+ getQuotes,
37
+ getWords,
38
+ getRandomQuote,
39
+ getRandomWords,
40
+ getSupportedLanguageCodes,
41
+ } from 'typing-genius-content';
42
+
43
+ // Get all English quotes
44
+ const englishQuotes = getQuotes('en');
45
+ console.log(englishQuotes.length); // 5000+
46
+
47
+ // Get Kyrgyz hard words
48
+ const hardWordsKg = getWords('kg', 'hard');
49
+ console.log(hardWordsKg.length); // 4000+
50
+
51
+ // Get a random quote
52
+ const randomQuote = getRandomQuote('en');
53
+ console.log(randomQuote?.text);
54
+
55
+ // Get 10 random easy words
56
+ const practiceWords = getRandomWords('en', 'easy', { count: 10 });
57
+ console.log(practiceWords); // ['the', 'and', 'for', ...]
58
+
59
+ // List all supported languages
60
+ const languages = getSupportedLanguageCodes();
61
+ console.log(languages); // ['en', 'kg', 'ru', 'kz', 'uz']
62
+ ```
63
+
64
+ ### Filtering Content
65
+
66
+ ```typescript
67
+ import { getFilteredQuotes, getFilteredWords } from 'typing-genius-content';
68
+
69
+ // Get short quotes (< 100 characters)
70
+ const shortQuotes = getFilteredQuotes('en', { maxLength: 100 });
71
+
72
+ // Get medium-length words (5-7 letters)
73
+ const mediumWords = getFilteredWords('en', 'medium', {
74
+ minLength: 5,
75
+ maxLength: 7,
76
+ });
77
+ ```
78
+
79
+ ### Words by Length
80
+
81
+ ```typescript
82
+ import { getWordsByLength } from 'typing-genius-content';
83
+
84
+ // Get all 5-letter words (great for Wordle practice!)
85
+ const fiveLetterWords = getWordsByLength('en', 5);
86
+ console.log(fiveLetterWords.length); // 7000+
87
+ ```
88
+
89
+ ### Language Metadata
90
+
91
+ ```typescript
92
+ import {
93
+ getLanguageMeta,
94
+ getLanguagesWithQuotes,
95
+ getContentStats,
96
+ } from 'typing-genius-content';
97
+
98
+ // Get language info
99
+ const kyrgyzMeta = getLanguageMeta('kg');
100
+ console.log(kyrgyzMeta);
101
+ // {
102
+ // code: 'kg',
103
+ // name: 'Кыргызча',
104
+ // nameEnglish: 'Kyrgyz',
105
+ // keyboard: 'kyrgyz',
106
+ // ...
107
+ // }
108
+
109
+ // Get statistics
110
+ const stats = getContentStats('en');
111
+ console.log(stats);
112
+ // {
113
+ // quotes: 5000,
114
+ // words: { easy: 2672, medium: 8691, hard: 147026, total: 158389 },
115
+ // byLength: [{ length: 3, count: 577 }, ...]
116
+ // }
117
+ ```
118
+
119
+ ## 📁 Content Structure
120
+
121
+ ```
122
+ content/
123
+ ├── _meta.json # Global metadata
124
+ ├── en/ # English
125
+ │ ├── _meta.json # Language metadata
126
+ │ ├── quotes.json # Quotes for typing
127
+ │ └── words/
128
+ │ ├── easy.json # Easy words (3-4 letters)
129
+ │ ├── medium.json # Medium words (5-6 letters)
130
+ │ ├── hard.json # Hard words (7+ letters)
131
+ │ └── by-length/
132
+ │ ├── 3-letter.json
133
+ │ ├── 4-letter.json
134
+ │ └── ...
135
+ ├── kg/ # Kyrgyz
136
+ │ ├── _meta.json
137
+ │ ├── quotes.json
138
+ │ └── words/
139
+ │ ├── easy.json
140
+ │ ├── medium.json
141
+ │ └── hard.json
142
+ └── ...
143
+ ```
144
+
145
+ ## 🤝 Contributing
146
+
147
+ We welcome contributions! Adding content is easy:
148
+
149
+ 1. **Fork this repository**
150
+ 2. **Add or update content files** (see format below)
151
+ 3. **Submit a pull request**
152
+
153
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
154
+
155
+ ### Quick Content Formats
156
+
157
+ **Quotes** (`content/{lang}/quotes.json`):
158
+ ```json
159
+ [
160
+ {
161
+ "text": "Your quote text here.",
162
+ "author": "Author Name",
163
+ "source": "Optional Source"
164
+ }
165
+ ]
166
+ ```
167
+
168
+ **Words** (`content/{lang}/words/easy.json`):
169
+ ```json
170
+ {
171
+ "language": "en",
172
+ "difficulty": "easy",
173
+ "words": ["word1", "word2", "word3"]
174
+ }
175
+ ```
176
+
177
+ ## 📊 API Reference
178
+
179
+ ### Quote Functions
180
+
181
+ | Function | Description |
182
+ |----------|-------------|
183
+ | `getQuotes(lang)` | Get all quotes for a language |
184
+ | `getFilteredQuotes(lang, options)` | Get quotes with filters |
185
+ | `getRandomQuote(lang)` | Get a single random quote |
186
+ | `getRandomQuotes(lang, options)` | Get multiple random quotes |
187
+
188
+ ### Word Functions
189
+
190
+ | Function | Description |
191
+ |----------|-------------|
192
+ | `getWords(lang, difficulty)` | Get words by difficulty |
193
+ | `getAllWords(lang)` | Get all words combined |
194
+ | `getWordsByLength(lang, length)` | Get words by exact length |
195
+ | `getFilteredWords(lang, difficulty, options)` | Get words with filters |
196
+ | `getRandomWords(lang, difficulty, options)` | Get random words |
197
+
198
+ ### Language Functions
199
+
200
+ | Function | Description |
201
+ |----------|-------------|
202
+ | `getAllLanguages()` | Get all language metadata |
203
+ | `getLanguageMeta(code)` | Get metadata for a language |
204
+ | `getSupportedLanguageCodes()` | Get list of language codes |
205
+ | `getLanguagesWithQuotes()` | Get languages that have quotes |
206
+ | `getLanguagesWithWords()` | Get languages that have words |
207
+ | `getContentStats(lang)` | Get content statistics |
208
+
209
+ ## 📜 License
210
+
211
+ MIT License - see [LICENSE](LICENSE) for details.
212
+
213
+ ## 🙏 Acknowledgments
214
+
215
+ - All the amazing contributors who add content
216
+ - [Typing Genius](https://typinggenius.com) for the initial content
217
+ - The open-source community
218
+
219
+ ---
220
+
221
+ **Made with ❤️ for the typing community**
@@ -0,0 +1,14 @@
1
+ {
2
+ "code": "global",
3
+ "name": "Typing Genius Content",
4
+ "version": "1.0.0",
5
+ "lastUpdated": "2026-01-10",
6
+ "languages": [
7
+ "en",
8
+ "kg",
9
+ "ru",
10
+ "kz",
11
+ "uz"
12
+ ],
13
+ "description": "Open source typing test content library for multiple languages"
14
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "code": "en",
3
+ "name": "English",
4
+ "nameEnglish": "English",
5
+ "keyboard": "qwerty",
6
+ "contributors": [],
7
+ "availableContent": {
8
+ "quotes": true,
9
+ "words": {
10
+ "easy": true,
11
+ "medium": true,
12
+ "hard": true,
13
+ "byLength": [
14
+ 3,
15
+ 4,
16
+ 5,
17
+ 6,
18
+ 7,
19
+ 8,
20
+ 9
21
+ ]
22
+ }
23
+ }
24
+ }