GPS Exchange Format library/CLI in OCaml

README

+55 -53
+55 -53
README.md
··· 3 3 An OCaml library for parsing and generating GPX (GPS Exchange Format) 1.0 and 4 4 1.1 files, and a CLI for common manipulation and query options. 5 5 6 + ## Command Line Usage 7 + 8 + The `mlgpx` CLI provides tools for manipulating GPX files from the command line. 9 + 10 + ### Installation 11 + 12 + ```bash 13 + # Install from source 14 + dune build @install 15 + dune install 16 + 17 + # Or use opam (when published) 18 + opam install mlgpx 19 + ``` 20 + 21 + ### Convert Waypoints to Track 22 + 23 + ```bash 24 + # Basic conversion 25 + mlgpx convert waypoints.gpx track.gpx 26 + 27 + # With custom track name 28 + mlgpx convert --name "My Route" waypoints.gpx route.gpx 29 + 30 + # Sort waypoints by timestamp before conversion 31 + mlgpx convert --sort-time waypoints.gpx sorted_track.gpx 32 + 33 + # Sort by name and preserve original waypoints 34 + mlgpx convert --sort-name --preserve waypoints.gpx mixed.gpx 35 + 36 + # Verbose output with description 37 + mlgpx convert --verbose --desc "Generated route" waypoints.gpx track.gpx 38 + ``` 39 + 40 + ### File Analysis 41 + 42 + ```bash 43 + # Basic file information 44 + mlgpx info file.gpx 45 + 46 + # Detailed analysis with waypoint details 47 + mlgpx info --verbose file.gpx 48 + ``` 49 + 50 + ### Help 51 + 52 + ```bash 53 + # General help 54 + mlgpx --help 55 + 56 + # Command-specific help 57 + mlgpx convert --help 58 + mlgpx info --help 59 + ``` 60 + 6 61 ## Architecture Overview 7 62 8 63 The library is split into four main components: ··· 229 284 let () = create_simple_gpx () 230 285 ``` 231 286 232 - ## Command Line Usage 233 287 234 - The `mlgpx` CLI provides tools for manipulating GPX files from the command line. 235 - 236 - ### Installation 237 - 238 - ```bash 239 - # Install from source 240 - dune build @install 241 - dune install 242 - 243 - # Or use opam (when published) 244 - opam install mlgpx 245 - ``` 246 - 247 - ### Convert Waypoints to Track 248 - 249 - ```bash 250 - # Basic conversion 251 - mlgpx convert waypoints.gpx track.gpx 252 - 253 - # With custom track name 254 - mlgpx convert --name "My Route" waypoints.gpx route.gpx 255 - 256 - # Sort waypoints by timestamp before conversion 257 - mlgpx convert --sort-time waypoints.gpx sorted_track.gpx 258 - 259 - # Sort by name and preserve original waypoints 260 - mlgpx convert --sort-name --preserve waypoints.gpx mixed.gpx 261 - 262 - # Verbose output with description 263 - mlgpx convert --verbose --desc "Generated route" waypoints.gpx track.gpx 264 - ``` 265 - 266 - ### File Analysis 267 - 268 - ```bash 269 - # Basic file information 270 - mlgpx info file.gpx 271 - 272 - # Detailed analysis with waypoint details 273 - mlgpx info --verbose file.gpx 274 - ``` 275 - 276 - ### Help 277 - 278 - ```bash 279 - # General help 280 - mlgpx --help 281 - 282 - # Command-specific help 283 - mlgpx convert --help 284 - mlgpx info --help 285 - ```