# trackme Command-line tool for uploading activity logs to platforms like Intervals.icu and Strava. ## Quickstart ```text $ trackme upload --name "My Activity" activity.fit [intervals.icu] upload finished (ID i12345) [strava ] upload finished (ID 12345) ``` ## Installation To install `trackme`, you need Rust 1.70.0 or later. Download the source code for the latest release and compile it with: ```text $ git clone https://codeberg.org/robink/trackme.git $ cd trackme $ git checkout stable $ cargo build --release ``` It is recommended to verify the OpenPGP signature of the release before compiling and installing it: ``` $ git verify-commit stable ``` All releases should be signed with the key [`EC7E F0F9 B681 4C24 6236 3842 B755 6972 702A FD45`][openpgp-key]. [openpgp-key]: https://pgp.ireas.org/EC7EF0F9B6814C2462363842B7556972702AFD45.txt Alternatively, you can install `trackme` directly from crates.io: ```text $ cargo install --locked trackme ``` ## Usage ### Commands The main command is `upload`. It uploads an activity file – typically in the FIT, GPX or TCX format – to one or more tracking platforms. Per default, it uploads to all supported platforms. You can select the platforms with the `--platforms` option. Use the `--name` option to override the activity name that is generated by the platform. ```text $ trackme upload activity.fit [intervals.icu] upload finished (ID i12345) [strava ] upload finished (ID 12345) $ trackme upload --name "My Activity" activity.fit [intervals.icu] upload finished (ID i12345) [strava ] upload finished (ID 12345) $ trackme upload --platforms strava --name "My Strava Activity" activity.fit [strava] upload finished (ID 12345) ``` ### Configuration `trackme` tries to load its configuration from one of the following files: - `${XDG_CONFIG_HOME}/trackme/config.toml` (default: `~/.config/trackme/config.toml`) - `${dir}/trackme/config.toml` for `dir` in `XDG_CONFIG_DIRS` (default: `/etc/xdg/trackme/config.tml`) Alternatively, the path to the config file can be set using the `--config` option. [`config.toml`](./config.toml) is an example configuration file that describes the available settings. All settings can also be passed as command-line arguments. Use the `--help` option to list the available arguments. [xdg-basedir]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html ### Platforms The following sections describe how to set up the supported platforms so that you can upload your activities. It is recommended to use the [configuration file](#configuration) for the required settings, but you can also use CLI arguments instead. #### Intervals.icu To upload to [Intervals.icu][], you need the athlete ID and API key from *Settings* → *Developer Settings*. [Intervals.icu]: https://intervals.icu CLI: ```text $ trackme --intervals-icu-athlete-id i12345 --intervals-icu-api-key secret-string ... ``` Configuration: ```toml [platform.intervals_icu] athlete_id = "i12345" api_key = "secret-string" ``` #### Strava To upload to [Strava][], you first need to create an API application in *Settings* → *My API Application*, as described in the [Strava Developer documentation][strava-api]. Then configure `trackme` with the client ID and secret for your API application. [Strava]: https://strava.com [strava-api]: https://developers.strava.com/docs/getting-started/#account CLI: ```text $ trackme --strava-client-id 12345 --strava-client-secret secret-string ... ``` Configuration: ```toml [platform.strava] client_id = 12345 client_secret = "secret-string" ``` Before you can upload activities to Strava, you need to authorize the application for your account using the `strava login` command. It will print a URL that you have to open in a web browser (or use the `--open` option to open it automatically). Login to your Strava account and authorize the application. You will be redirected to a `localhost` URL. Copy that URL and paste it to the `strava login` command. ```text $ trackme strava login --open ``` This generates an access token for accessing the Strava API and a refresh token to renew the access token if it expires. To keep track of these tokens, `trackme` will generate the file `${XDG_STATE_HOME}/trackme/strava.toml` (default: `~/.local/state/trackme/strava.toml`). ## Contact For bug reports, feature requests and other messages, please [open an issue][] for the Codeberg.org project. [open an issue]: https://codeberg.org/robink/trackme/issues ## License This project is licensed under the [GNU General Public License, Version 3.0][GPL-3.0] or later. The documentation and examples contained in this repository are licensed under the [Creative Commons Zero][CC0] license. For more information, see the license header in each file. You can find a copy of the license texts in the `LICENSES` directory. `trackme` complies with [version 3.0 of the REUSE specification][reuse]. [GPL-3.0]: https://www.gnu.org/licenses/gpl-3.0.html [CC0]: https://creativecommons.org/publicdomain/zero/1.0/ [reuse]: https://reuse.software/practices/3.0/