k-hunter 0.3.0__tar.gz

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. k_hunter-0.3.0/PKG-INFO +133 -0
  2. k_hunter-0.3.0/README.md +107 -0
  3. k_hunter-0.3.0/pyproject.toml +47 -0
  4. k_hunter-0.3.0/src/k_hunter/__init__.py +0 -0
  5. k_hunter-0.3.0/src/k_hunter/const.py +106 -0
  6. k_hunter-0.3.0/src/k_hunter/content/__init__.py +0 -0
  7. k_hunter-0.3.0/src/k_hunter/content/datasets/natural_language/en/common/common_1-1000 +1000 -0
  8. k_hunter-0.3.0/src/k_hunter/content/datasets/natural_language/en/common/common_1001-2000 +1000 -0
  9. k_hunter-0.3.0/src/k_hunter/content/datasets/natural_language/en/common/common_2001-3000 +1000 -0
  10. k_hunter-0.3.0/src/k_hunter/content/datasets/natural_language/en/common/common_3001-4000 +1000 -0
  11. k_hunter-0.3.0/src/k_hunter/content/datasets/natural_language/en/common/common_4001-5000 +1000 -0
  12. k_hunter-0.3.0/src/k_hunter/content/datasets/natural_language/en/common/common_5001-6000 +1000 -0
  13. k_hunter-0.3.0/src/k_hunter/content/datasets/natural_language/en/common/common_6001-7000 +1000 -0
  14. k_hunter-0.3.0/src/k_hunter/content/datasets/natural_language/en/common/common_7001-8000 +1000 -0
  15. k_hunter-0.3.0/src/k_hunter/content/datasets/natural_language/en/common/common_8001-9000 +1000 -0
  16. k_hunter-0.3.0/src/k_hunter/content/datasets/natural_language/en/common/common_9001-10000 +1000 -0
  17. k_hunter-0.3.0/src/k_hunter/content/datasets/natural_language/en/simple_text/simple +20 -0
  18. k_hunter-0.3.0/src/k_hunter/content/datasets/programming_language/py/common/built-in_functions +67 -0
  19. k_hunter-0.3.0/src/k_hunter/content/datasets/programming_language/py/common/built-in_modules +181 -0
  20. k_hunter-0.3.0/src/k_hunter/content/datasets/programming_language/py/common/collections_methods +74 -0
  21. k_hunter-0.3.0/src/k_hunter/content/datasets/programming_language/py/common/dunder_methods +171 -0
  22. k_hunter-0.3.0/src/k_hunter/content/datasets/programming_language/py/common/exceptions +33 -0
  23. k_hunter-0.3.0/src/k_hunter/content/datasets/programming_language/py/common/file_methods +16 -0
  24. k_hunter-0.3.0/src/k_hunter/content/datasets/programming_language/py/common/keywords +37 -0
  25. k_hunter-0.3.0/src/k_hunter/content/datasets/programming_language/py/common/math_methods +49 -0
  26. k_hunter-0.3.0/src/k_hunter/content/datasets/programming_language/py/common/symbols +58 -0
  27. k_hunter-0.3.0/src/k_hunter/content/schemas.py +28 -0
  28. k_hunter-0.3.0/src/k_hunter/content/service.py +146 -0
  29. k_hunter-0.3.0/src/k_hunter/main.py +66 -0
  30. k_hunter-0.3.0/src/k_hunter/profile/__init__.py +0 -0
  31. k_hunter-0.3.0/src/k_hunter/profile/schemas.py +16 -0
  32. k_hunter-0.3.0/src/k_hunter/profile/service.py +162 -0
  33. k_hunter-0.3.0/src/k_hunter/profile/storage.py +125 -0
  34. k_hunter-0.3.0/src/k_hunter/profile/widgets.py +108 -0
  35. k_hunter-0.3.0/src/k_hunter/settings/__init__.py +0 -0
  36. k_hunter-0.3.0/src/k_hunter/settings/commands.py +34 -0
  37. k_hunter-0.3.0/src/k_hunter/settings/messages.py +7 -0
  38. k_hunter-0.3.0/src/k_hunter/settings/schemas.py +147 -0
  39. k_hunter-0.3.0/src/k_hunter/settings/service.py +52 -0
  40. k_hunter-0.3.0/src/k_hunter/settings/storage.py +25 -0
  41. k_hunter-0.3.0/src/k_hunter/settings/widgets/__init__.py +0 -0
  42. k_hunter-0.3.0/src/k_hunter/settings/widgets/app_settings.py +49 -0
  43. k_hunter-0.3.0/src/k_hunter/settings/widgets/components.py +375 -0
  44. k_hunter-0.3.0/src/k_hunter/settings/widgets/content_settings.py +431 -0
  45. k_hunter-0.3.0/src/k_hunter/settings/widgets/settings_container.py +72 -0
  46. k_hunter-0.3.0/src/k_hunter/settings/widgets/settings_sidebar.py +15 -0
  47. k_hunter-0.3.0/src/k_hunter/settings/widgets/typer_settings.py +253 -0
  48. k_hunter-0.3.0/src/k_hunter/style.tcss +166 -0
  49. k_hunter-0.3.0/src/k_hunter/typer/__init__.py +0 -0
  50. k_hunter-0.3.0/src/k_hunter/typer/base_engine.py +116 -0
  51. k_hunter-0.3.0/src/k_hunter/typer/schemas.py +25 -0
  52. k_hunter-0.3.0/src/k_hunter/typer/simulator.py +39 -0
  53. k_hunter-0.3.0/src/k_hunter/typer/single_line_engine.py +109 -0
  54. k_hunter-0.3.0/src/k_hunter/typer/standard_engine.py +131 -0
  55. k_hunter-0.3.0/src/k_hunter/typer/widgets.py +182 -0
