{"id":22866805,"url":"https://github.com/watsonbox/obsidian-strava-sync","last_synced_at":"2025-07-16T21:08:43.261Z","repository":{"id":267837252,"uuid":"855612938","full_name":"watsonbox/obsidian-strava-sync","owner":"watsonbox","description":"Sync Strava activities to your Obsidian vault","archived":false,"fork":false,"pushed_at":"2025-02-15T23:31:16.000Z","size":764,"stargazers_count":16,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-14T00:51:41.562Z","etag":null,"topics":["obsidian","obsidian-md","obsidian-plugin","strava"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/watsonbox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-09-11T06:54:39.000Z","updated_at":"2025-07-06T08:37:29.000Z","dependencies_parsed_at":"2024-12-12T18:51:40.492Z","dependency_job_id":"0e52a4b3-f30f-481e-a1ef-a81ba2877084","html_url":"https://github.com/watsonbox/obsidian-strava-sync","commit_stats":null,"previous_names":["watsonbox/obsidian-strava-sync"],"tags_count":6,"template":false,"template_full_name":"obsidianmd/obsidian-sample-plugin","purl":"pkg:github/watsonbox/obsidian-strava-sync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watsonbox%2Fobsidian-strava-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watsonbox%2Fobsidian-strava-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watsonbox%2Fobsidian-strava-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watsonbox%2Fobsidian-strava-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/watsonbox","download_url":"https://codeload.github.com/watsonbox/obsidian-strava-sync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/watsonbox%2Fobsidian-strava-sync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265540623,"owners_count":23784947,"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","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":["obsidian","obsidian-md","obsidian-plugin","strava"],"created_at":"2024-12-13T12:17:03.682Z","updated_at":"2025-07-16T21:08:43.209Z","avatar_url":"https://github.com/watsonbox.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![GitHub manifest version](https://img.shields.io/github/manifest-json/v/watsonbox/obsidian-strava-sync)\n ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/watsonbox/obsidian-strava-sync/ci.yaml) ![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/watsonbox/obsidian-strava-sync/total)\n\n\n# Obsidian Strava Sync\n\nThis plugin synchronizes activities from [Strava](https://www.strava.com/) into [Obsidian](https://obsidian.md).\n\n- 🗄️ Import [Strava bulk export](https://support.strava.com/hc/en-us/articles/216918437-Exporting-your-Data-and-Bulk-Export#h_01GG58HC4F1BGQ9PQZZVANN6WF) CSV files for historical activities\n- 📅 Sync recent activities from Strava via the [Strava API](https://developers.strava.com/docs/reference/#api-Activities-getLoggedInAthleteActivities)\n- 📝 [Handlebars.js](https://handlebarsjs.com/guide/) templates for imported activities\n- 💿 Customizable properties / front matter allowing for [Obsidian Dataview](https://blacksmithgu.github.io/obsidian-dataview/) integration\n- 🏃 Per-sport icons for use with [Iconize](https://florianwoelki.github.io/obsidian-iconize/)\n\nThe purpose of this plugin is not to provide a data backup, or to replace the functionality of the Strava apps. It's simply to allow activities to be more easily referenced, tracked and visualized within Obsidian, especially through integration with existing plugins like [Obsidian Dataview](https://blacksmithgu.github.io/obsidian-dataview/).\n\n## Examples\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./assets/screenshot_activities_this_month.png\" height=\"295px\" /\u003e\n  \u003cimg src=\"./assets/screenshot_charts_by_activity_type.png\" height=\"295px\" /\u003e\n  \u003cimg src=\"./assets/screenshot_contribution_graph.png\" height=\"295px\" /\u003e\n\u003c/p\u003e\n\nThese are some examples of what can be achieved along with the [Dataview](https://blacksmithgu.github.io/obsidian-dataview/), [Charts](https://charts.phib.ro/Meta/Charts/Charts+Documentation) and [Contribution Graph](https://github.com/vran-dev/obsidian-contribution-graph) plugins. See the [Dataview Integration](#dataview-integration) section below for more ideas.\n\n## Installation\n\nThis plugin is currently in beta testing phase. The recommended installation method is via the [BRAT plugin](https://tfthacker.com/brat-quick-guide#Adding+a+beta+plugin):\n\n1. Install BRAT from the Community Plugins in Obsidian\n2. Open the command palette and run the command \"BRAT: Add a beta plugin for testing\"\n3. Paste `https://github.com/watsonbox/obsidian-strava-sync` into the modal that opens up\n4. Click on Add Plugin 🎉\n\n### Manually installing the plugin\n\nIt's also possible to install the plugin manually:\n\n1. Download the latest release from [the releases page](https://github.com/watsonbox/obsidian-strava-sync/releases).\n2. Copy `main.js`, `styles.css`, and `manifest.json` to your vault's `VaultFolder/.obsidian/plugins/obsidian-strava-sync/` directory.\n\n### Sync Configuration\n\nIn order to configure the plugin, you will need to obtain an access token from Strava. You can do this by going to \"My API Applications\" [here](https://www.strava.com/settings/api) and creating a new application as follows:\n\n![Strava Personal App](./assets/screenshot_strava_personal_app.png)\n\nOnce that's done, copy the Client ID and Client Secret into the plugin settings, and click \"Connect with Strava\". You will be redirected to Strava to login and authorize access. After successful authorization, you will be redirected back to your Obsidian vault and can close the browser window.\n\n## Basic Usage\n\nTypically, once the plugin is enabled and configured, you'll want to set up templates for the activities as you import them. This can be done for the file path, the content itself, and the properties to be added.\n\n### Templating\n\nTemplates can be set up in the plugin settings.\n\nThe default file path template is `Strava/{{start_date}}/{{id}} {{name}}`, which will create a folder for each day, and a file for each activity within that folder for example `Strava/2024-02-20/1234567890 Running with the bears.md`.\n\nThe date formats themselves can also be adjusted in the plugin settings.\n\n\u003e [!TIP]\n\u003e If you prefer to group files differently, that's possible too. For example, create a folder structure like `2024/09-September` (with all September's activities inside) by setting the folder date format to `yyyy/MM-MMMM`.\n\n#### Content\n\nThe default content template is:\n\n```markdown\n# {{name}}\n\n[https://www.strava.com/activities/{{id}}](https://www.strava.com/activities/{{id}})\n{{#if description}}\n\nDescription: {{description}}\n{{/if}}\n{{#if private_note}}\n\n\u003e [!NOTE] Private note\n\u003e {{private_note}}\n{{/if}}\n\n#Strava\n```\n\nThis will produce a file similar to the following:\n\n```markdown\n# Running with the bears\n\n[https://www.strava.com/activities/1234567890](https://www.strava.com/activities/1234567890)\n\nDescription: This is a description\n\n\u003e [!NOTE] Private note\n\u003e This is a private note\n```\n\nThe templating language used is [Handlebars.js](https://handlebarsjs.com/guide/). The available fields are as follows (more info [here](https://developers.strava.com/docs/reference/#api-models-DetailedActivity)):\n\n| Field                 | Example(s)                        | Description                                |\n|-----------------------|-----------------------------------|--------------------------------------------|\n| `id`                  | 1218940553                        | Unique identifier for the activity         |\n| `start_date`          | \"2024-08-28 05:07:43\"             | Start date and time of the activity        |\n| `name`                | \"Dynamo Challenge 2024\"           | Name of the activity                       |\n| `sport_type`          | \"Ride\", \"Run\", \"Swim\", etc.       | Type of sport                              |\n| `description`         | \"Great weather and company\"       | Description of the activity                |\n| `private_note`        | \"Take two inner tubes next time\"  | Private note for the activity              |\n| `elapsed_time`        | 38846                             | Total elapsed time in seconds              |\n| `moving_time`         | 26010                             | Moving time in seconds                     |\n| `distance`            | 154081.0                          | Distance in meters                         |\n| `max_heart_rate`      | 180                               | Maximum heart rate                         |\n| `max_speed`           | 18.8                              | Maximum speed in meters per second         |\n| `average_speed`       | 11.1                              | Average speed in meters per second         |\n| `total_elevation_gain`| 1338.0                            | Total elevation gain in meters             |\n| `elev_low`            | 50.7                              | Lowest elevation in meters                 |\n| `elev_high`           | 60.2                              | Highest elevation in meters                |\n| `calories`            | 1234                              | Calories burned                            |\n| `icon`                | 🚴‍♂️🏃🏊⛷️🏸🛶🏋️🚶🚵⛳🦽🥾\u003cbr\u003e⛸️🛼🏄🏓🧘🧗🚣⛵🛹🏂⚽🎾 | Activity icon         |\n\n#### Properties\n\nFinally, you can also specify any of these fields to be added to the [properties](https://help.obsidian.md/Editing+and+formatting/Properties) / front matter of each imported activity. By default the properties are `name`, `start_date`, `sport_type`, `description`, `private_note`, `elapsed_time`, `moving_time`, `distance`, and `icon`, for example:\n\n```\n---\nid: 1014355555\nname: Evening Run\nstart_date: 2024-06-02T18:31:27.000Z\nsport_type: Run\ndistance: 4372.5\nelapsed_time: 1651\nmoving_time: 1511\ndescription: \"Great run\"\nprivate_note: \"Push it to 10km next time\"\nicon: 🏃\n---\n```\n\nThe property `id` is always added.\n\n### Importing Recent Activities\n\nNext, either by clicking the Strava icon in the [ribbon](https://help.obsidian.md/User+interface/Ribbon) or using the command \"Import new activities from Strava\", the plugin will fetch and import your 30 most recent activities from Strava using the API.\n\nEach time new activities are imported, the start date of the last imported activity is saved. Next time you import new activities, only activities after that date will be imported.\n\n### Importing a Strava Bulk Export\n\nStrava allows you to download your activities as a bulk export as described [here](https://support.strava.com/hc/en-us/articles/216918437-Exporting-your-Data-and-Bulk-Export#h_01GG58HC4F1BGQ9PQZZVANN6WF). This export contains all historical activities. Either in the plugin settings, or by using the \"Import Strava activities from bulk export CSV\" command directly, you can select the `activities.csv` file from the bulk export to import the entire history.\n\n\u003e [!NOTE]\n\u003e Note that the [Strava bulk export CSV format](./assets/activities.csv) is not the same as the [Web API activity format (JSON)](./assets/activity_12271989718.json). This plugin allows both formats to be imported, but some fields that are not common to both formats are not imported.\n\n\u003e [!TIP]\n\u003e You may prefer to exclude imported activities from the Obsidian search and graph views by adding the sync folder to \"Options -\u003e Files and links -\u003e Excluded files\" in the settings.\n\n## Dataview Integration\n\nOnce you've selected the activity attributes you'd like to include as properties, the real power of this plugin comes from the Dataview integration. You can install it through the Community Plugins tab in Obsidian, and then refer to the detailed [documentation](https://blacksmithgu.github.io/obsidian-dataview/) to learn how to use it.\n\nThe following are some examples of what you can do with Dataview and the Strava plugin.\n\n### List all activities with \"knee\" in private note\n\n    ```dataview\n    TABLE WITHOUT id name, dateformat(start_date, \"yyyy-MM-dd\") AS date, private_note\n    FROM \"Apps/Strava\"\n    WHERE icontains(private_note, \"knee\")\n    ```\n\n### List all activities for the current month in a callout\n\n    \u003e [!EXAMPLE] This Month's Activities\n    \u003e\n    \u003e ```dataview\n    \u003e TABLE WITHOUT id\n    \u003e   link(file.path, name) AS Activity,\n    \u003e   dateformat(localtime(start_date), \"yyyy-MM-dd\") AS Date,\n    \u003e   dur(round(elapsed_time/60) + \"m\") as Duration,\n    \u003e   choice(length(private_note) \u003e 0, \"📝\", \"\") AS \"📝\",\n    \u003e   choice(icontains(private_note, \"pain\"), \"🤕\", \"\") AS \"🤕\"\n    \u003e FROM \"Strava\"\n    \u003e WHERE dateformat(start_date, \"yyyy-MM\") = dateformat(date(now),\"yyyy-MM\")\n    \u003e ```\n\n### Show a chart of total distance per year by activity type\n\nUsing DataviewJS gives us much more flexibility, for example the ability to use the [Charts](https://charts.phib.ro/Meta/Charts/Charts+Documentation) plugin to visualize historical activity data.\n\n    ```dataviewjs\n```js\nconst pages = dv.pages('#Strava')\nconst dates = pages.map(p =\u003e p.start_date).values\nconst yearData = {};\n\npages.forEach(page =\u003e {\n  const year = moment(page.start_date.ts).startOf('week').format('YYYY');\n  const ridingDistance = page.sport_type === 'Ride' ? page.distance : 0;\n  const runningDistance = page.sport_type === 'Run' ? page.distance : 0;\n\n  if (!yearData.hasOwnProperty(year)) {\n    yearData[year] = {\n      ridingDistance: 0,\n      runningDistance: 0\n    };\n  }\n\n  yearData[year].ridingDistance += ridingDistance;\n  yearData[year].runningDistance += runningDistance;\n});\n\nconst years = Object.keys(yearData);\nconst ridingDistance = Object.values(yearData).map(data =\u003e data.ridingDistance);\nconst runningDistance = Object.values(yearData).map(data =\u003e data.runningDistance);\n\nconst chartData = {\n  type: 'bar',\n  data: {\n    labels: years,\n    datasets: [\n      {\n        label: '🚴 Riding distance',\n        data: ridingDistance,\n        backgroundColor: [ 'rgba(255, 99, 132, 0.2)' ],\n        borderColor: [ 'rgba(255, 99, 132, 1)' ],\n        borderWidth: 1\n      },\n      {\n        label: '🏃 Running distance',\n        data: runningDistance,\n        backgroundColor: [ 'rgba(54, 162, 235, 0.2)' ],\n    borderColor: [ 'rgba(54, 162, 235, 1)' ],\n        borderWidth: 1\n      }\n    ]\n  }\n}\nwindow.renderChart(chartData, this.container)\n```\n    ```\n\n### Display a contribution heat map with Contribution Graph\n\nNot technically a Dataview integration. This example requires that the [Contribution Graph plugin](https://github.com/vran-dev/obsidian-contribution-graph) first be installed and enabled.\n\n    ```contributionGraph\n    graphType: default\n    dateRangeValue: 365\n    dateRangeType: LATEST_DAYS\n    startOfWeek: \"1\"\n    showCellRuleIndicators: true\n    titleStyle:\n      textAlign: left\n      fontSize: 15px\n      fontWeight: normal\n    dataSource:\n      type: PAGE\n      value: \"#Strava\"\n      dateField:\n        type: PAGE_PROPERTY\n        value: start_date\n      countField:\n        type: PAGE_PROPERTY\n        value: elapsed_time\n    fillTheScreen: false\n    enableMainContainerShadow: false\n    cellStyleRules:\n      - id: Ocean_a\n        color: \"#8dd1e2\"\n        min: 1\n        max: 3600\n      - id: Ocean_b\n        color: \"#63a1be\"\n        min: 3600\n        max: 7800\n      - id: Ocean_c\n        color: \"#376d93\"\n        min: 7800\n        max: 21600\n      - id: Ocean_d\n        color: \"#012f60\"\n        min: 21600\n        max: 100000\n    cellStyle:\n      minWidth: 10px\n      minHeight: 10px\n    ```\n\n## Development Guidelines\n\n- Clone this repo to a local development folder. For convenience, you can place this folder in your `.obsidian/plugins/obsidian-strava-sync` folder.\n- Install NodeJS, then run `yarn install` in the command line under the repo folder.\n- Run `yarn dev` to compile the plugin to `main.js`. Changes should be automatically compiled into `main.js`.\n- Reload Obsidian to load the new version of the plugin.\n- Enable the plugin in the settings window.\n\n### Live Reloading\n\nIn order to avoid reloading Obsidian every time you make a change, you can use the [Hot-Reload plugin](https://github.com/pjeby/hot-reload) as [they suggest](https://docs.obsidian.md/Plugins/Getting+started/Build+a+plugin#Step+5+Update+the+source+code).\n\n### Releasing\n\nRun `yarn version` after updating `minAppVersion` manually in `manifest.json`. The command will bump version in `manifest.json` and `package.json`, and add the entry for the new version to `versions.json`\n\nRun `yarn version`, enter a new version number, then push to build and prepare a draft release on GitHub.\n\n\u003e [!NOTE]\n\u003e You may need to run `yarn config set version-tag-prefix \"\"` before running `yarn version` to ensure the version tag is created correctly.\n\n## Resources\n\n- [Strava Developers - Authentication](https://developers.strava.com/docs/authentication/)\n- [Strava Developers - API Reference](https://developers.strava.com/docs/reference/)\n- [Strava Developers - Getting Started + Auth](https://developers.strava.com/docs/getting-started/)\n- [Strava Developers - Rate limiting](https://developers.strava.com/docs/rate-limits/)\n- [Challenges when Testing Plugins | Obsidian Collection](https://www.moritzjung.dev/obsidian-collection/plugin-dev/testing/challengeswhentestingplugins/)\n- [Obsidian Dataview](https://blacksmithgu.github.io/obsidian-dataview/)\n\n![Powered by Strava](https://cdn.jsdelivr.net/gh/watsonbox/obsidian-strava-sync@latest/assets/api_logo_pwrdBy_strava_horiz_light.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatsonbox%2Fobsidian-strava-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwatsonbox%2Fobsidian-strava-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwatsonbox%2Fobsidian-strava-sync/lists"}