# weechat-log

> stream plaintext weechat logs into objects

Latest version **1.2.0** (published 2016-12-01) · LGPL-3.0+ license · 0 weekly downloads

## Install

```sh
npm install weechat-log
pnpm add weechat-log
yarn add weechat-log
bun add weechat-log
```

Provides the command `weechat-log`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2016-12-01 |
| First published | 2016-11-29 |
| Weekly downloads | 0 |
| License | LGPL-3.0+ |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 7 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Mister Hat |
| Maintainers | misterhat |
| Keywords | weechat, log, irc |

## Links

- npm: https://www.npmjs.com/package/weechat-log
- Repository: https://github.com/misterhat/weechat-log
- Homepage: https://github.com/misterhat/weechat-log#readme
- Issues: https://github.com/misterhat/weechat-log/issues
- npm.io page: https://npm.io/package/weechat-log

## Dependencies (7)

- [datef](https://npm.io/package/datef.md) ^3.0.0
- [byline](https://npm.io/package/byline.md) ^5.0.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [merge-stream](https://npm.io/package/merge-stream.md) ^1.0.1
- [through2-map](https://npm.io/package/through2-map.md) ^3.0.0
- [string-template](https://npm.io/package/string-template.md) ^1.0.0
- [through2-filter](https://npm.io/package/through2-filter.md) ^2.0.0

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 1.2.0 (latest) — 2016-12-01
- 1.1.0 — 2016-11-29
- 1.0.0 — 2016-11-29

## README

# weechat-log
Stream plaintext [WeeChat](https://weechat.org/) logs into semantic objects.

## Install

For the command-line program:

    $ sudo npm install -g weechat-log

For the module:

    $ npm install --save weechat-log

## Usage
```
usage: weechat-log [-ndfjh] <log filenames>

  -n, --nicks    nicks separated by commas to filter
  -d, --date     date format
  -f, --format   line output format
  -j, --json     output in JSON format (overrides format)
  -h, --help     show this screen

<log filenames> are optional. stdin is used by default.
```

    $ weechat-log ~/.weechat/logs/* -f '{action}:{message}'
    $ weechat-log -f '{ops}:{halfops}:{nicks}' < ~/.weechat/logs/*

## Example
See https://github.com/misterhat/weechat-log/blob/master/test.js

## API
### weechatLog.parseLine(line, options)
Parse a single line string into an object.

`line` is a `String` being a line from a log file.

`options` is an optional object which contains the following defaults:

```javascript
{
    actionToken: '*', // token for /me actions in log
    timeFormat: /(\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2})/
}
```

## License
Copyright (C) 2016 Mister Hat

This library is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation; either version 3.0 of the License, or (at your option) any
later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.

---
_Source: https://npm.io/package/weechat-log · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
