igntui 0.0.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 (51) hide show
  1. igntui-0.0.0/PKG-INFO +425 -0
  2. igntui-0.0.0/README.md +372 -0
  3. igntui-0.0.0/pyproject.toml +159 -0
  4. igntui-0.0.0/src/igntui/__init__.py +57 -0
  5. igntui-0.0.0/src/igntui/__main__.py +10 -0
  6. igntui-0.0.0/src/igntui/app.py +37 -0
  7. igntui-0.0.0/src/igntui/cli/__init__.py +31 -0
  8. igntui-0.0.0/src/igntui/cli/base.py +104 -0
  9. igntui-0.0.0/src/igntui/cli/commands/__init__.py +17 -0
  10. igntui-0.0.0/src/igntui/cli/commands/cache_cmd.py +95 -0
  11. igntui-0.0.0/src/igntui/cli/commands/generate_cmd.py +85 -0
  12. igntui-0.0.0/src/igntui/cli/commands/list_cmd.py +66 -0
  13. igntui-0.0.0/src/igntui/cli/commands/test_cmd.py +64 -0
  14. igntui-0.0.0/src/igntui/cli/commands/tui_cmd.py +34 -0
  15. igntui-0.0.0/src/igntui/cli/parser.py +162 -0
  16. igntui-0.0.0/src/igntui/cli/setup.py +71 -0
  17. igntui-0.0.0/src/igntui/core/__init__.py +8 -0
  18. igntui-0.0.0/src/igntui/core/api/__init__.py +16 -0
  19. igntui-0.0.0/src/igntui/core/api/client.py +222 -0
  20. igntui-0.0.0/src/igntui/core/api/errors.py +29 -0
  21. igntui-0.0.0/src/igntui/core/api/rate_limiter.py +30 -0
  22. igntui-0.0.0/src/igntui/core/api/request_handler.py +124 -0
  23. igntui-0.0.0/src/igntui/core/api/response.py +16 -0
  24. igntui-0.0.0/src/igntui/core/cache.py +284 -0
  25. igntui-0.0.0/src/igntui/core/config.py +174 -0
  26. igntui-0.0.0/src/igntui/core/search.py +354 -0
  27. igntui-0.0.0/src/igntui/main.py +74 -0
  28. igntui-0.0.0/src/igntui/tui/__init__.py +22 -0
  29. igntui-0.0.0/src/igntui/tui/actions.py +254 -0
  30. igntui-0.0.0/src/igntui/tui/app.py +246 -0
  31. igntui-0.0.0/src/igntui/tui/curses_setup.py +88 -0
  32. igntui-0.0.0/src/igntui/tui/event_handler.py +310 -0
  33. igntui-0.0.0/src/igntui/tui/lifecycle.py +102 -0
  34. igntui-0.0.0/src/igntui/tui/renderer.py +108 -0
  35. igntui-0.0.0/src/igntui/tui/state.py +77 -0
  36. igntui-0.0.0/src/igntui/ui/__init__.py +33 -0
  37. igntui-0.0.0/src/igntui/ui/components/__init__.py +31 -0
  38. igntui-0.0.0/src/igntui/ui/components/base_dialog.py +75 -0
  39. igntui-0.0.0/src/igntui/ui/components/base_panel.py +85 -0
  40. igntui-0.0.0/src/igntui/ui/components/confirm_dialog.py +100 -0
  41. igntui-0.0.0/src/igntui/ui/components/content_panel.py +77 -0
  42. igntui-0.0.0/src/igntui/ui/components/export_dialog.py +139 -0
  43. igntui-0.0.0/src/igntui/ui/components/help_dialog.py +161 -0
  44. igntui-0.0.0/src/igntui/ui/components/save_dialog.py +109 -0
  45. igntui-0.0.0/src/igntui/ui/components/search_panel.py +52 -0
  46. igntui-0.0.0/src/igntui/ui/components/selected_panel.py +107 -0
  47. igntui-0.0.0/src/igntui/ui/components/splash.py +236 -0
  48. igntui-0.0.0/src/igntui/ui/components/status_bar.py +78 -0
  49. igntui-0.0.0/src/igntui/ui/components/templates_panel.py +153 -0
  50. igntui-0.0.0/src/igntui/utils/__init__.py +19 -0
  51. igntui-0.0.0/src/igntui/utils/logging.py +288 -0
