Markdown Converter
Agent skill for markdown-converter
This document orients future agents working on this repository. It explains the purpose, architecture, workflows, and conventions. Treat this as a living document: if anything becomes untrue or you make a substantial change, update this file immediately (see the last section).
Sign in to like and favorite skills
This document orients future agents working on this repository. It explains the purpose, architecture, workflows, and conventions. Treat this as a living document: if anything becomes untrue or you make a substantial change, update this file immediately (see the last section).
GPX Wrench is a Rust CLI for processing GPX (GPS Exchange Format) data via stdin/stdout. It currently offers:
Primary user docs and examples live in
README.md.
Cargo.toml: Crate metadata and dependenciessrc/main.rs: CLI argument parsing and subcommand dispatch using clapsrc/lib.rs: Core types and algorithms (parsing ranges, haversine distance, speed calc, activity detection)src/gpxxml.rs: Streaming GPX read/write helpers using quick-xmlsrc/commands/: Subcommand implementations
trim.rs: Implements the trim subcommandtrim_to_activity.rs: Implements the trim-to-activity subcommandsamples/activity.gpx: Small sample for local testing.github/workflows/ci.yml: CI for fmt, clippy, build, and teststrkpt.extract_track_points returns an in-memory list only when required by algorithms (e.g., activity detection).trim DUR1,DUR2 or TS1,TS2
s, m, h (e.g., 5s,1m).MM:SS or HH:MM:SS (e.g., 00:15,00:45).parse_range, read earliest time via find_minimum_time, then filter with filter_xml_by_time_range.trim-to-activity [-s, --speed-threshold <m/s>] [-b, --buffer <seconds>]
extract_track_points → detect_activity_bounds → filter_xml_by_time_range.src/lib.rs
TrackPoint { lat, lon, time }parse_duration, parse_timestamp, parse_rangehaversine_distance, calculate_speeddetect_activity_bounds(track_points, speed_threshold, buffer_seconds)src/gpxxml.rs
find_minimum_time(input)filter_xml_by_time_range(input, start_time, end_time)filter_xml_by_time_to_writer(input, start_time, end_time, writer)extract_track_points(input)src/commands/
trim::trim_command(range_str)trim_to_activity::trim_to_activity_command(speed_threshold, buffer)cargo buildcargo testcargo fmtcargo clippy -- -D warningsclap, time, quick-xml (see Cargo.toml).src/commands/your_cmd.rs.src/commands/mod.rs.Commands enum and match in src/main.rs.src/gpxxml.rs.README.md with user-facing docs and examples.AGENTS.md with architectural notes and invariants impacted by the change.fmt/clippy/test, ensure CI passes.#[cfg(test)] in src/lib.rs and src/gpxxml.rs).trkptcargo fmt; keep lines reasonably wrapped; avoid unrelated reformatting.clippy warnings (cargo clippy -- -D warnings).Result<_, Box<dyn Error>> from command handlers; avoid panics on malformed input.trkpt contents intact when within range.Vec<TrackPoint>; consider memory implications if expanding features.AGENTS.md in the same pull request.README.md for consistency and update examples.Thank you for keeping this a high-signal guide for future agents.