Code Monkey home page Code Monkey logo

whatsapp-parser's Introduction

whatsapp-parser

devDependency Status

Parse whatsapp log for Android and iOS.

var whatsapp = require('whatsapp-parser')
  , parsed = whatsapp.parseFile('./chat_export.txt')

parsed.forEach (function(message){
 console.log(message.date, ":", message.name, ":", message.name)
})

#var whatsapp = require('whatsapp-parser')

##whatsapp.parse(text) Parses the given string and returns an array of objects

[
  { date: '1.4.15 21:59:33',
    msg: 'I like robots. They are sooo cool.',
    name: 'Hans Christian Andersen' },
 //...
]

##whatsapp.parseFile(path) Does the same as

whatsapp.parse(fs.readFileSync(path,'utf8'))

#know issues

  • The android log does not report seconds or the year
    • It just returns 0. So the date might be '1.4.00 22:0:00'
  • Can't parse the "system messages". (like "Johann Wolfgang von Goethe created group “unicorns and rainbows”")
    • they are parsed as messages by a user named "system"

Release History

  • 2015-04-21   v0.2.0  Now works with browserify. 
  • 2015-04-21   v0.1.0  Initial version. 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.