wpilog-parser 2.1.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -6
- package/dist/catalog-CYDrFwrh.mjs +1071 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.mjs +71 -0
- package/dist/index.d.mts +4 -2
- package/dist/index.mjs +1 -1069
- package/package.json +16 -17
- package/skills/{wpilog-parser → analyze-wpilog}/SKILL.md +9 -19
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wpilog-parser",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "Read WPILib wpilog data log files in TypeScript & JavaScript",
|
|
5
5
|
"homepage": "https://github.com/jonahsnider/wpilog-parser#readme",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,6 +13,9 @@
|
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "git+https://github.com/jonahsnider/wpilog-parser.git"
|
|
15
15
|
},
|
|
16
|
+
"bin": {
|
|
17
|
+
"wpilog": "./dist/cli.mjs"
|
|
18
|
+
},
|
|
16
19
|
"files": [
|
|
17
20
|
"dist",
|
|
18
21
|
"skills"
|
|
@@ -30,27 +33,23 @@
|
|
|
30
33
|
"build": "vp pack",
|
|
31
34
|
"check": "vp check",
|
|
32
35
|
"dev": "vp pack --watch",
|
|
33
|
-
"generate": "
|
|
36
|
+
"generate": "node ./src/struct/codegen.ts",
|
|
34
37
|
"prepare": "vp config",
|
|
35
38
|
"prepublishOnly": "vp run build",
|
|
39
|
+
"start": "node ./src/cli.ts",
|
|
36
40
|
"test": "vp test"
|
|
37
41
|
},
|
|
38
42
|
"dependencies": {
|
|
39
|
-
"
|
|
43
|
+
"@toon-format/toon": "^4.1.1",
|
|
44
|
+
"cac": "^7.0.0",
|
|
45
|
+
"chevrotain": "^13.0.0"
|
|
40
46
|
},
|
|
41
47
|
"devDependencies": {
|
|
42
|
-
"@codspeed/vitest-plugin": "
|
|
43
|
-
"@types/node": "
|
|
44
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
45
|
-
"typescript": "
|
|
46
|
-
"vite-plus": "0.
|
|
47
|
-
},
|
|
48
|
-
"
|
|
49
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
|
|
50
|
-
"vitest": "npm:@voidzero-dev/vite-plus-test@latest"
|
|
51
|
-
},
|
|
52
|
-
"packageManager": "bun@1.3.10",
|
|
53
|
-
"patchedDependencies": {
|
|
54
|
-
"@codspeed/vitest-plugin@5.2.0": "patches/@codspeed%2Fvitest-plugin@5.2.0.patch"
|
|
55
|
-
}
|
|
48
|
+
"@codspeed/vitest-plugin": "5.7.1",
|
|
49
|
+
"@types/node": "26.2.0",
|
|
50
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
51
|
+
"typescript": "7.0.2",
|
|
52
|
+
"vite-plus": "0.3.0"
|
|
53
|
+
},
|
|
54
|
+
"packageManager": "pnpm@12.0.0-rc.8"
|
|
56
55
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: wpilog
|
|
2
|
+
name: analyze-wpilog
|
|
3
3
|
description: Analyze WPILOG log files from FRC robots using the wpilog-parser library with TypeScript.
|
|
4
|
+
license: MIT
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# wpilog-parser
|
|
@@ -9,27 +10,16 @@ WPILOG is the binary log format used by logging libraries in the FRC ecosystem.
|
|
|
9
10
|
|
|
10
11
|
## Creating a project
|
|
11
12
|
|
|
12
|
-
1. Init a project using `
|
|
13
|
+
1. Init a project using `pnpm init` or similar
|
|
13
14
|
2. Add `wpilog-parser` as a dependency
|
|
14
|
-
3.
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
import { readRecords, catalogEntries } from 'wpilog-parser';
|
|
19
|
-
|
|
20
|
-
const bytes = await readFile('./example.wpilog');
|
|
21
|
-
|
|
22
|
-
for (const catalogEntry of catalogEntries(readRecords(bytes))) {
|
|
23
|
-
console.log(catalogEntry);
|
|
24
|
-
// {
|
|
25
|
-
// entryId: 3,
|
|
26
|
-
// name: "/Robot/DogLog/Options",
|
|
27
|
-
// type: "string",
|
|
28
|
-
// metadata: "{\"source\":\"DogLog\"}",
|
|
29
|
-
// }
|
|
30
|
-
}
|
|
15
|
+
3. Catalog the entries in the WPILOG file before deciding what to analyze
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
pnpm wpilog catalog ./example.wpilog
|
|
31
19
|
```
|
|
32
20
|
|
|
21
|
+
The default output is plaintext. Use `--json`, `--jsonl`/`--ndjson`, or `--csv` when another format is more useful.
|
|
22
|
+
|
|
33
23
|
## Analyzing logs
|
|
34
24
|
|
|
35
25
|
Use `decodeRecords` to parse record contents. Filter by `name` and narrow on `type`:
|