caffee 2.0.2__py3-none-any.whl

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.
@@ -0,0 +1,309 @@
1
+ Metadata-Version: 2.4
2
+ Name: caffee
3
+ Version: 2.0.2
4
+ Summary: A simple CUI editor for Caffee.
5
+ Project-URL: Homepage, https://github.com/iamthe000/CAFFEE_Editor
6
+ Author-email: iamthe000 <your_email@example.com>
7
+ License: MIT
8
+ License-File: LICENSE
9
+ Keywords: cli,cui,editor,terminal
10
+ Classifier: Development Status :: 5 - Production/Stable
11
+ Classifier: Environment :: Console
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Text Editors
16
+ Requires-Python: >=3.8
17
+ Description-Content-Type: text/markdown
18
+
19
+ # β˜• CAFFEE Command Line Text Editor
20
+
21
+ <a href="ja-README.md">πŸ‡―πŸ‡΅ ζ—₯本θͺžη‰ˆREADME</a>γ€€
22
+ <a href="https://github.com/iamthe000/CAFFEE_Editor_Japanese_UI_plugin_Official.git">Official Japanese UI Plugin</a>γ€€
23
+ <a href="Nuitka_Step.md">Nuitka Compilation Guide</a>γ€€
24
+ <a href="Setup_PATH.md">PATH Setup Guide</a>
25
+
26
+ **CAFFEE** is a lightweight terminal text editor written in Python using the curses library. It aims to provide a simple, extensible, and efficient editing experience directly in your terminal with modern IDE-like features.
27
+
28
+ ---
29
+
30
+ ## ✨ What's New in v2.0.0
31
+
32
+ ### 🎨 **Modern UI Enhancements**
33
+ - **Interactive Start Screen** - Welcome screen with quick access to settings, plugins, and file explorer
34
+ - **Tab Bar System** - Multi-file editing with visual tab management
35
+ - **Split Panel Layout** - Toggle file explorer and integrated terminal panels
36
+ - **Enhanced Visual Design** - Improved color schemes and status indicators
37
+
38
+ ### πŸš€ **Productivity Features**
39
+ - **Integrated File Explorer** (`Ctrl+F`) - Browse and open files without leaving the editor
40
+ - **Built-in Terminal** (`Ctrl+T`) - Execute commands and run code directly from the editor
41
+ - **Plugin Manager** (`Ctrl+P` from start screen) - Enable/disable plugins with visual interface
42
+ - **Build & Run** (`Ctrl+B`) - Automatic compilation and execution for Python, JavaScript, Go, C/C++, Rust, and shell scripts
43
+ - **Smart Horizontal Scrolling** - Nano-style smooth scrolling for long lines
44
+ - **Full-Width Character Support** - Proper handling of Japanese and other wide characters
45
+
46
+ ### 🎨 **Syntax Highlighting**
47
+ - Python, JavaScript, C/C++, Go, Rust, HTML, Markdown support
48
+ - Customizable color schemes via settings
49
+
50
+ ### πŸ“‘ **Multi-Tab Editing**
51
+ - `Ctrl+S` - Create new tab or return to start screen
52
+ - `Ctrl+L` - Switch to next tab
53
+ - `Ctrl+X` - Close current tab (prompts if unsaved)
54
+
55
+ ---
56
+
57
+ ## πŸ’‘ Core Features
58
+
59
+ - **Small and focused** editing experience
60
+ - **Undo/Redo** history with configurable limit
61
+ - **Mark-based selection** and clipboard operations (cut/copy/paste)
62
+ - **Line operations** (delete, comment/uncomment, goto)
63
+ - **Atomic file saving** with automatic backup creation
64
+ - **Plugin system** for extensibility
65
+ - **JSON configuration** for customization
66
+
67
+ ---
68
+
69
+ ## πŸ’» Installation
70
+
71
+ ### Requirements
72
+ - **Python 3.6+**
73
+ - Unix-like terminal (Linux, macOS, ChromeOS Linux shell)
74
+ - `curses` library (usually included with Python)
75
+
76
+ ### Quick Start
77
+
78
+ ```bash
79
+ # Download or clone the repository
80
+ git clone <repository-url>
81
+ cd CAFFEE_Editor
82
+
83
+ # Run directly
84
+ python3 caffee.py
85
+
86
+ # Or open a specific file
87
+ python3 caffee.py /path/to/file.py
88
+ ```
89
+
90
+ ### Optional: Speed Up with Nuitka
91
+
92
+ For significantly faster startup and execution, compile with Nuitka (Debian/Ubuntu):
93
+
94
+ ```bash
95
+ python3 -m venv myenv
96
+ source myenv/bin/activate
97
+ pip install nuitka
98
+ sudo apt install patchelf
99
+ python -m nuitka --standalone caffee.py
100
+ cd caffee.dist
101
+ ./caffee.bin
102
+ ```
103
+
104
+ See [Nuitka_Step.md](Nuitka_Step.md) for detailed instructions and troubleshooting.
105
+
106
+ ---
107
+
108
+ ## ⌨️ Keybindings
109
+
110
+ ### File Operations
111
+ | Key | Action |
112
+ |-----|--------|
113
+ | `Ctrl+O` | Save current file |
114
+ | `Ctrl+X` | Close current tab / Exit |
115
+ | `Ctrl+S` | New tab / Start screen |
116
+ | `Ctrl+L` | Switch to next tab |
117
+
118
+ ### Editing
119
+ | Key | Action |
120
+ |-----|--------|
121
+ | `Ctrl+Z` | Undo |
122
+ | `Ctrl+R` | Redo |
123
+ | `Ctrl+K` | Cut (line or selection) |
124
+ | `Ctrl+U` | Paste |
125
+ | `Ctrl+C` | Copy selection |
126
+ | `Ctrl+Y` | Delete current line |
127
+ | `Ctrl+/` | Toggle comment |
128
+
129
+ ### Navigation & Search
130
+ | Key | Action |
131
+ |-----|--------|
132
+ | `Ctrl+W` | Search (with regex support) |
133
+ | `Ctrl+G` | Go to line number |
134
+ | `Ctrl+E` | Move to end of line |
135
+ | `Ctrl+A` | Select all / Clear selection |
136
+ | `Ctrl+6` | Set/Unset mark (selection start) |
137
+ | Arrow Keys | Navigate cursor |
138
+ | PageUp/Down | Scroll by page |
139
+
140
+ ### Panels & Tools
141
+ | Key | Action |
142
+ |-----|--------|
143
+ | `Ctrl+F` | Toggle file explorer |
144
+ | `Ctrl+T` | Toggle integrated terminal |
145
+ | `Ctrl+B` | Build/Run current file |
146
+ | `Ctrl+P` | Plugin manager (from start screen) |
147
+ | `Esc` | Return to editor from panels |
148
+
149
+ ---
150
+
151
+ ## βš™οΈ Configuration
152
+
153
+ User settings are stored in `~/.caffee_setting/setting.json`.
154
+
155
+ ### Example Configuration
156
+
157
+ ```json
158
+ {
159
+ "tab_width": 4,
160
+ "history_limit": 50,
161
+ "use_soft_tabs": true,
162
+ "backup_subdir": "backup",
163
+ "backup_count": 5,
164
+
165
+ "show_splash": true,
166
+ "splash_duration": 500,
167
+ "start_screen_mode": true,
168
+
169
+ "explorer_width": 35,
170
+ "terminal_height": 10,
171
+ "show_explorer_default": false,
172
+ "show_terminal_default": false,
173
+
174
+ "colors": {
175
+ "header_text": "BLACK",
176
+ "header_bg": "WHITE",
177
+ "error_text": "WHITE",
178
+ "error_bg": "RED",
179
+ "linenum_text": "CYAN",
180
+ "linenum_bg": "DEFAULT",
181
+ "selection_text": "BLACK",
182
+ "selection_bg": "CYAN",
183
+ "keyword": "YELLOW",
184
+ "string": "GREEN",
185
+ "comment": "MAGENTA",
186
+ "number": "BLUE",
187
+ "ui_border": "WHITE",
188
+ "tab_active_bg": "BLUE"
189
+ }
190
+ }
191
+ ```
192
+
193
+ ### Configuration Options
194
+
195
+ - **Editor Settings**: `tab_width`, `history_limit`, `use_soft_tabs`
196
+ - **Backup**: `backup_subdir`, `backup_count` (automatic versioned backups)
197
+ - **Startup**: `show_splash`, `splash_duration`, `start_screen_mode`
198
+ - **Layout**: `explorer_width`, `terminal_height`, panel visibility defaults
199
+ - **Colors**: Comprehensive color customization for all UI elements
200
+
201
+ ---
202
+
203
+ ## 🧩 Plugin System
204
+
205
+ Plugins are Python files in `~/.caffee_setting/plugins/`.
206
+
207
+ ### Plugin API
208
+
209
+ Plugins can expose an `init(editor)` function with access to:
210
+
211
+ - **Cursor & Buffer Access**: `get_cursor_position()`, `get_line_content()`, `get_buffer_lines()`
212
+ - **Editing Operations**: `insert_text_at_cursor()`, `delete_range()`, `replace_text()`
213
+ - **Selection**: `get_selection_text()`, `get_selection_range()`
214
+ - **Key Binding**: `bind_key(key_code, function)`
215
+ - **UI Feedback**: `set_status_message()`, `redraw_screen()`
216
+ - **User Input**: `prompt_user(message, default="")`
217
+
218
+ ### Example Plugin
219
+
220
+ ```python
221
+ def init(editor):
222
+ def uppercase_selection(ed):
223
+ text = ed.get_selection_text()
224
+ if text:
225
+ lines = [line.upper() for line in text]
226
+ # Process selection...
227
+ ed.set_status_message("Converted to uppercase!")
228
+ else:
229
+ ed.set_status_message("No selection")
230
+
231
+ # Bind to Ctrl+Shift+U (if terminal supports)
232
+ editor.bind_key(21, uppercase_selection)
233
+ ```
234
+
235
+ ### Plugin Manager
236
+
237
+ Access via `Ctrl+P` from the start screen:
238
+ - View all installed plugins
239
+ - Enable/disable plugins with spacebar
240
+ - Changes take effect after editor restart
241
+
242
+ Disabled plugins are moved to `~/.caffee_setting/plugins/disabled/`.
243
+
244
+ ---
245
+
246
+ ## πŸš€ Built-in Commands
247
+
248
+ CAFFEE automatically detects file types and provides build/run commands:
249
+
250
+ | File Type | Command |
251
+ |-----------|---------|
252
+ | `.py` | `python3 <file>` |
253
+ | `.js` | `node <file>` |
254
+ | `.go` | `go run <file>` |
255
+ | `.c` | `gcc <file> -o <output> && ./<output>` |
256
+ | `.cpp`, `.cc` | `g++ <file> -o <output> && ./<output>` |
257
+ | `.sh` | `bash <file>` |
258
+ | `.rs` | `rustc <file> && ./<output>` |
259
+
260
+ Press `Ctrl+B` to save and run the current file. Output appears in the integrated terminal.
261
+
262
+ ---
263
+
264
+ ## πŸ› οΈ Troubleshooting
265
+
266
+ ### Display Issues
267
+ - **Japanese text garbled?** See [Nuitka_Step.md](Nuitka_Step.md) for locale configuration
268
+ - **Colors not working?** Ensure your terminal supports 256 colors
269
+ - **Curses errors?** Verify Python's curses library is available on your platform
270
+
271
+ ### File Operations
272
+ - **File changed on disk**: CAFFEE detects external changes but won't auto-reload to prevent data loss
273
+ - **Backup files**: Located in `~/.caffee_setting/backup/` with timestamps
274
+
275
+ ### Terminal Integration
276
+ - **Terminal not working?** The integrated terminal requires `pty` support (Unix-like systems only)
277
+ - **Build command fails?** Ensure required compilers/interpreters are in your PATH
278
+
279
+ ---
280
+
281
+ ## 🀝 Contributing
282
+
283
+ Contributions are welcome! Please:
284
+
285
+ 1. Fork the repository
286
+ 2. Create a feature branch
287
+ 3. Make focused, well-documented changes
288
+ 4. Test in multiple terminal environments
289
+ 5. Submit a pull request with clear descriptions
290
+
291
+ ### Development Guidelines
292
+ - Maintain compatibility with Python 3.6+
293
+ - Respect terminal resizing behavior
294
+ - Keep the codebase simple and readable
295
+ - Follow existing code style
296
+
297
+ ---
298
+
299
+ ## πŸ“„ License
300
+
301
+ MIT License - See [LICENSE](LICENSE) file for details.
302
+
303
+ ---
304
+
305
+ ## πŸ™ Acknowledgments
306
+
307
+ Built with Python's `curses` library. Inspired by nano, vim, and modern code editors.
308
+
309
+ **CAFFEE** - *Brew your code in the terminal* β˜•
@@ -0,0 +1,6 @@
1
+ caffee.py,sha256=IISmNoxIyxera7IIfnWTev1hWcJOSuJEU5DPDNass4w,87917
2
+ caffee-2.0.2.dist-info/METADATA,sha256=KKHGnbf2qGvNka7jooBAyRDb712bY-Kofq1IEvFqLPc,9063
3
+ caffee-2.0.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
4
+ caffee-2.0.2.dist-info/entry_points.txt,sha256=2GRccxIAQj6QsNrlkAozHggwp5OmBn2pTQSCvsp78oQ,39
5
+ caffee-2.0.2.dist-info/licenses/LICENSE,sha256=e-pbDEpyY_hBdTnJrrtrvUObWYETh-BDyyqSmCsuw2A,1060
6
+ caffee-2.0.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.28.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ caffee = caffee:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 iam
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.