@polishedapps/doc-splitter 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 PolishedApps LLC and contributors
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.
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # @polishedapps/doc-splitter
2
+
3
+ `@polishedapps/doc-splitter` is the npm package for the DocSplitter command-line tool. It inspects and splits structured DOCX and PDF documents using their heading hierarchy without modifying the input document.
4
+
5
+ The package installs the `doc-splitter` command.
6
+
7
+ The core implementation is bundled into this package. DocSplitter does not
8
+ provide a separate supported public core-library API.
9
+
10
+ ## Requirements
11
+
12
+ - Node.js 24
13
+
14
+ ## Installation
15
+
16
+ Install the command globally:
17
+
18
+ ```sh
19
+ npm install --global @polishedapps/doc-splitter
20
+ ```
21
+
22
+ Or run it directly with npm:
23
+
24
+ ```sh
25
+ npx @polishedapps/doc-splitter --help
26
+ ```
27
+
28
+ ## Usage
29
+
30
+ Inspect a document's heading hierarchy:
31
+
32
+ ```sh
33
+ doc-splitter inspect "manual.docx"
34
+ ```
35
+
36
+ Preview the output plan without creating files:
37
+
38
+ ```sh
39
+ doc-splitter plan "manual.docx" --level 2
40
+ ```
41
+
42
+ Split a document:
43
+
44
+ ```sh
45
+ doc-splitter "manual.docx" --output "./output"
46
+ ```
47
+
48
+ Splitting is the default workflow, so there is no `split` command word. DocSplitter previews the planned filenames and asks for confirmation before creating files. Use `--yes` to confirm without prompting.
49
+
50
+ ## Common options
51
+
52
+ ```text
53
+ --level <number>
54
+ --parent-headings <none|filename|folders>
55
+ --index
56
+ --no-index
57
+ --multilevel-index
58
+ --original-name
59
+ --title-case
60
+ --no-title-case
61
+ --json
62
+ --quiet
63
+ ```
64
+
65
+ The split workflow also supports:
66
+
67
+ ```text
68
+ --output <directory>
69
+ --subfolder
70
+ --yes
71
+ ```
72
+
73
+ JSON split execution requires `--yes`:
74
+
75
+ ```sh
76
+ doc-splitter "manual.pdf" --output "./output" --subfolder --json --yes
77
+ ```
78
+
79
+ Run `doc-splitter --help` for the complete command reference.
80
+
81
+ ## Project
82
+
83
+ - [Source repository](https://github.com/PolishedApps/DocSplitter)
84
+ - [Issue tracker](https://github.com/PolishedApps/DocSplitter/issues)
85
+ - [Security policy](https://github.com/PolishedApps/DocSplitter/security/policy)
86
+ - [MIT License](https://github.com/PolishedApps/DocSplitter/blob/main/LICENSE)
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { runCli } from "../dist/main.js";
4
+
5
+ await runCli();