@@ -16,12 +16,12 @@ Released versions ship **prebuilt** native binaries, so no Rust toolchain is
1616needed to use the package:
1717
1818``` bash
19- npm install @artiz.ru/ fleischwolf # or: bun add @artiz.ru/ fleischwolf
19+ npm install fleischwolf # or: bun add fleischwolf
2020```
2121
2222Prebuilt platforms: Linux x64 / arm64 (glibc) and Windows x64. (macOS isn't
2323prebuilt — build from source, see below.) The right binary is pulled in
24- automatically as a platform-specific ` optionalDependency ` (` @artiz.ru/ fleischwolf-<triple>` ). Releases are published to npm by
24+ automatically as a platform-specific ` optionalDependency ` (` fleischwolf-<triple> ` ). Releases are published to npm by
2525manually running the ` npm publish ` workflow
2626(` .github/workflows/npm-publish.yml ` ) — by default it builds the latest master
2727(the workspace version); optionally pass a release tag to build that instead.
@@ -48,7 +48,7 @@ npm run build # release build → fleischwolf.<platform>.node + native.js
4848## Quick start
4949
5050``` js
51- import { convertFile , convert , DocumentConverter } from ' @artiz.ru/ fleischwolf'
51+ import { convertFile , convert , DocumentConverter } from ' fleischwolf'
5252
5353// Convert a file — format detected from the extension.
5454const { content } = convertFile (' report.docx' )
@@ -65,15 +65,15 @@ const converter = new DocumentConverter({ strict: true })
6565const a = converter .convert ({ name: ' a.md' , data: Buffer .from (' # A\n ' ) })
6666```
6767
68- CommonJS works too: ` const { convertFile } = require('@artiz.ru/ fleischwolf') ` .
68+ CommonJS works too: ` const { convertFile } = require('fleischwolf') ` .
6969
7070### Async (off the event loop)
7171
7272Conversion is CPU-bound; the ` *Async ` variants run it on the libuv thread pool
7373so the event loop stays free. Prefer these for PDF/image and for servers.
7474
7575``` js
76- import { convertFileAsync } from ' @artiz.ru/ fleischwolf'
76+ import { convertFileAsync } from ' fleischwolf'
7777
7878const res = await convertFileAsync (' paper.pdf' , { to: ' json' })
7979```
@@ -86,7 +86,7 @@ before the whole document is done; concatenating the chunks reproduces the
8686buffered ` content ` byte-for-byte.
8787
8888``` js
89- import { streamFileMarkdown } from ' @artiz.ru/ fleischwolf'
89+ import { streamFileMarkdown } from ' fleischwolf'
9090
9191for await (const chunk of streamFileMarkdown (' paper.pdf' )) {
9292 process .stdout .write (chunk)
@@ -102,7 +102,7 @@ Python docling downloads its models on first use. Converting a PDF/image/METS
102102input ** throws** until they're installed:
103103
104104``` js
105- import { installDependencies , checkDependencies , convertFileAsync } from ' @artiz.ru/ fleischwolf'
105+ import { installDependencies , checkDependencies , convertFileAsync } from ' fleischwolf'
106106
107107await convertFileAsync (' paper.pdf' ) // ❌ throws: "requires the PDF/ML dependencies … call installDependencies()"
108108
@@ -147,7 +147,7 @@ every ONNX model — on each call. To convert many PDFs/images, reuse a `Pipelin
147147so the models load ** once** :
148148
149149``` js
150- import { Pipeline } from ' @artiz.ru/ fleischwolf'
150+ import { Pipeline } from ' fleischwolf'
151151
152152const pipeline = new Pipeline ({ strict: true })
153153for (const path of pdfPaths) {
0 commit comments