@jarkkojs/readseek 0.5.18 → 0.6.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/README.md +13 -11
- package/bin/readseek.js +13 -18
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -18,6 +18,9 @@ Or install the npm wrapper:
|
|
|
18
18
|
npm install -g @jarkkojs/readseek
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
Prebuilt binaries are available for macOS ARM64, Linux ARM64 and x64, and
|
|
22
|
+
Windows x64. The Linux binaries are statically linked with musl.
|
|
23
|
+
|
|
21
24
|
## Pi extension
|
|
22
25
|
|
|
23
26
|
The bundled [pi-readseek extension](packages/pi-readseek/README.md) exposes
|
|
@@ -57,25 +60,24 @@ for language detection and a cursor address:
|
|
|
57
60
|
printf '%s\n' 'fn main() {}' | readseek identify stdin:scratch.rs:1 --column 4
|
|
58
61
|
```
|
|
59
62
|
|
|
60
|
-
## Images
|
|
63
|
+
## Images and PDFs
|
|
61
64
|
|
|
62
|
-
`detect` reports
|
|
63
|
-
|
|
64
|
-
the task (BLIP, YOLOv8-nano, TrOCR):
|
|
65
|
+
`detect` reports image metadata and PDF page counts. `read` returns bounded
|
|
66
|
+
base64 images by default; use `--image` for one local analysis mode:
|
|
65
67
|
|
|
66
68
|
```sh
|
|
67
|
-
readseek read photo.jpg
|
|
69
|
+
readseek read photo.jpg # default: bounded base64 image
|
|
68
70
|
readseek read photo.jpg --image caption # detailed natural-language caption
|
|
69
71
|
readseek read photo.jpg --image objects # object labels + bounding boxes
|
|
70
72
|
readseek read photo.jpg --image ocr # extracted text
|
|
71
73
|
```
|
|
72
74
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
PDF reads return page-tagged Markdown and page-associated embedded images. The
|
|
76
|
+
same mode applies to each embedded image. Line/hash suffixes, `--end`, `--limit`,
|
|
77
|
+
and `--language` do not apply to visual files.
|
|
78
|
+
|
|
79
|
+
Vision models download lazily into the user cache and run on the CPU. Captioning
|
|
80
|
+
and OCR can take substantial time.
|
|
79
81
|
|
|
80
82
|
## Cache
|
|
81
83
|
|
package/bin/readseek.js
CHANGED
|
@@ -7,25 +7,20 @@ const fs = require('node:fs');
|
|
|
7
7
|
const path = require('node:path');
|
|
8
8
|
|
|
9
9
|
function resolveBinary() {
|
|
10
|
-
const platform = process.platform
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
case 'win32':
|
|
23
|
-
packageName = '@jarkkojs/readseek-win32-x64';
|
|
24
|
-
binaryName = 'readseek.exe';
|
|
25
|
-
break;
|
|
26
|
-
default:
|
|
27
|
-
throw new Error(`unsupported platform: ${platform}`);
|
|
10
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
11
|
+
const packages = {
|
|
12
|
+
'darwin-arm64': '@jarkkojs/readseek-darwin-arm64',
|
|
13
|
+
'linux-arm64': '@jarkkojs/readseek-linux-arm64',
|
|
14
|
+
'linux-x64': '@jarkkojs/readseek-linux-x64',
|
|
15
|
+
'win32-x64': '@jarkkojs/readseek-win32-x64',
|
|
16
|
+
};
|
|
17
|
+
const packageName = packages[platform];
|
|
18
|
+
if (!packageName) {
|
|
19
|
+
throw new Error(
|
|
20
|
+
`unsupported platform: ${platform}; supported platforms: ${Object.keys(packages).join(', ')}`
|
|
21
|
+
);
|
|
28
22
|
}
|
|
23
|
+
const binaryName = process.platform === 'win32' ? 'readseek.exe' : 'readseek';
|
|
29
24
|
|
|
30
25
|
let packageDir;
|
|
31
26
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jarkkojs/readseek",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "A structural read command",
|
|
5
5
|
"license": "Apache-2.0 AND LGPL-2.1-or-later",
|
|
6
6
|
"homepage": "https://github.com/jarkkojs/readseek#readme",
|
|
@@ -21,9 +21,10 @@
|
|
|
21
21
|
"LICENSE-LGPL-2.1"
|
|
22
22
|
],
|
|
23
23
|
"optionalDependencies": {
|
|
24
|
-
"@jarkkojs/readseek-darwin-arm64": "0.
|
|
25
|
-
"@jarkkojs/readseek-linux-
|
|
26
|
-
"@jarkkojs/readseek-
|
|
24
|
+
"@jarkkojs/readseek-darwin-arm64": "0.6.0",
|
|
25
|
+
"@jarkkojs/readseek-linux-arm64": "0.6.0",
|
|
26
|
+
"@jarkkojs/readseek-linux-x64": "0.6.0",
|
|
27
|
+
"@jarkkojs/readseek-win32-x64": "0.6.0"
|
|
27
28
|
},
|
|
28
29
|
"publishConfig": {
|
|
29
30
|
"access": "public"
|