@noedgeai-org/doc2x-cli 0.1.8
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 +45 -0
- package/dist/cli.cjs +96118 -0
- package/package.json +20 -0
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# @noedgeai-org/doc2x-cli
|
|
2
|
+
|
|
3
|
+
CLI for Doc2X document parsing, translation, and batch workflows.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm i -g @noedgeai-org/doc2x-cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Requires Node `>=22`.
|
|
12
|
+
|
|
13
|
+
## Commands
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
doc2x login
|
|
17
|
+
doc2x logout
|
|
18
|
+
doc2x parse <input>
|
|
19
|
+
doc2x translate <input>
|
|
20
|
+
doc2x batch <parse|translate> [inputs...]
|
|
21
|
+
doc2x term list
|
|
22
|
+
doc2x models list
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Authentication
|
|
26
|
+
|
|
27
|
+
The CLI supports two auth modes:
|
|
28
|
+
|
|
29
|
+
- `--auth-mode client` (default): reuse an authenticated desktop client session
|
|
30
|
+
- `--auth-mode oauth`: use OAuth credentials from `doc2x login`
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
doc2x parse ./paper.pdf --to md
|
|
36
|
+
doc2x parse ./paper.pdf --to docx --docx-template academic
|
|
37
|
+
doc2x translate ./paper.pdf --target-language en --to html
|
|
38
|
+
doc2x translate ./paper.pdf --translate-type pdf --pdf-font-strategy page-optimal
|
|
39
|
+
doc2x batch parse ./docs --glob "**/*.pdf"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Notable Options
|
|
43
|
+
|
|
44
|
+
- `--docx-template <template>`: Word template for V3 docx export. Values: `default`, `general`, `academic`, `business`, `elegant`, `minimal`, `technical`.
|
|
45
|
+
- `--pdf-font-strategy <strategy>`: PDF font strategy for fixed-layout translation (`--translate-type pdf`). Values: `global-consistent`, `page-optimal`.
|