Skip to content

Latest commit

 

History

History
52 lines (39 loc) · 1.41 KB

README.md

File metadata and controls

52 lines (39 loc) · 1.41 KB

Codacy grade CircleCI Codecov

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

# 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

# npm
npm install whatsapp-message-filter

# or yarn
yarn add whatsapp-message-filter
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
// }, ...]