https://github.com/singuerinc/whatsapp-message-filter
Filter a chat history file from WhatsApp
https://github.com/singuerinc/whatsapp-message-filter
chat filters messages module nodejs npm whatsapp
Last synced: about 1 month ago
JSON representation
Filter a chat history file from WhatsApp
- Host: GitHub
- URL: https://github.com/singuerinc/whatsapp-message-filter
- Owner: singuerinc
- Created: 2018-09-17T13:44:16.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-16T15:17:46.000Z (about 5 years ago)
- Last Synced: 2025-03-04T23:05:59.753Z (about 2 months ago)
- Topics: chat, filters, messages, module, nodejs, npm, whatsapp
- Language: JavaScript
- Homepage:
- Size: 137 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://www.codacy.com/app/nahuel.scotti/whatsapp-message-filter)
[](https://circleci.com/gh/singuerinc/whatsapp-message-filter)
[](https://codecov.io/gh/singuerinc/whatsapp-message-filter)# WhatsApp message filter
Filter a chat history file
# Usage
1. Download a whatsapp file history. Follow this guide: https://faq.whatsapp.com/en/android/23756533/
2. Execute the program:## Globally
```bash
# npm
npm install -g whatsapp-message-filter
whatsapp-message-filter --input ./file.txt --message "great!"# npx
npx whatsapp-message-filter --input ./file.txt --message "great!"# yarn
yarn global add whatsapp-message-filter
npx whatsapp-message-filter --input ./file.txt --message "great!"
```## Module
```bash
# npm
npm install whatsapp-message-filter# or yarn
yarn add whatsapp-message-filter
``````js
const fs = require("fs");
const what = require("whatsapp-message-filter");
const file = fs.readFileSync("./file.txt", "utf-8");
const arr = what(file, "message");// [{
// raw: string,
// date: string,
// time: string,
// user: string,
// message: string
// }, ...]
```