Gathering detailed insights and metrics for content-grabber-alvamind
Gathering detailed insights and metrics for content-grabber-alvamind
npm install content-grabber-alvamind
Typescript
Module System
Node Version
NPM Version
52.5
Supply Chain
86
Quality
71.9
Maintenance
50
Vulnerability
96.2
License
TypeScript (100%)
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Total Downloads
86
Last Day
1
Last Week
1
Last Month
7
Last Year
86
MIT License
9 Commits
1 Watchers
1 Branches
1 Contributors
Updated on Jan 09, 2025
Latest Version
1.0.1
Package Id
content-grabber-alvamind@1.0.1
Unpacked Size
51.45 kB
Size
13.48 kB
File Count
39
NPM Version
9.2.0
Node Version
20.16.0
Published on
Jan 09, 2025
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
0%
1
Compared to previous week
Last Month
-91.1%
7
Compared to previous month
Last Year
0%
86
Compared to previous year
A Node.js library to extract text content from various file types. πͺ
.txt
, .pdf
, .docx
, .csv
, and .xlsx
files. π1npm install content-grabber-alvamind
1import { fetchFileContent } from 'content-grabber-alvamind'; 2 3async function main() { 4 try { 5 const fileUrl = 'path/to/your/document.pdf'; // Replace with your file URL/path 6 const extractedContent = await fetchFileContent(fileUrl); 7 console.log(extractedContent); 8 } catch (error) { 9 console.error('Error:', error); 10 } 11} 12 13main();
1import { fetchFileContent } from 'content-grabber-alvamind'; 2 3async function main() { 4 try { 5 const fileUrl = 'path/to/your/scanned_document.pdf'; 6 const extractedContent = await fetchFileContent(fileUrl, { 7 pdfOptions: { 8 ocrEnabled: true, // Enable OCR for scanned PDFs 9 languages: ['eng', 'spa'], // Specify OCR languages 10 scale: 2.5 // increase scale for better OCR quality 11 } 12 }); 13 console.log(extractedContent); 14 } catch (error) { 15 console.error("Error:", error); 16 } 17} 18 19main();
1import { fetchFileContent, FileContentExtractionOptions } from 'content-grabber-alvamind'; 2 3class CustomLogger { 4 info(message: string, ...args: any[]): void { 5 console.log(`[CUSTOM INFO] ${message}`, ...args); 6 } 7 8 error(message: string, ...args: any[]): void { 9 console.error(`[CUSTOM ERROR] ${message}`, ...args); 10 } 11 12 debug(message: string, ...args: any[]): void { 13 console.debug(`[CUSTOM DEBUG] ${message}`, ...args); 14 } 15} 16 17 18async function main() { 19 try { 20 const fileUrl = 'path/to/your/document.txt'; 21 const options: FileContentExtractionOptions = { 22 logger: new CustomLogger() 23 } 24 const extractedContent = await fetchFileContent(fileUrl, options); 25 console.log(extractedContent); 26 } catch (error) { 27 console.error('Error:', error); 28 } 29} 30 31main();
1import { fetchFileContent } from 'content-grabber-alvamind'; 2 3async function main() { 4 try { 5 const fileUrl = 'path/to/your/document.docx'; // Replace with your file URL/path 6 const extractedContent = await fetchFileContent(fileUrl); 7 console.log(extractedContent); 8 } catch (error) { 9 console.error('Error:', error); 10 } 11} 12 13main();
1import { fetchFileContent } from 'content-grabber-alvamind'; 2 3async function main() { 4 try { 5 const fileUrl = 'path/to/your/data.csv'; // Replace with your file URL/path 6 const extractedContent = await fetchFileContent(fileUrl); 7 console.log(extractedContent); 8 } catch (error) { 9 console.error('Error:', error); 10 } 11} 12 13main();
1import { fetchFileContent } from 'content-grabber-alvamind'; 2 3async function main() { 4 try { 5 const fileUrl = 'path/to/your/data.xlsx'; // Replace with your file URL/path 6 const extractedContent = await fetchFileContent(fileUrl); 7 console.log(extractedContent); 8 } catch (error) { 9 console.error('Error:', error); 10 } 11} 12 13main();
fetchFileContent(fileUrl: string, options?: FileContentExtractionOptions): Promise<string>
fileUrl
(string): The URL or local file path of the document to extract text from.options
(object, optional): An object containing optional configurations:
pdfOptions
(object, optional): Configuration for PDF extraction:
ocrEnabled
(boolean, optional): Enable OCR extraction. Default true
.scale
(number, optional): Scale factor for OCR image. Default 2.0
.languages
(string[], optional): Array of OCR languages (e.g., ['eng', 'spa']
). Default ['eng']
.minTextLength
(number, optional): Minimum length of normal text to consider using OCR. Default 50
.logger
: Custom logger object that implements info
, error
and debug
methodsPromise
that resolves with the extracted text content or throws an error..odt
, .rtf
).Contributions are welcome! Feel free to submit issues, feature requests, and pull requests on GitHub. π
Hereβs how you can help:
If you find this project useful, consider supporting its development! You can contribute through:
Your support keeps this project going! π
No vulnerabilities found.
No security vulnerabilities found.