https://github.com/arrow2nd/line2json
💬 LINE のトーク履歴をパースする Deno モジュール
https://github.com/arrow2nd/line2json
deno deno-module line parser
Last synced: over 1 year ago
JSON representation
💬 LINE のトーク履歴をパースする Deno モジュール
- Host: GitHub
- URL: https://github.com/arrow2nd/line2json
- Owner: arrow2nd
- License: mit
- Created: 2021-10-18T03:57:57.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-12-24T14:50:52.000Z (over 3 years ago)
- Last Synced: 2025-03-20T04:41:17.460Z (over 1 year ago)
- Topics: deno, deno-module, line, parser
- Language: TypeScript
- Homepage: https://deno.land/x/line2json
- Size: 26.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# line2json
LINE で出力したトーク履歴ファイルを JSON にパースするモジュール
## 使い方
### パースする
```ts
import { parse, TalkData } from "https://deno.land/x/line2json@v0.1.0/mod.ts";
const text = Deno.readTextFileSync("talk_histroy.txt");
const histories: TalkData[] = parse(text);
console.log(histories);
```
### JSON にする
```ts
import { toJson } from "https://deno.land/x/line2json@v0.1.0/mod.ts";
const text = Deno.readTextFileSync("talk_histroy.txt");
const json = toJson(text);
Deno.writeTextFileSync("histroy.json", json);
```
## 検証環境
- Windows / Mac 版 LINE v7.2.0
- Android 版 LINE v11.17.1
## 仕様
- LINE のシステムメッセージや URL、LINE 依存の絵文字を含むメッセージは除外されます
- 時刻は全て 24 時間表記です