igntui-0.0.0/PKG-INFO ADDED
@@ -0,0 +1,425 @@
1
+ Metadata-Version: 2.4
2
+ Name: igntui
3
+ Version: 0.0.0
4
+ Summary: Interactive Terminal User Interface for GitIgnore template generation
5
+ Keywords: gitignore,tui,terminal,git,templates,cli
6
+ Author: Mohammad Abu Mattar
7
+ Author-email: Mohammad Abu Mattar <mohammad.khaled@outlook.com>
8
+ License-Expression: GPL-3.0-or-later
9
+ Classifier: Development Status :: 4 - Beta
10
+ Classifier: Environment :: Console :: Curses
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: Software Development :: Version Control :: Git
22
+ Classifier: Topic :: Terminals
23
+ Classifier: Topic :: Utilities
24
+ Requires-Dist: urllib3>=2.0.0
25
+ Requires-Dist: windows-curses>=2.4.1 ; sys_platform == 'win32'
26
+ Requires-Dist: pyfiglet>=1.0.2
27
+ Requires-Dist: pytest>=7.0.0 ; extra == 'dev'
28
+ Requires-Dist: pytest-cov>=4.0.0 ; extra == 'dev'
29
+ Requires-Dist: pytest-mock>=3.10.0 ; extra == 'dev'
30
+ Requires-Dist: black>=23.0.0 ; extra == 'dev'
31
+ Requires-Dist: hatch>=1.8.0 ; extra == 'dev'
32
+ Requires-Dist: isort>=5.12.0 ; extra == 'dev'
33
+ Requires-Dist: mypy>=1.0.0 ; extra == 'dev'
34
+ Requires-Dist: ruff>=0.1.0 ; extra == 'dev'
35
+ Requires-Dist: flake8>=6.0.0 ; extra == 'dev'
36
+ Requires-Dist: pre-commit>=3.0.0 ; extra == 'dev'
37
+ Requires-Dist: pytest>=7.0.0 ; extra == 'test'
38
+ Requires-Dist: pytest-cov>=4.0.0 ; extra == 'test'
39
+ Requires-Dist: pytest-mock>=3.10.0 ; extra == 'test'
40
+ Requires-Dist: responses>=0.23.0 ; extra == 'test'
41
+ Requires-Dist: windows-curses>=2.4.1 ; sys_platform == 'win32' and extra == 'windows'
42
+ Maintainer: Mohammad Abu Mattar
43
+ Maintainer-email: Mohammad Abu Mattar <mohammad.khaled@outlook.com>
44
+ Requires-Python: >=3.9
45
+ Project-URL: Documentation, https://github.com/MKAbuMattar/igntui/blob/main/Module/Utility/GitIgnore/igntui/README.md
46
+ Project-URL: Homepage, https://github.com/MKAbuMattar/igntui
47
+ Project-URL: Issues, https://github.com/MKAbuMattar/igntui/issues
48
+ Project-URL: Repository, https://github.com/MKAbuMattar/igntui
49
+ Provides-Extra: dev
50
+ Provides-Extra: test
51
+ Provides-Extra: windows
52
+ Description-Content-Type: text/markdown
53
+
54
+ <div align="center">
55
+
56
+ # igntui
57
+
58
+ <div align="center">
59
+ <a href="https://github.com/MKAbuMattar/igntui" target="_blank" rel="noreferrer">
60
+ <img src="https://img.shields.io/badge/github-%23181717.svg?style=for-the-badge&logo=github&logoColor=white" alt="GitHub Repository"/>
61
+ </a>
62
+
63
+ <a href="https://github.com/MKAbuMattar/igntui/releases" target="_blank" rel="noreferrer">
64
+ <img alt="GitHub Release" src="https://img.shields.io/github/v/release/MKAbuMattar/igntui?color=%232563eb&label=Latest%20Release&style=for-the-badge&logo=github" />
65
+ </a>
66
+
67
+ <a href="https://pypi.org/project/igntui/" target="_blank" rel="noreferrer">
68
+ <img src="https://img.shields.io/pypi/v/igntui?style=for-the-badge&logo=pypi&logoColor=white&color=2563eb&label=PyPI" alt="PyPI Version"/>
69
+ </a>
70
+
71
+ <a href="https://pypi.org/project/igntui/" target="_blank" rel="noreferrer">
72
+ <img src="https://img.shields.io/pypi/pyversions/igntui?style=for-the-badge&logo=python&logoColor=white&color=2563eb&label=Python" alt="Python Versions"/>
73
+ </a>
74
+
75
+ <a href="/LICENSE" target="_blank" rel="noreferrer">
76
+ <img alt="GPL-3.0 License" src="https://img.shields.io/github/license/MKAbuMattar/igntui?color=%232563eb&style=for-the-badge&label=License">
77
+ </a>
78
+
79
+ <a href="https://github.com/MKAbuMattar/igntui/stargazers" target="_blank" rel="noreferrer">
80
+ <img alt="GitHub Stars" src="https://img.shields.io/github/stars/MKAbuMattar/igntui?color=%232563eb&label=Stars&style=for-the-badge&logo=github">
81
+ </a>
82
+
83
+ <a href="https://pypi.org/project/igntui/" target="_blank" rel="noreferrer">
84
+ <img alt="PyPI Downloads" src="https://img.shields.io/pypi/dm/igntui?color=%232563eb&style=for-the-badge&logo=pypi&label=Downloads">
85
+ </a>
86
+
87
+ <a href="https://github.com/MKAbuMattar/igntui/issues" target="_blank" rel="noreferrer">
88
+ <img alt="GitHub Issues" src="https://img.shields.io/github/issues/MKAbuMattar/igntui?color=%232563eb&style=for-the-badge&logo=github&label=Issues">
89
+ </a>
90
+ </div>
91
+
92
+ <br/>
93
+
94
+ [🌐 Website](https://mkabumattar.com/) • [📦 PyPI](https://pypi.org/project/igntui/) • [🚀 Quick Start](#-installation) • [💬 Support](https://github.com/MKAbuMattar/igntui/issues)
95
+
96
+ <br/>
97
+
98
+ ---
99
+
100
+ > A powerful Terminal User Interface (TUI) and CLI for generating `.gitignore` files from [gitignore.io](https://www.toptal.com/developers/gitignore) templates.
101
+
102
+ </div>
103
+
104
+ ## ✨ Features
105
+
106
+ ### 🎨 Interactive TUI Mode
107
+
108
+ - **Smart Search** - Fuzzy, exact, and regex search modes (F1/F2/F3)
109
+ - **Multi-Template Selection** - Select and combine multiple templates
110
+ - **Live Preview** - See generated `.gitignore` content in real-time
111
+ - **Intuitive Navigation** - Tab between panels, arrow keys, vim-style shortcuts
112
+ - **Beautiful Interface** - Animated splash screen with pyfiglet ASCII art
113
+
114
+ ### ⚡ Performance
115
+
116
+ - **Intelligent Caching** - Local template caching for instant access
117
+ - **Async Loading** - Non-blocking template loading and generation
118
+ - **Rate Limiting** - Respects API limits automatically
119
+
120
+ ### 💾 Export & Save
121
+
122
+ - **Save to File** - Save generated `.gitignore` with custom paths
123
+ - **Export Templates** - Export selected templates as JSON
124
+ - **Overwrite Protection** - Confirmation dialogs for existing files
125
+
126
+ ### 🛠️ CLI Mode
127
+
128
+ - **Quick Generation** - Generate `.gitignore` from command line
129
+ - **List Templates** - Browse 571+ available templates
130
+ - **Test Connection** - Verify API connectivity
131
+ - **Cache Management** - Clear and manage local cache
132
+
133
+ ## 📦 Installation
134
+
135
+ ### Using pip (Standard)
136
+
137
+ ```bash
138
+ pip install igntui
139
+ ```
140
+
141
+ ### Using pipx (Isolated)
142
+
143
+ [pipx](https://pipx.pypa.io/) installs the package in an isolated environment:
144
+
145
+ ```bash
146
+ pipx install igntui
147
+ ```
148
+
149
+ ### From source
150
+
151
+ ```bash
152
+ git clone https://github.com/MKAbuMattar/igntui.git
153
+ cd igntui
154
+ pip install -e .
155
+ ```
156
+
157
+ ### Windows Requirements
158
+
159
+ On Windows, you'll need the `windows-curses` package:
160
+
161
+ ```bash
162
+ pip install windows-curses
163
+ ```
164
+
165
+ ## 🚀 Quick Start
166
+
167
+ ### Launch TUI (Interactive Mode)
168
+
169
+ ```bash
170
+ igntui
171
+ ```
172
+
173
+ or
174
+
175
+ ```bash
176
+ python -m igntui
177
+ ```
178
+
179
+ ### CLI Commands
180
+
181
+ #### Generate `.gitignore`
182
+
183
+ ```bash
184
+ # Single template
185
+ igntui generate python
186
+
187
+ # Multiple templates
188
+ igntui generate python node visualstudiocode
189
+
190
+ # Save to file
191
+ igntui generate python --output .gitignore
192
+ ```
193
+
194
+ #### List Available Templates
195
+
196
+ ```bash
197
+ # List all templates
198
+ igntui list
199
+
200
+ # Search templates
201
+ igntui list --search python
202
+
203
+ # Show count only
204
+ igntui list --count
205
+ ```
206
+
207
+ #### Test API Connection
208
+
209
+ ```bash
210
+ igntui test
211
+ ```
212
+
213
+ #### Cache Management
214
+
215
+ ```bash
216
+ # Show cache info
217
+ igntui cache --info
218
+
219
+ # Clear cache
220
+ igntui cache --clear
221
+ ```
222
+
223
+ #### Show Version
224
+
225
+ ```bash
226
+ igntui --version
227
+ # Output: igntui/1.0.0 Python/3.13.0 Windows/11
228
+ ```
229
+
230
+ ## 🎮 TUI Usage
231
+
232
+ ### Keyboard Shortcuts
233
+
234
+ #### Navigation
235
+
236
+ - `Tab` / `Shift+Tab` - Navigate between panels
237
+ - `↑` / `↓` - Move selection up/down
238
+ - `PgUp` / `PgDn` - Page up/down
239
+ - `Home` / `End` - Jump to top/bottom
240
+
241
+ #### Search Modes
242
+
243
+ - `F1` - Fuzzy search (default)
244
+ - `F2` - Exact search
245
+ - `F3` - Regex search
246
+
247
+ #### Template Management
248
+
249
+ - `Space` - Select/deselect template
250
+ - `a` - Select all templates
251
+ - `x` - Clear all selections
252
+ - `Enter` - Generate `.gitignore` content
253
+
254
+ #### Actions
255
+
256
+ - `s` - Save generated `.gitignore` to file
257
+ - `e` - Export selected templates as JSON
258
+ - `F5` - Refresh template list
259
+ - `h` / `?` - Show help dialog
260
+ - `i` - Show app info
261
+ - `q` / `Esc` - Quit application
262
+
263
+ ### Panel Layout
264
+
265
+ ```
266
+ ┌─────────────────────────────┬──────────────────────────────────┐
267
+ │ Search Panel │ Generated Content Panel │
268
+ │ (Filter templates) │ (Preview .gitignore) │
269
+ ├─────────────────────────────┤ │
270
+ │ Available Templates │ │
271
+ │ (571+ templates) │ │
272
+ │ │ │
273
+ │ • Select with Space │ │
274
+ │ • Multi-select support │ │
275
+ │ • Smart search │ │
276
+ ├─────────────────────────────┴──────────────────────────────────┤
277
+ │ Selected Templates (Bottom Panel) │
278
+ │ • Shows your current selection │
279
+ │ • Remove with Space │
280
+ └────────────────────────────────────────────────────────────────┘
281
+ │ Status Bar │
282
+ │ • Keyboard shortcuts • Current mode • Status messages │
283
+ └────────────────────────────────────────────────────────────────┘
284
+ ```
285
+
286
+ ## 🎯 Use Cases
287
+
288
+ ### For Developers
289
+
290
+ ```bash
291
+ # Python project
292
+ igntui generate python venv
293
+
294
+ # Node.js project
295
+ igntui generate node npm yarn
296
+
297
+ # Full-stack project
298
+ igntui generate python node react visualstudiocode
299
+
300
+ # Unity game development
301
+ igntui generate unity visualstudio windows
302
+ ```
303
+
304
+ ### For Teams
305
+
306
+ ```bash
307
+ # Export team's template selection
308
+ igntui # Select templates in TUI, press 'e' to export
309
+
310
+ # Share the JSON file with team
311
+ # Others can import and use the same templates
312
+ ```
313
+
314
+ ## ⚙️ Configuration
315
+
316
+ Configuration file location: `~/.igntui.json`
317
+
318
+ ### Default Configuration
319
+
320
+ ```json
321
+ {
322
+ "api": {
323
+ "base_url": "https://www.toptal.com/developers/gitignore/api",
324
+ "timeout": 10,
325
+ "cache_ttl": 3600,
326
+ "retry_attempts": 3
327
+ },
328
+ "ui": {
329
+ "theme": "default",
330
+ "mouse_support": true,
331
+ "animation_speed": 150
332
+ },
333
+ "behavior": {
334
+ "fuzzy_search_threshold": 0.6,
335
+ "max_recent_templates": 10
336
+ }
337
+ }
338
+ ```
339
+
340
+ ## 🧪 Development
341
+
342
+ ### Setup Development Environment
343
+
344
+ ```bash
345
+ # Clone repository
346
+ git clone https://github.com/MKAbuMattar/igntui.git
347
+ cd igntui
348
+
349
+ # Install dependencies
350
+ pip install -e ".[dev]"
351
+
352
+ # Run tests
353
+ pytest
354
+
355
+ # Format code
356
+ black src/igntui
357
+ isort src/igntui
358
+
359
+ # Type checking
360
+ mypy src/igntui
361
+ ```
362
+
363
+ ### Running Tests
364
+
365
+ ```bash
366
+ # All tests
367
+ pytest
368
+
369
+ # With coverage
370
+ pytest --cov=igntui
371
+
372
+ # Specific test file
373
+ pytest tests/test_api.py
374
+ ```
375
+
376
+ ## 🤝 Contributing
377
+
378
+ Contributions are welcome! Please feel free to submit a Pull Request.
379
+
380
+ 1. Fork the repository
381
+ 2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
382
+ 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
383
+ 4. Push to the branch (`git push origin feature/AmazingFeature`)
384
+ 5. Open a Pull Request
385
+
386
+ ## 📝 License
387
+
388
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
389
+
390
+ ## 👨‍💻 Author
391
+
392
+ **Mohammad Abu Mattar**
393
+
394
+ - GitHub: [@MKAbuMattar](https://github.com/MKAbuMattar)
395
+ - Website: [MKAbuMattar.com](https://mkabumattar.com)
396
+ - Email: info@mkabumattar.com
397
+
398
+ ## 🙏 Acknowledgments
399
+
400
+ - [gitignore.io](https://www.toptal.com/developers/gitignore) - Template source
401
+ - [pyfiglet](https://github.com/pwaller/pyfiglet) - ASCII art generation
402
+ - [Python curses](https://docs.python.org/3/library/curses.html) - Terminal UI framework
403
+
404
+ ## 📊 Statistics
405
+
406
+ - **571+ Templates** - Comprehensive template library
407
+ - **Smart Caching** - Reduces API calls by 90%
408
+ - **3 Search Modes** - Fuzzy, exact, and regex
409
+ - **Multi-select** - Combine unlimited templates
410
+ - **Cross-platform** - Windows, macOS, Linux
411
+
412
+ ## 🔗 Links
413
+
414
+ - **Repository**: https://github.com/MKAbuMattar/igntui
415
+ - **Issue Tracker**: https://github.com/MKAbuMattar/igntui/issues
416
+ - **PyPI Package**: https://pypi.org/project/igntui/
417
+ - **Documentation**: https://github.com/MKAbuMattar/igntui/wiki (coming soon)
418
+
419
+ ---
420
+
421
+ <div align="center">
422
+ <strong>Made with ❤️ by Mohammad Abu Mattar</strong>
423
+ <br>
424
+ <sub>Give it a ⭐ if you like it!</sub>
425
+ </div>