notispf 1.0.0__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,229 @@
1
+ Metadata-Version: 2.4
2
+ Name: notispf
3
+ Version: 1.0.0
4
+ Summary: A terminal text editor inspired by the ISPF editor from z/OS
5
+ Author-email: mrthock <m64357@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/mrthock/notispf
8
+ Project-URL: Repository, https://github.com/mrthock/notispf
9
+ Project-URL: Bug Tracker, https://github.com/mrthock/notispf/issues
10
+ Keywords: editor,ispf,terminal,tui,mainframe,zos
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: POSIX :: Linux
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Text Editors
21
+ Requires-Python: >=3.11
22
+ Description-Content-Type: text/markdown
23
+
24
+ # notispf
25
+
26
+ A terminal text editor for Linux and macOS inspired by the ISPF editor from z/OS mainframes.
27
+ Runs in your terminal like vim or nano, with the prefix command area that ISPF users know and love.
28
+
29
+ ## Installation
30
+
31
+ ### Download a binary (no Python required)
32
+
33
+ Go to the [Releases page](https://github.com/mrthock/notispf/releases) and download the binary for your platform:
34
+
35
+ | Platform | File |
36
+ |----------|------|
37
+ | Linux | `notispf-linux` |
38
+ | macOS | `notispf-macos` |
39
+ | Windows | `notispf-windows.exe` |
40
+
41
+ **Linux / macOS:**
42
+ ```bash
43
+ chmod +x notispf-linux # or notispf-macos
44
+ ./notispf-linux myfile.txt
45
+ ```
46
+
47
+ Optionally move it somewhere on your PATH:
48
+ ```bash
49
+ mv notispf-linux ~/.local/bin/notispf
50
+ ```
51
+
52
+ **macOS note:** macOS will warn that the binary is from an unidentified developer. To clear the warning:
53
+ ```bash
54
+ xattr -d com.apple.quarantine ./notispf-macos
55
+ ```
56
+ Then run it normally.
57
+
58
+ ### Via pip
59
+
60
+ ```bash
61
+ pip install notispf
62
+ ```
63
+
64
+ ### From source
65
+
66
+ ```bash
67
+ git clone https://github.com/mrthock/notispf
68
+ cd notispf
69
+ pip install -e .
70
+ ```
71
+
72
+ ## Usage
73
+
74
+ ```bash
75
+ notispf <file>
76
+ ```
77
+
78
+ ## Screen Layout
79
+
80
+ ```
81
+ notispf filename.txt Line 1/42
82
+ 000001|This is the first line of your file
83
+ 000002|Second line here
84
+ 000003|Third line
85
+ |~
86
+ |~
87
+ Type prefix command, Enter to execute, Esc to cancel
88
+ ```
89
+
90
+ - **Status bar** (top) — filename, modified flag `[+]`, current line/total
91
+ - **Prefix column** (left, 6 chars) — shows line numbers; type commands here
92
+ - **Text area** (right of `|`) — edit your file
93
+ - **Message/command line** (bottom) — status messages and command input
94
+
95
+ ## Navigation
96
+
97
+ | Key | Action |
98
+ |-----|--------|
99
+ | Arrow keys | Move cursor |
100
+ | Page Up / Page Down | Scroll |
101
+ | Home / Ctrl+A | Beginning of line |
102
+ | End / Ctrl+E | End of line |
103
+
104
+ ## Switching Between Text and Prefix Area
105
+
106
+ | Key | Action |
107
+ |-----|--------|
108
+ | Tab | text(N) → prefix(N+1) |
109
+ | Tab | prefix(N) → text(N) |
110
+ | Shift+Tab | text(N) → prefix(N) |
111
+ | Shift+Tab | prefix(N) → text(N-1) |
112
+
113
+ ## Prefix Commands
114
+
115
+ Type a command into the prefix column, then press **Enter** to execute.
116
+ You can stage commands on multiple lines before pressing Enter — they all execute at once.
117
+
118
+ ### Single-Line Commands
119
+
120
+ | Command | Action |
121
+ |---------|--------|
122
+ | `D` | Delete line |
123
+ | `Dn` | Delete n lines (e.g. `D5` deletes 5) |
124
+ | `I` | Insert blank line after |
125
+ | `In` | Insert n blank lines |
126
+ | `R` | Repeat line |
127
+ | `Rn` | Repeat line n times |
128
+ | `C` | Copy line to clipboard |
129
+ | `Cn` | Copy n lines to clipboard |
130
+ | `M` | Move line (cut to clipboard) |
131
+ | `Mn` | Move n lines |
132
+ | `A` | Paste clipboard **after** this line |
133
+ | `B` | Paste clipboard **before** this line |
134
+
135
+ ### Block Commands
136
+
137
+ Type the command on the **first** line of the block, then again on the **last** line.
138
+
139
+ | Command | Action |
140
+ |---------|--------|
141
+ | `DD` | Delete block |
142
+ | `CC` | Copy block to clipboard |
143
+ | `MM` | Move block (cut to clipboard) |
144
+ | `RR` | Repeat block (insert a copy below) |
145
+
146
+ Use `A` or `B` on a third line to place the clipboard after copying or moving.
147
+
148
+ **Example — move lines 3–6 to after line 10:**
149
+ 1. Tab to line 3 prefix → type `MM`
150
+ 2. Arrow down to line 6 → type `MM`
151
+ 3. Arrow down to line 10 → type `A`
152
+ 4. Press Enter
153
+
154
+ ### Prefix Mode Controls
155
+
156
+ | Key | Action |
157
+ |-----|--------|
158
+ | Enter | Execute all staged prefix commands |
159
+ | Escape | Cancel all staged commands and exit prefix mode |
160
+ | ↑ / ↓ | Move between lines (keeps staged commands) |
161
+
162
+ ## Command Line
163
+
164
+ Press **`=`** or **`F6`** to open the command line, then type a command and press Enter.
165
+
166
+ ### File Commands
167
+
168
+ | Command | Action |
169
+ |---------|--------|
170
+ | `SAVE` | Save file |
171
+ | `FILE` | Save and exit |
172
+ | `CANCEL` or `QUIT` | Exit without saving |
173
+
174
+ ### Find and Change
175
+
176
+ ```
177
+ FIND "text"
178
+ CHANGE "old" "new"
179
+ CHANGE "old" "new" ALL
180
+ CHANGE "old" "new" ALL .labelA .labelB
181
+ ```
182
+
183
+ - `FIND` — locate next occurrence (case-insensitive by default)
184
+ - `CHANGE` — replace next occurrence
185
+ - `CHANGE ... ALL` — replace all occurrences in file
186
+ - `CHANGE ... ALL .A .B` — replace all occurrences between labeled lines
187
+
188
+ ### Labels
189
+
190
+ Type `.A`, `.B` etc. in the prefix column to assign a label to a line.
191
+ Labels are used to define ranges for `CHANGE ... ALL .A .B`.
192
+
193
+ ## Function Keys
194
+
195
+ | Key | Action |
196
+ |-----|--------|
197
+ | F3 | Save and exit |
198
+ | F5 | Save without exiting |
199
+ | F6 | Open command line |
200
+ | F12 | Exit without saving |
201
+
202
+ ## Contributing
203
+
204
+ notispf is designed to be easy to extend. Adding a new prefix command takes three steps:
205
+
206
+ 1. Write a handler function in `notispf/commands/line_cmds.py`:
207
+
208
+ ```python
209
+ def cmd_trim(buffer: Buffer, line_idx: int, count: int) -> EditorResult:
210
+ for i in range(line_idx, min(line_idx + count, len(buffer))):
211
+ buffer.replace_line(i, buffer.lines[i].text.rstrip())
212
+ return EditorResult(success=True)
213
+ ```
214
+
215
+ 2. Register it in the same file's `register()` function:
216
+
217
+ ```python
218
+ registry.register_line_cmd(CommandSpec("T", cmd_trim, description="Trim trailing whitespace"))
219
+ ```
220
+
221
+ 3. Add tests in `tests/test_line_cmds.py`.
222
+
223
+ That's it — no changes to the prefix state machine, display, or app controller needed.
224
+
225
+ See [ARCHITECTURE.md](ARCHITECTURE.md) for a deeper overview of the codebase.
226
+
227
+ ## License
228
+
229
+ MIT
@@ -0,0 +1,17 @@
1
+ notispf/__init__.py,sha256=J-j-u0itpEFT6irdmWmixQqYMadNl1X91TxUmoiLHMI,22
2
+ notispf/__main__.py,sha256=TolmJ7HzJmAP5u-feY-QepjpWSPALuMgIGOJo_dJBOc,219
3
+ notispf/app.py,sha256=1Uh57eRp25WV6WFFDq2iw1C96bBe3hczR6w92ixuzZg,24110
4
+ notispf/buffer.py,sha256=nGuKkhugf46CgNl7CLrJT36P_rvDccCiKpoaLBSCgTU,6279
5
+ notispf/display.py,sha256=k28ictzmn0t-Yd20xCHmXNCHyC80jrxiA-rZUJa16Dg,17233
6
+ notispf/find_change.py,sha256=NYn4v5NhEG19mo4j5tMtYNYzT7HOvR9Z6QdLY1BF1Dc,7913
7
+ notispf/prefix.py,sha256=f40L5EnFPmngVyRm7m9dCVjtwLPQGo-zduVofP4HgTo,3697
8
+ notispf/commands/__init__.py,sha256=zVwQaeQ4l-o9BM1HILSgR2frqA11zSsJLlzFCpqt-2A,171
9
+ notispf/commands/block_cmds.py,sha256=UHbdv4_cu9nl4vpko2c8t7K6RJj8oTn2zcWkIorE_-c,2678
10
+ notispf/commands/exclude_cmds.py,sha256=x2gzuOWzfsqNekVJmLyrNPzW48hz9PHEXzhNXZJyK2o,1819
11
+ notispf/commands/line_cmds.py,sha256=XlvGVNASPtGpziqddnZK8-l_1znpNCKGMitkOS04QMA,4164
12
+ notispf/commands/registry.py,sha256=-0FrbxbqF8fjkifpK53oMsVU5ATChiSED7A6gsUy60w,1842
13
+ notispf-1.0.0.dist-info/METADATA,sha256=SQl4RwAMtEYrsr2BrRjNvt4RX6F5YYchqUJAU2aYOV4,6163
14
+ notispf-1.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
15
+ notispf-1.0.0.dist-info/entry_points.txt,sha256=Rsi-6inasK_yW3mcCMbbJJ7gvA3hlF6QuKHT5Jqhjbo,50
16
+ notispf-1.0.0.dist-info/top_level.txt,sha256=ZoBj5R4otBltJJyVEdpI8BeNFBxf8Bdp0o5FTYi2my0,8
17
+ notispf-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ notispf = notispf.__main__:main
@@ -0,0 +1 @@
1
+ notispf