0.2.0 • Published 1 year ago
text-extractors v0.2.0
text-extractors
A text extractor for extracting text from HTML, PDF, Image and other files.
Currently supported types ...
- HTML, use html-to-text
- PDF, use pdfjs
- Image (PNG, JPEG, GIF, BMP, TIFF, ICO, SVG). Use tesseract.js for OCR.
- ... and more to come
Installation
npm install text-extractors
Usage
CommonJS
const { fromUrl, fromBufferWithMimeType, fromBuffer } = require('text-extractors');
// fromUrl
const text = await fromUrl('https://www.digital.go.jp/assets/contents/node/basic_page/field_ref_resources/d6cfdcdd-75e4-460c-9ec0-af4f952e03d5/20210906_meeting_promoting_01.pdf');
// fromBufferWithMimeType
const text = await fromBufferWithMimeType(buffer, 'image/png');
// fromBuffer
const text = await fromBuffer(buffer);
ES6
import { fromUrl, fromBufferWithMimeType, fromBuffer } from 'text-extractors';
Roadmap
- Add support for more file types
- Add support for options passed to the underlying libraries
0.2.0
1 year ago
0.1.7
1 year ago
0.1.4
1 year ago
0.1.6
1 year ago
0.1.5
1 year ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago
0.0.12
2 years ago
0.0.11
2 years ago
0.0.10
2 years ago
0.0.9
2 years ago
0.0.8
2 years ago
0.0.7
2 years ago
0.0.6
2 years ago
0.0.5
2 years ago
0.0.4
2 years ago
0.0.3
2 years ago
0.0.1
2 years ago