textual-log-parser

0.3.0 • Public • Published

textual-log-parser Build Status Dependency Status Gitter

parses Textual log files and returns JavaScript objects

Features:

  • Removes empty lines and Begin/End session lines
  • Corrects missing date in timestamp from early Textual logs.
  • Formats dates consistently with local timezone data.

Module

Point the parser to a directory of Textual logs and it'll return you objects for each line:

{
  "date": "2014-06-30T18:53:44+08:00",
  "value": "<@srn_> ZIGGAGAGAGAGA"
}

The parser will also return number of days and metadata(server, type and title). Example use of the parser:

var parser = require('textual-log-parser')

var directory = "~/Documents/Textual\ logs/Freenode/Channels/#atp";
parser(directory, function(results, days, metadata){
  console.log(days + ' days of logs');
});

CLI

You can also use the parser as a CLI app by installing it globally.

$ npm install --global textual-log-parser

Usage

The CLI will output the results as a JSON file in your current working directory.

$ textual-log-parser --help

Usage
  $ textual-log-parser <directory>

License

MIT © Matias Singers

Readme

Keywords

Package Sidebar

Install

npm i textual-log-parser

Weekly Downloads

14

Version

0.3.0

License

MIT

Last publish

Collaborators

  • matiassingers