@lpenguin/notion-cli 1.0.0 → 1.0.7
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/README.md +39 -0
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -138,6 +138,45 @@ notion-cli page write abc123def456 --file mypage.md --dry-run
|
|
|
138
138
|
|
|
139
139
|
---
|
|
140
140
|
|
|
141
|
+
### `page patch` — Partially Edit Page Content
|
|
142
|
+
|
|
143
|
+
Replace a specific line range in a Notion page's Markdown content without rewriting the whole page. This is intended for targeted edits and preserves unaffected blocks when applying the change.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
notion-cli page patch <page-id> --lines 5:12 --file patch.md
|
|
147
|
+
notion-cli page patch <page-id> --lines 5:12 --content "Updated content"
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
| Option | Description |
|
|
151
|
+
|--------|-------------|
|
|
152
|
+
| `--lines <start:end>` | **Required.** 1-indexed, inclusive line range to replace |
|
|
153
|
+
| `-f, --file <path>` | Path to replacement Markdown file |
|
|
154
|
+
| `--content <markdown>` | Inline replacement Markdown |
|
|
155
|
+
|
|
156
|
+
**Examples:**
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
# Replace one line
|
|
160
|
+
notion-cli page patch abc123def456 --lines 3:3 --content "Updated line 3"
|
|
161
|
+
|
|
162
|
+
# Replace a section from a file
|
|
163
|
+
notion-cli page patch abc123def456 --lines 10:18 --file section.md
|
|
164
|
+
|
|
165
|
+
# Delete a range by replacing it with empty content
|
|
166
|
+
notion-cli page patch abc123def456 --lines 20:24 --content ""
|
|
167
|
+
|
|
168
|
+
# Preview the diff without writing changes
|
|
169
|
+
notion-cli page patch abc123def456 --lines 5:12 --file patch.md --dry-run
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Notes:**
|
|
173
|
+
|
|
174
|
+
- Line ranges are 1-indexed and inclusive
|
|
175
|
+
- Use `page read` first if you need to inspect current line numbers
|
|
176
|
+
- Empty replacement content deletes the selected lines
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
141
180
|
### `page list` — List Pages
|
|
142
181
|
|
|
143
182
|
List or search Notion pages accessible to the integration.
|
package/package.json
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lpenguin/notion-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "CLI tool for reading and editing Notion entries through Markdown and CSV. AI agent friendly.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
|
-
"notion-md-csv-cli": "dist/index.js",
|
|
8
7
|
"notion-cli": "dist/index.js"
|
|
9
8
|
},
|
|
10
9
|
"main": "./dist/index.js",
|
|
@@ -33,6 +32,10 @@
|
|
|
33
32
|
"ai-agent"
|
|
34
33
|
],
|
|
35
34
|
"license": "MIT",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/lpenguin/notion-cli.git"
|
|
38
|
+
},
|
|
36
39
|
"engines": {
|
|
37
40
|
"node": ">=18.0.0"
|
|
38
41
|
},
|