Skip to content

Commit 50b83f7

Browse files
committed
fixes
1 parent fb7622e commit 50b83f7

File tree

4 files changed

+37
-14
lines changed

4 files changed

+37
-14
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Install dependencies
4444
run: |
4545
cd nodejs-api
46-
npm ci
46+
npm install
4747
4848
- name: Build
4949
run: |
@@ -90,12 +90,3 @@ jobs:
9090
run: |
9191
cd rust-cli
9292
cargo build --release --target ${{ matrix.target }}
93-
94-
- name: Test (native builds only)
95-
if: |
96-
(matrix.os == 'ubuntu-latest' && matrix.target == 'x86_64-unknown-linux-gnu') ||
97-
(matrix.os == 'macos-latest' && matrix.target == 'x86_64-apple-darwin') ||
98-
(matrix.os == 'windows-latest' && matrix.target == 'x86_64-pc-windows-msvc')
99-
run: |
100-
cd rust-cli
101-
cargo test --release --target ${{ matrix.target }}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
- name: Install dependencies
5858
run: |
5959
cd nodejs-api
60-
npm ci
60+
npm install
6161
6262
- name: Build
6363
run: |

rust-cli/README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,25 @@ All formatting and structure is preserved.
4444
Tables, lists, and other elements are properly extracted.
4545
```
4646

47+
## Plain Text Output
48+
49+
```bash
50+
vectorize-iris document.pdf -o text
51+
```
52+
53+
**Output:**
54+
```
55+
This is the extracted text from your PDF document.
56+
All formatting and structure is preserved.
57+
58+
Tables, lists, and other elements are properly extracted.
59+
```
60+
61+
**Pipe to file:**
62+
```bash
63+
vectorize-iris document.pdf -o text > output.txt
64+
```
65+
4766
## JSON Output (for piping)
4867

4968
```bash
@@ -290,7 +309,7 @@ Arguments:
290309
291310
Options:
292311
-o, --output <FORMAT>
293-
Output format [default: pretty] [possible values: pretty, json, yaml]
312+
Output format [default: pretty] [possible values: pretty, json, yaml, text]
294313
--chunk-size <SIZE>
295314
Chunk size (default: 256)
296315
--metadata-schema <ID:SCHEMA>
@@ -361,11 +380,17 @@ vectorize-iris large-document.pdf \
361380
- Human-readable structured data
362381
- Good for config files
363382

383+
### Text
384+
- Plain extracted text only to stdout
385+
- Progress messages to stderr
386+
- No formatting or structure
387+
- Perfect for direct piping to files or other tools
388+
364389
## CLI Options
365390

366391
```
367392
FILE Path to file (required)
368-
-o, --output Output format: pretty, json, yaml (default: pretty)
393+
-o, --output Output format: pretty, json, yaml, text (default: pretty)
369394
--chunk-size Chunk size in characters (default: 256)
370395
--metadata-schema Metadata schema (repeatable)
371396
--infer-metadata-schema Auto-detect metadata structure

rust-cli/src/main.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct Cli {
4040
#[arg(long)]
4141
org_id: Option<String>,
4242

43-
/// Output format
43+
/// Output format (pretty: styled output, json: JSON format, yaml: YAML format, text: plain text only)
4444
#[arg(short = 'o', long, value_enum, default_value = "pretty")]
4545
output: OutputFormat,
4646

@@ -74,6 +74,7 @@ enum OutputFormat {
7474
Pretty,
7575
Json,
7676
Yaml,
77+
Text,
7778
}
7879

7980
// Request/Response Models
@@ -421,6 +422,12 @@ fn format_output(data: &ExtractionResultData, format: &OutputFormat, has_schemas
421422
OutputFormat::Yaml => {
422423
println!("{}", serde_yaml::to_string(data).unwrap());
423424
}
425+
OutputFormat::Text => {
426+
// Only print the extracted text, nothing else
427+
if let Some(text) = &data.text {
428+
print!("{}", text);
429+
}
430+
}
424431
OutputFormat::Pretty => {
425432
// Pretty format with beautiful styling
426433

0 commit comments

Comments
 (0)