@getguru/import-engine 0.0.0-stage → 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.md +78 -0
- package/README.md +74 -2
- package/docx-import-cli.js +116435 -0
- package/package.json +26 -4
package/LICENSE.md
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# License
|
|
2
|
+
|
|
3
|
+
**@getguru/import-engine — Proprietary Software License**
|
|
4
|
+
|
|
5
|
+
Copyright © 2026 Guru Technologies, Inc. All rights reserved.
|
|
6
|
+
|
|
7
|
+
This software ("Software") is the proprietary property of Guru Technologies,
|
|
8
|
+
Inc. ("Guru"). By installing, copying, or otherwise using the Software, you
|
|
9
|
+
agree to the terms below. If you do not agree, do not install or use the
|
|
10
|
+
Software.
|
|
11
|
+
|
|
12
|
+
## 1. Grant of Use
|
|
13
|
+
|
|
14
|
+
Subject to the terms of this license and a valid, active Guru subscription,
|
|
15
|
+
Guru grants you a limited, non-exclusive, non-transferable, revocable license
|
|
16
|
+
to install and use the Software solely to interact with Guru's services in
|
|
17
|
+
connection with that subscription.
|
|
18
|
+
|
|
19
|
+
## 2. Restrictions
|
|
20
|
+
|
|
21
|
+
You may not:
|
|
22
|
+
|
|
23
|
+
1. Redistribute, sublicense, rent, lease, sell, or otherwise transfer the
|
|
24
|
+
Software or its compiled artifacts, in whole or in part, to any third party.
|
|
25
|
+
2. Modify, adapt, translate, reverse-engineer, decompile, disassemble, or
|
|
26
|
+
otherwise attempt to derive the source code of the Software, except to the
|
|
27
|
+
extent such restrictions are prohibited by applicable law.
|
|
28
|
+
3. Create derivative works based on the Software.
|
|
29
|
+
4. Use the Software to develop, train, or evaluate a product or service that
|
|
30
|
+
competes with Guru's services.
|
|
31
|
+
5. Remove, alter, or obscure any proprietary notices (including copyright and
|
|
32
|
+
trademark notices) contained in or on the Software.
|
|
33
|
+
|
|
34
|
+
## 3. Ownership
|
|
35
|
+
|
|
36
|
+
The Software is licensed, not sold. Guru retains all right, title, and
|
|
37
|
+
interest in and to the Software, including all intellectual property rights.
|
|
38
|
+
No rights are granted to you other than those expressly set forth in this
|
|
39
|
+
license.
|
|
40
|
+
|
|
41
|
+
## 4. Disclaimer of Warranty
|
|
42
|
+
|
|
43
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND "AS AVAILABLE", WITHOUT WARRANTY OF ANY
|
|
44
|
+
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
|
|
45
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. GURU
|
|
46
|
+
DOES NOT WARRANT THAT THE SOFTWARE WILL BE ERROR-FREE OR UNINTERRUPTED.
|
|
47
|
+
|
|
48
|
+
## 5. Limitation of Liability
|
|
49
|
+
|
|
50
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL GURU BE
|
|
51
|
+
LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, OR PUNITIVE
|
|
52
|
+
DAMAGES, OR ANY LOSS OF PROFITS OR REVENUES, ARISING OUT OF OR RELATED TO YOUR
|
|
53
|
+
USE OF, OR INABILITY TO USE, THE SOFTWARE, WHETHER BASED IN CONTRACT, TORT,
|
|
54
|
+
STRICT LIABILITY, OR OTHERWISE, EVEN IF GURU HAS BEEN ADVISED OF THE
|
|
55
|
+
POSSIBILITY OF SUCH DAMAGES.
|
|
56
|
+
|
|
57
|
+
## 6. Termination
|
|
58
|
+
|
|
59
|
+
This license terminates automatically upon (a) the termination or expiration
|
|
60
|
+
of your Guru subscription, or (b) your material breach of any term of this
|
|
61
|
+
license. Upon termination, you must cease all use of the Software and destroy
|
|
62
|
+
all copies in your possession or control. Sections 3, 4, 5, and 7 survive
|
|
63
|
+
termination.
|
|
64
|
+
|
|
65
|
+
## 7. Governing Law
|
|
66
|
+
|
|
67
|
+
This license is governed by and construed in accordance with the laws of the
|
|
68
|
+
jurisdiction in which Guru Technologies, Inc. is headquartered, without regard
|
|
69
|
+
to its conflict-of-laws principles.
|
|
70
|
+
|
|
71
|
+
## 8. Contact
|
|
72
|
+
|
|
73
|
+
Questions about this license may be directed to Guru Technologies, Inc.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
**Trademarks.** "Guru" and related marks are trademarks of Guru Technologies,
|
|
78
|
+
Inc. Nothing in this license grants any right to use such marks.
|
package/README.md
CHANGED
|
@@ -1,3 +1,75 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @getguru/import-engine
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Guru content importer as a command-line tool. It turns an export (Notion, Confluence,
|
|
4
|
+
Google Sites, Google Docs, Word, PDF, Slab, GitHub wiki, Markdown, spreadsheet) into a zip
|
|
5
|
+
that Guru can import. It is the same pipeline as the webapp's "Import content" screen,
|
|
6
|
+
built from `guru-labs`.
|
|
7
|
+
|
|
8
|
+
Requires Node >=22.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# build an import zip
|
|
14
|
+
guru-import-engine <export> --type <import-type> --output <out.zip> [--split h1|h1,h2|none] [--json <path|->]
|
|
15
|
+
|
|
16
|
+
# guess an export's import type (never builds anything)
|
|
17
|
+
guru-import-engine --detect <export> [--json <path|->]
|
|
18
|
+
|
|
19
|
+
# check the structure of a Guru import zip (not a source export)
|
|
20
|
+
guru-import-engine --validate <guru-import.zip> [--json <path|->]
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
- `--type` is the import type (`notion`, `confluence`, `google-sites`, `google-doc`,
|
|
24
|
+
`word-doc`, `pdf`, `slab`, `github`, `markdown`, `spreadsheet`).
|
|
25
|
+
- `--output` defaults to `guru-doc-import.zip`.
|
|
26
|
+
- `--json <path|->` also writes a machine-readable report; `-` sends it to stdout and moves
|
|
27
|
+
the human-readable output to stderr.
|
|
28
|
+
|
|
29
|
+
Without installing: `npx @getguru/import-engine --detect <export>`.
|
|
30
|
+
|
|
31
|
+
## Exit codes
|
|
32
|
+
|
|
33
|
+
| Code | Meaning |
|
|
34
|
+
|---|---|
|
|
35
|
+
| 0 | Success (`--validate`: no errors; `--detect`: a result was printed, including `unknown`). |
|
|
36
|
+
| 1 | The zip was built but some pages failed; `--validate`: the zip has errors. |
|
|
37
|
+
| 2 | No zip was produced, or the input was unreadable (also if the `--json` file can't be written). The message goes to stderr. |
|
|
38
|
+
| 64 | Usage error (bad or missing flag or value). |
|
|
39
|
+
|
|
40
|
+
## `--json` report
|
|
41
|
+
|
|
42
|
+
Every JSON document has `schemaVersion` (currently `1`; bumped on a breaking change).
|
|
43
|
+
|
|
44
|
+
- Import (`<export> --json`): the import report (`toolVersion`, `importType`,
|
|
45
|
+
`exportFilename`, counts such as `cardCount`, `skippedCount`, `failedCount`,
|
|
46
|
+
`degradedCount`, `missingImageCount`, and the `failedDocs`, `skippedDocs`,
|
|
47
|
+
`missingImageDocs`, `unimportedFiles` and `signatures` lists), plus `inputFilename` and
|
|
48
|
+
`outputPath` (absolute path of the zip).
|
|
49
|
+
- `--validate`: `errors`, `warnings`, `infos`, `syncErrors` counts, `looksLikeGuruImportZip`,
|
|
50
|
+
and `findings` (`{ severity, file, message }`).
|
|
51
|
+
- `--detect`: `inputFilename`, `likely`, `confidence`, `evidence`, `alternatives`, `counts`.
|
|
52
|
+
- Exit code 2: `{ schemaVersion, error: { message } }` at the same destination.
|
|
53
|
+
|
|
54
|
+
The JSON holds page titles and snippets from the export. Treat it as customer data.
|
|
55
|
+
|
|
56
|
+
## Releasing
|
|
57
|
+
|
|
58
|
+
- Bump `version` in this `package.json`. It is also the engine version the import report
|
|
59
|
+
records in its tool version (`<version>+<short commit SHA>`).
|
|
60
|
+
- CI publishes from `master` through npm trusted publishing.
|
|
61
|
+
- The first publish (0.1.0) is done by hand from `master` after the merge, by a maintainer of
|
|
62
|
+
the `@getguru` npm scope:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
bash run.sh package && npm publish ./dist/import-engine --access public
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
That maintainer then adds guru-labs's CircleCI project and the `guru-labs-npm-publish`
|
|
69
|
+
context as the trusted publisher for the package on npmjs.com. Assumption to confirm
|
|
70
|
+
against npm's trusted-publishing docs: the package must exist before a trusted publisher
|
|
71
|
+
can be configured, which is why the first publish is manual.
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
Proprietary; see `LICENSE.md`.
|