A Node.js/TypeScript project for scraping, processing, and emailing information from BOIB PDFs.
- Scrapes and processes BOIB PDF files stored in
BOIBpdfs/ - Searches for specific keywords in PDFs (configurable via
.env) - Associates results with customers (configurable via
.env) - Sends email notifications using Zoho SMTP
- Logs output and results
main.ts— Main entry point for scraping and processingmodules/— Shared/global logicservices/— Business logic (PDF, email, customer, BOIB)types/— TypeScript type definitionsBOIBpdfs/— Folder containing BOIB PDF files (organized by date).env— Environment configuration (not tracked by git).env.template— Example environment config (tracked by git)
- Install dependencies
pnpm install
- Configure environment
- Copy
.env.templateto.envand fill in your values (Zoho credentials, recipients, keywords, customers)
- Copy
- Run the project
pnpm start # or bash run-node-project.bat
See .env.template for all required variables:
ZOHO_USER,ZOHO_PASSWORD— Zoho SMTP credentialsRECIPIENT1,RECIPIENT2,RECIPIENT3— Email recipientsWORDTOSEARCH_1...WORDTOSEARCH_9— Keywords to search in PDFsCUSTOMER_1...CUSTOMER_7— Customer names
- Results and logs are written to
output.logandlastBoibInfo.json - Processed PDFs are stored in
BOIBpdfs/
- TypeScript configuration:
tsconfig.json - Logging: All logs go to
output.log - Add new keywords/customers by editing
.env
.envis ignored by git;.env.templateis tracked for reference- Email sending uses Zoho SMTP (see
modules/global.ts) - For troubleshooting, check
output.log
MIT