{"id":30809586,"url":"https://github.com/inspiaaa/trailsmith","last_synced_at":"2025-10-07T08:29:20.402Z","repository":{"id":312411347,"uuid":"1043219331","full_name":"Inspiaaa/Trailsmith","owner":"Inspiaaa","description":"A fast and lightweight CLI toolkit for processing and transforming GPX files, built in Rust.","archived":false,"fork":false,"pushed_at":"2025-08-30T11:20:05.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-30T13:18:51.248Z","etag":null,"topics":["cli","gps","gpx","kml","merge","ramer-douglas-peucker","rust","simplification"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Inspiaaa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-23T11:43:28.000Z","updated_at":"2025-08-30T11:20:08.000Z","dependencies_parsed_at":"2025-08-30T13:19:03.345Z","dependency_job_id":"47ad080d-a8cf-4d65-aee8-8b050a549481","html_url":"https://github.com/Inspiaaa/Trailsmith","commit_stats":null,"previous_names":["inspiaaa/trailsmith"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Inspiaaa/Trailsmith","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspiaaa%2FTrailsmith","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspiaaa%2FTrailsmith/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspiaaa%2FTrailsmith/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspiaaa%2FTrailsmith/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Inspiaaa","download_url":"https://codeload.github.com/Inspiaaa/Trailsmith/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Inspiaaa%2FTrailsmith/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278742888,"owners_count":26037915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","gps","gpx","kml","merge","ramer-douglas-peucker","rust","simplification"],"created_at":"2025-09-06T04:46:58.651Z","updated_at":"2025-10-07T08:29:20.382Z","avatar_url":"https://github.com/Inspiaaa.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLI GPX Tools\n\nTrailsmith is a collection of lightweight, fast, and easy-to-use command-line utilities for processing and transforming GPX files, built with Rust. Whether you're cleaning up GPS data, converting formats, or optimizing tracks, Trailsmith helps you streamline your GPX workflows with minimal effort.\n\nAll tools are available through a unified command-line interface via subcommands. Alternatively, you can build and use each tool independently by compiling from source.\n\n## Usage\n\n```\nUsage: trailsmith.exe \u003cCOMMAND\u003e\n\nCommands:\n  clean             Fix encoding errors, remove metadata and features, change track names\n  reduce-points     Reduce the number of points in tracks\n  gpx-to-kml        Convert a GPX file to KML format\n  kml-to-gpx        Convert a KML file to GPX format\n  reverse-tracks    Reverse the order of track points in all tracks\n  routes-to-tracks  Convert GPX routes into tracks\n  minify            Minify a GPX file by removing whitespace to reduce the file size\n  merge-files       Merge multiple GPX files into a single file\n  merge-tracks      Merge all tracks within a GPX file\n  split-file        Split waypoints, tracks, and routes from a GPX file into separate files\n  info              Print summary stats and metadata from GPX tracks, routes, and waypoints\n  help              Print this message or the help of the given subcommand(s)\n\nOptions:\n  -h, --help  Print help\n```\n\n### Building from Source\n\nTo build Trailsmith from source, ensure you have [Rust and Cargo](https://www.rust-lang.org/tools/install) installed.\n\n```bash\ncargo build --release\n```\n\nThis will generate:\n- A single CLI binary (`trailsmith`) with all subcommands\n- Individual executables for each tool, e.g. `gpx_reduce_points.exe`\n\n## Examples\n\n### Reducing Track Point Count\n\n**Example:** Reduce the point count of each track to 500 points:\n\n```\nmkdir simplified\n./trailsmith.exe my_gpx_file.gpx -o ./simplified -n 500\n```\n\nYou can specify either an output folder or an exact path (including filename) for the output file.\n\n**Help:**\n\n```\nReduce the number of points in tracks\n\nUsage: trailsmith.exe reduce-points [OPTIONS] --output \u003cOUTPUT\u003e --points \u003cMAX_POINTS\u003e \u003cINPUT\u003e\n\nArguments:\n  \u003cINPUT\u003e\n          Input GPX file\n\nOptions:\n  -o, --output \u003cOUTPUT\u003e\n          Output GPX file path\n\n  -n, --points \u003cMAX_POINTS\u003e\n          Max point count per track\n\n  -i, --iterations \u003cMAX_ITERATIONS\u003e\n          Max solver iterations\n\n          [default: 20]\n\n  -a, --algorithm \u003cALGORITHM\u003e\n          Simplification algorithm\n\n          Possible values:\n          - rdp: Ramer-Douglas-Peucker\n          - vw:  Visvalingam-Whyatt\n\n          [default: rdp]\n\n  -e, --epsilon \u003cEPSILON\u003e\n          Initial epsilon value for simplification\n\n  -q, --quiet\n          Quiet: Disable logging\n\n  -h, --help\n          Print help (see a summary with '-h')\n```\n\n### Converting GPX --\u003e KML\n\n**Example:**\n\n```\n./trailsmith.exe gpx-to-kml my_gpx_file.gpx\n```\n\nYou can specify either an output folder or an exact path (including filename) for the output file.\n\n**Help:**\n\n```\nConvert a GPX file to KML format\n\nUsage: trailsmith.exe gpx-to-kml [OPTIONS] \u003cINPUT\u003e\n\nArguments:\n  \u003cINPUT\u003e  Input GPX file\n\nOptions:\n  -o, --output \u003cOUTPUT\u003e     Output KML file / directory path\n  -q, --quiet               Quite: Disable logging\n  -c, --color \u003cLINE_COLOR\u003e  Line color. Remember to include the alpha value at the end [default: #FF4136FF]\n  -w, --width \u003cLINE_WIDTH\u003e  Line width [default: 1.0]\n  -h, --help                Print help\n```\n\n### Cleaning GPX Files\n\n**Features:**\n- Remove non-ASCII chars\n- Remove metadata and unwanted fields\n- Easily rename tracks\n\n**Example:** Convert to ASCII, but keep all information:\n\n```\n./trailsmith.exe clean my_gpx_file.gpx -o clean.gpx\n```\n\n**Example:** Removing all metadata:\n\n```\n./trailsmith.exe clean my_gpx_file.gpx -o clean.gpx --set-creator \"Inspiaaa\" --set-version 1.1 --remove-metadata --remove-track-metadata --remove-track-point-metadata --remove-route-metadata --remove-route-point-metadata\n```\n\n**Example:** Removing routes and waypoints:\n\n```\n./trailsmith.exe clean my_gpx_file.gpx -o clean.gpx --remove-routes --remove-waypoints\n```\n\n**Example:** Removing elevation data:\n\n```\n./trailsmith.exe clean my_gpx_file.gpx -o clean.gpx --remove-track-elevation --remove-route-elevation\n```\n\n**Example:** Renaming all tracks: Interactively asks you for a new name for each track:\n\n```\n./trailsmith.exe clean my_gpx_file.gpx -o clean.gpx --rename-tracks\n```\n\nExample console output during rename operation:\n\n```\nRename tracks:\n[Track 1 of 3]:\n  Current name: 'TET-ALBANIA-Section 1-20191214'\n  Enter new name (or press Enter to keep original):\n  \u003e\u003e Section 1\n[Track 2 of 3]:\n  Current name: 'TET-ALBANIA-Section 2-20191214'\n  Enter new name (or press Enter to keep original):\n  \u003e\u003e Section 2\n[Track 3 of 3]:\n  Current name: 'TET-ALBANIA-Wet detour-20191214'\n  Enter new name (or press Enter to keep original):\n  \u003e\u003e Section 3\n```\n\n**Help:**\n\n```\nFix encoding errors, remove metadata and features, change track names\n\nUsage: trailsmith.exe clean [OPTIONS] --output \u003cOUTPUT\u003e \u003cINPUT\u003e\n\nArguments:\n  \u003cINPUT\u003e\n          Input GPX file path\n\nOptions:\n  -o, --output \u003cOUTPUT\u003e\n          Output GPX file path\n\n  -q, --quiet\n          Quiet: Disable logging\n\n  -e, --encoding \u003cENCODING\u003e\n          Output file encoding\n\n          [default: ascii]\n          [possible values: utf8, ascii]\n\n  -s, --strategy \u003cSTRATEGY\u003e\n          Strategy for dealing with non-ASCII characters\n\n          Possible values:\n          - ignore:  Ignores non-ASCII characters\n          - replace: Converts non-ASCII characters to '?'\n\n          [default: ignore]\n\n      --set-creator \u003cSET_CREATOR\u003e\n          Set the \"creator\" field (software / person who made the GPX file)\n\n      --set-version \u003cSET_VERSION\u003e\n          Set the GPX file format version\n\n          Possible values:\n          - 1.1: Version 1.1\n          - 1.0: Version 1.0\n\n          [default: 1.1]\n\n      --rename-tracks\n          Interactively rename each track\n\n      --remove-waypoints\n          Remove all waypoints\n\n      --remove-tracks\n          Remove all tracks\n\n      --remove-routes\n          Remove all routes\n\n      --remove-metadata\n          Remove all \"general\" GPX metadata\n\n      --remove-track-metadata\n          Remove all general metadata (except for the name) from each track\n\n      --remove-route-metadata\n          Remove all general metadata (except for the name) from each route\n\n      --remove-track-point-metadata\n          Remove the metadata from each point of each track, only keeping lon, lat, and elevation\n\n      --remove-route-point-metadata\n          Remove the metadata from each point of each route, only keeping lon, lat, and elevation\n\n      --remove-track-elevation\n          Remove the elevation data from each track point\n\n      --remove-route-elevation\n          Remove the elevation data from each route point\n\n  -h, --help\n          Print help (see a summary with '-h')\n```\n\n### Additional Tools\n\nFor more information on the additional tools provided by the CLI suite, please consult the `--help`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finspiaaa%2Ftrailsmith","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finspiaaa%2Ftrailsmith","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finspiaaa%2Ftrailsmith/lists"}