gpx-from-gopro 0.5.0 → 0.7.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 CHANGED
@@ -20,7 +20,8 @@ No install needed:
20
20
 
21
21
  ```sh
22
22
  npx gpx-from-gopro <dir|file.mp4> [...] [--out DIR] [--tz HOURS] [--rate HZ] [--cache-dir DIR | --no-cache]
23
- [--organize DIR] [--yes] [--html] [--png [--width N] [--height N]]
23
+ [--organize DIR] [--yes] [--mode core|ski]
24
+ [--html] [--png [--width N] [--height N]]
24
25
  ```
25
26
 
26
27
  Once installed (`npm install [-g] gpx-from-gopro`), drop the `npx` prefix and just run
@@ -31,7 +32,9 @@ family) + local date, and writes one merged `<YYYYMMDD>-<family>.gpx` per group
31
32
  split into one `<trkseg>` per recording session (keyed on the filename file-number, with a time-gap
32
33
  split for restarts/dropouts). A per-file extraction cache (keyed by size+mtime+rate) lets a killed
33
34
  run resume without re-extracting. `--rate HZ` downsamples from the native ~18 Hz; `--tz HOURS`
34
- overrides the longitude-guessed local date.
35
+ overrides the longitude-guessed local date. `--mode core|ski` runs each session through
36
+ [`gpx-stabilizer`](https://www.npmjs.com/package/gpx-stabilizer)'s `stabilizeTrack` before writing
37
+ (omit for the raw extraction).
35
38
 
36
39
  ### `--organize DIR` — reorganize the source videos to match the GPX
37
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gpx-from-gopro",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "Extract a GoPro video's GPS telemetry as GPX or render-agnostic TrackPoints (points + meta + timezone + UTC anchor).",
5
5
  "keywords": [
6
6
  "gopro",
@@ -32,7 +32,7 @@
32
32
  "directory": "packages/gopro"
33
33
  },
34
34
  "dependencies": {
35
- "gpx-stabilizer": "^0.5.0",
35
+ "gpx-stabilizer": "^0.7.0",
36
36
  "egm96-universal": "^1.1.1",
37
37
  "gopro-telemetry": "^1.2.11",
38
38
  "gpmf-extract": "^0.3.3",
package/src/gopro-cli.js CHANGED
@@ -41,7 +41,14 @@
41
41
  import { existsSync, mkdirSync, readdirSync, statSync, writeFileSync } from "node:fs";
42
42
  import { basename, join } from "node:path";
43
43
  import { createInterface } from "node:readline/promises";
44
- import { analyzedSvg, MODES, saveGpx, savePng, stabilizeTrack, toHtmlAnalyzedFiles } from "gpx-stabilizer";
44
+ import {
45
+ analyzedSvg,
46
+ MODES,
47
+ saveGpx,
48
+ savePng,
49
+ stabilizeTrack,
50
+ toHtmlAnalyzedFiles,
51
+ } from "gpx-stabilizer";
45
52
  import { buildGroups, family, fileNumber } from "./group.js";
46
53
  import { cacheMovePlan, executeMove, findSidecars, planMove } from "./organize.js";
47
54
  import { readGoproSamples } from "./telemetry.js";
@@ -52,7 +59,16 @@ const LOCAL_TZ = -new Date().getTimezoneOffset() / 60; // hours, may be fraction
52
59
 
53
60
  // ---- args ----
54
61
  const argv = process.argv.slice(2);
55
- const WITH_VALUE = new Set(["out", "tz", "rate", "cache-dir", "organize", "width", "height", "mode"]);
62
+ const WITH_VALUE = new Set([
63
+ "out",
64
+ "tz",
65
+ "rate",
66
+ "cache-dir",
67
+ "organize",
68
+ "width",
69
+ "height",
70
+ "mode",
71
+ ]);
56
72
  const KNOWN_BOOL = new Set(["no-cache", "html", "png", "yes"]);
57
73
  const USAGE =
58
74
  "usage: gpx-from-gopro <dir|file.mp4> [...] [--out DIR] [--tz HOURS] [--rate HZ]" +
@@ -79,7 +95,9 @@ if (inputs.length === 0) {
79
95
  process.exit(1);
80
96
  }
81
97
  if (opts.mode != null && !MODES[opts.mode]) {
82
- console.error(`gpx-from-gopro: unknown --mode "${opts.mode}" (use: ${Object.keys(MODES).join(", ")})\n\n${USAGE}`);
98
+ console.error(
99
+ `gpx-from-gopro: unknown --mode "${opts.mode}" (use: ${Object.keys(MODES).join(", ")})\n\n${USAGE}`,
100
+ );
83
101
  process.exit(1);
84
102
  }
85
103
  const outExplicit = opts.out != null; // --organize only sweeps the .gpx along when this is false