@@ -0,0 +1,133 @@
1
+ Metadata-Version: 2.4
2
+ Name: k-hunter
3
+ Version: 0.3.0
4
+ Summary: Keyboard typing trainer app
5
+ Keywords: typing,trainer,terminal,tui,textual
6
+ Author: Rivkat Karimov
7
+ Author-email: Rivkat Karimov <redscorpion32.rk@gmail.com>
8
+ License-Expression: MIT
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Education
18
+ Classifier: Topic :: Terminals
19
+ Requires-Dist: platformdirs>=4.5.1
20
+ Requires-Dist: textual>=7.5.0
21
+ Requires-Python: >=3.10
22
+ Project-URL: Homepage, https://github.com/spaghetti-backend/k-hunter
23
+ Project-URL: Repository, https://github.com/spaghetti-backend/k-hunter
24
+ Project-URL: Issues, https://github.com/spaghetti-backend/k-hunter/issues
25
+ Description-Content-Type: text/markdown
26
+
27
+ ![Logo](https://raw.githubusercontent.com/spaghetti-backend/keyhunter/main/docs/logo.webp)
28
+
29
+ # KeyHunter
30
+
31
+ A simple terminal-based typing trainer built with [Textual].
32
+ Minimalist interface, flexible configuration, and progress tracking — right in
33
+ your terminal.
34
+
35
+ ---
36
+
37
+ ## Project Status
38
+
39
+ The project is currently under development.
40
+ Features are gradually expanding and may change over time.
41
+
42
+ ---
43
+
44
+ ## Features
45
+
46
+ <details>
47
+ <summary><strong>Training Modes</strong></summary>
48
+
49
+ Available modes:
50
+
51
+ - Standard multi-line mode
52
+ - Scrolling line mode
53
+
54
+ ![StandardEngine](https://raw.githubusercontent.com/spaghetti-backend/keyhunter/main/docs/typer.webp)
55
+
56
+ </details>
57
+
58
+ <details>
59
+ <summary><strong>Flexible Configuration</strong></summary>
60
+
61
+ - Content type selection
62
+ - Adjustable word count
63
+ - Customizable typing area
64
+
65
+ ![TyperSettings](https://raw.githubusercontent.com/spaghetti-backend/keyhunter/main/docs/typing_settings.webp)
66
+ ![ContentSettings](https://raw.githubusercontent.com/spaghetti-backend/keyhunter/main/docs/content_settings.webp)
67
+
68
+ </details>
69
+
70
+ <details>
71
+ <summary><strong>Statistics & Profile</strong></summary>
72
+
73
+ View training results and track your progress.
74
+
75
+ ![Profile](https://raw.githubusercontent.com/spaghetti-backend/keyhunter/main/docs/profile.webp)
76
+
77
+ </details>
78
+
79
+ ---
80
+
81
+ ## Requirements
82
+
83
+ - Python 3.10 or higher
84
+ - Any modern terminal
85
+
86
+ ---
87
+
88
+ ## Installation
89
+
90
+ It is recommended to install CLI applications in an isolated environment.
91
+
92
+ ### Using uv
93
+
94
+ ```bash
95
+ uv tool install keyhunter
96
+ ```
97
+
98
+ ### Using pipx
99
+
100
+ ```bash
101
+ pipx install keyhunter
102
+ ```
103
+
104
+ ### Using pip
105
+
106
+ ```bash
107
+ pip install keyhunter
108
+ ```
109
+
110
+ Using [pipx] or [uv] is recommended for CLI tools.
111
+
112
+ ## Usage
113
+
114
+ Run the application with:
115
+
116
+ ```bash
117
+ keyhunter
118
+ ```
119
+
120
+ Hotkeys are displayed in the bottom panel of the interface.
121
+
122
+ ## Roadmap
123
+
124
+ - [ ] Improved navigation
125
+ - [ ] Advanced statistics
126
+ - [ ] Additional languages
127
+ - [ ] Code snippet training mode
128
+
129
+ <!-- external Links -->
130
+ [Textual]: https://textual.textualize.io
131
+ [uv]: https://docs.astral.sh/uv
132
+ [pipx]: https://github.com/pypa/pipx
133
+
@@ -0,0 +1,107 @@
1
+ ![Logo](https://raw.githubusercontent.com/spaghetti-backend/keyhunter/main/docs/logo.webp)
2
+
3
+ # KeyHunter
4
+
5
+ A simple terminal-based typing trainer built with [Textual].
6
+ Minimalist interface, flexible configuration, and progress tracking — right in
7
+ your terminal.
8
+
9
+ ---
10
+
11
+ ## Project Status
12
+
13
+ The project is currently under development.
14
+ Features are gradually expanding and may change over time.
15
+
16
+ ---
17
+
18
+ ## Features
19
+
20
+ <details>
21
+ <summary><strong>Training Modes</strong></summary>
22
+
23
+ Available modes:
24
+
25
+ - Standard multi-line mode
26
+ - Scrolling line mode
27
+
28
+ ![StandardEngine](https://raw.githubusercontent.com/spaghetti-backend/keyhunter/main/docs/typer.webp)
29
+
30
+ </details>
31
+
32
+ <details>
33
+ <summary><strong>Flexible Configuration</strong></summary>
34
+
35
+ - Content type selection
36
+ - Adjustable word count
37
+ - Customizable typing area
38
+
39
+ ![TyperSettings](https://raw.githubusercontent.com/spaghetti-backend/keyhunter/main/docs/typing_settings.webp)
40
+ ![ContentSettings](https://raw.githubusercontent.com/spaghetti-backend/keyhunter/main/docs/content_settings.webp)
41
+
42
+ </details>
43
+
44
+ <details>
45
+ <summary><strong>Statistics & Profile</strong></summary>
46
+
47
+ View training results and track your progress.
48
+
49
+ ![Profile](https://raw.githubusercontent.com/spaghetti-backend/keyhunter/main/docs/profile.webp)
50
+
51
+ </details>
52
+
53
+ ---
54
+
55
+ ## Requirements
56
+
57
+ - Python 3.10 or higher
58
+ - Any modern terminal
59
+
60
+ ---
61
+
62
+ ## Installation
63
+
64
+ It is recommended to install CLI applications in an isolated environment.
65
+
66
+ ### Using uv
67
+
68
+ ```bash
69
+ uv tool install keyhunter
70
+ ```
71
+
72
+ ### Using pipx
73
+
74
+ ```bash
75
+ pipx install keyhunter
76
+ ```
77
+
78
+ ### Using pip
79
+
80
+ ```bash
81
+ pip install keyhunter
82
+ ```
83
+
84
+ Using [pipx] or [uv] is recommended for CLI tools.
85
+
86
+ ## Usage
87
+
88
+ Run the application with:
89
+
90
+ ```bash
91
+ keyhunter
92
+ ```
93
+
94
+ Hotkeys are displayed in the bottom panel of the interface.
95
+
96
+ ## Roadmap
97
+
98
+ - [ ] Improved navigation
99
+ - [ ] Advanced statistics
100
+ - [ ] Additional languages
101
+ - [ ] Code snippet training mode
102
+
103
+ <!-- external Links -->
104
+ [Textual]: https://textual.textualize.io
105
+ [uv]: https://docs.astral.sh/uv
106
+ [pipx]: https://github.com/pypa/pipx
107
+
@@ -0,0 +1,47 @@
1
+ [project]
2
+ name = "k-hunter"
3
+ version = "0.3.0"
4
+ description = "Keyboard typing trainer app "
5
+
6
+ requires-python = ">=3.10"
7
+ dependencies = [
8
+ "platformdirs>=4.5.1",
9
+ "textual>=7.5.0",
10
+ ]
11
+
12
+ authors = [
13
+ { name = "Rivkat Karimov", email = "redscorpion32.rk@gmail.com" }
14
+ ]
15
+ license = "MIT"
16
+ readme = "README.md"
17
+ keywords = ["typing", "trainer", "terminal", "tui", "textual"]
18
+
19
+ classifiers = [
20
+ "Development Status :: 3 - Alpha",
21
+ "Environment :: Console",
22
+ "Intended Audience :: Developers",
23
+ "License :: OSI Approved :: MIT License",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.10",
26
+ "Programming Language :: Python :: 3.11",
27
+ "Programming Language :: Python :: 3.12",
28
+ "Topic :: Education",
29
+ "Topic :: Terminals",
30
+ ]
31
+
32
+ [project.urls]
33
+ Homepage = "https://github.com/spaghetti-backend/k-hunter"
34
+ Repository = "https://github.com/spaghetti-backend/k-hunter"
35
+ Issues = "https://github.com/spaghetti-backend/k-hunter/issues"
36
+
37
+ [project.scripts]
38
+ k-hunter = "k_hunter.main:main"
39
+
40
+ [build-system]
41
+ requires = ["uv_build>=0.9.29,<0.10"]
42
+ build-backend = "uv_build"
43
+
44
+ [dependency-groups]
45
+ dev = [
46
+ "textual-dev>=1.8.0",
47
+ ]
File without changes
@@ -0,0 +1,106 @@
1
+ from typing import Final
2
+
3
+
4
+ #
5
+ # Settings
6
+ #
7
+ APP_NAME: Final = "k_hunter"
8
+ TYPING_SESSIONS_STORAGE_NAME: Final = "stat.db"
9
+ SETTINGS_STORAGE_NAME: Final = "settings.json"
10
+ DATASETS_STORAGE_PATH: Final = "k_hunter.content.datasets"
11
+ NATURAL_LANGUAGE_KEY: Final = "natural_language"
12
+ PROGRAMMING_LANGUAGE_KEY: Final = "programming_language"
13
+ SIMPLE_FILENAME: Final = "simple_text/simple"
14
+ COMMON_DIR: Final = "common"
15
+
16
+ THEME: Final = "nord"
17
+
18
+ SLE_WIDTH: Final = 70
19
+ SLE_MIN_WIDTH: Final = 50
20
+ SLE_MAX_WIDTH: Final = 120
21
+ SLE_WIDTH_STEPS: Final = 8
22
+ SLE_HEIGHT: Final = 1
23
+ SLE_MIN_HEIGHT: Final = 1
24
+ SLE_MAX_HEIGHT: Final = 1
25
+ SLE_START_FROM_CENTER: Final = True
26
+
27
+ SE_WIDTH: Final = 70
28
+ SE_MIN_WIDTH: Final = 50
29
+ SE_MAX_WIDTH: Final = 120
30
+ SE_WIDTH_STEPS: Final = 8
31
+ SE_HEIGHT: Final = 5
32
+ SE_MIN_HEIGHT: Final = 3
33
+ SE_MAX_HEIGHT: Final = 9
34
+ SE_HEIGHT_STEPS: Final = 4
35
+
36
+ WORDS_COUNT: Final = 50
37
+ MIN_WORDS_COUNT: Final = 20
38
+ MAX_WORDS_COUNT: Final = 100
39
+
40
+ UPPER_PERCENT: Final = 0
41
+ MIN_UPPER_PERCENT: Final = 0
42
+ MAX_UPPER_PERCENT: Final = 30
43
+
44
+ KEYWORDS_COUNT: Final = 50
45
+ MIN_KEYWORDS_COUNT: Final = 20
46
+ MAX_KEYWORDS_COUNT: Final = 100
47
+ #
48
+ # Field keys
49
+ #
50
+ THEME_KEY: Final = "theme"
51
+ LANGUAGE_KEY: Final = "language"
52
+ TYPER_KEY: Final = "typer"
53
+ CONTENT_KEY: Final = "content"
54
+
55
+ ENGINE_KEY: Final = "engine"
56
+ BORDER_KEY: Final = "border"
57
+ SLE_KEY: Final = "single_line_engine"
58
+ SE_KEY: Final = "standard_engine"
59
+
60
+ WIDTH_KEY: Final = "width"
61
+ MIN_WIDTH_KEY: Final = "min_width"
62
+ MAX_WIDTH_KEY: Final = "max_width"
63
+
64
+ HEIGHT_KEY: Final = "height"
65
+ MIN_HEIGHT_KEY: Final = "min_height"
66
+ MAX_HEIGHT_KEY: Final = "max_height"
67
+
68
+ SLE_START_FROM_CENTER_KEY: Final = "start_from_center"
69
+
70
+ CONTENT_TYPE_KEY: Final = "content_type"
71
+ CATEGORY_KEY: Final = "category"
72
+ CONTENT_FILES_KEY: Final = "content_files"
73
+ COMMON_WORDS_KEY: Final = "common_words"
74
+ WORDS_COUNT_KEY: Final = "words_count"
75
+ WORDS_MIN_COUNT_KEY: Final = "min_words_count"
76
+ WORDS_MAX_COUNT_KEY: Final = "max_words_count"
77
+ UPPER_PERCENT_KEY: Final = "upper_percent"
78
+ MIN_UPPER_PERCENT_KEY: Final = "min_upper_percent"
79
+ MAX_UPPER_PERCENT_KEY: Final = "max_upper_percent"
80
+ KEYWORDS_COUNT_KEY: Final = "keywords_count"
81
+ KEYWORDS_MIN_COUNT_KEY: Final = "min_keywords_count"
82
+ KEYWORDS_MAX_COUNT_KEY: Final = "max_keywords_count"
83
+ # CONTENT_LENGHT_KEY: Final = "content_lenght" #
84
+ CODE_SAMPLE_TYPE_KEY: Final = "sample_type"
85
+
86
+ CHAR_KEY: Final = "char"
87
+ TOTAL_KEY: Final = "total"
88
+ CORRECT_KEY: Final = "correct"
89
+ TOTAL_CHARS_KEY: Final = "total_chars"
90
+ CORRECT_CHARS_KEY: Final = "correct_chars"
91
+ ELAPSED_TIME_MS_KEY: Final = "elapsed_time_ms"
92
+ ACCURACY_KEY: Final = "accuracy"
93
+ SPEED_KEY: Final = "speed"
94
+ TYPING_SESSION_ID_KEY: Final = "typing_session_id"
95
+
96
+ #
97
+ # Keystrokes
98
+ #
99
+ MILLISECONDS_MULTIPLIER: Final = 1000
100
+ PERCENT_SCALE_2DP: Final = 10_000
101
+ FLOAT_TO_INT_SCALE_2DP: Final = 100
102
+
103
+ #
104
+ # Typer
105
+ #
106
+ BORDER_EXPANSION: Final = 2
File without changes