Workout Planner

approved

by Rares Spatariu

Visualize workout data with interactive charts and advanced search capabilities.

11 stars1,410 downloadsUpdated 7d ago0BSD
View on GitHub

Workout Planner Plugin

Version Obsidian License

A comprehensive plugin for Obsidian that visualizes workout data with interactive charts, tables, and timers. Store your logs in a single CSV file and get beautiful visualizations, progress tracking, and duration estimation directly inside your notes.

Quick Start

Go to Settings → Workout Planner and click Create examples to generate a demo folder with sample workout data and notes showcasing all plugin features — charts, tables, timers, and dashboards.


Features

  • Interactive Charts — Volume, weight, reps, duration, distance, pace, heart rate via Chart.js
    • Smart formatting: duration as 1h 30m, pace as 5:30 min/km
    • Trend lines with inverted logic for pace (lower = faster = improving)
  • Data Tables — Sortable logs with edit/delete, protocol badges, progressive overload targets
  • Workout Timers — Countdown, interval, and stopwatch with presets and audio notifications
  • Workout Dashboard — Stats, muscle heat map, recent workouts, volume analytics, protocol effectiveness
  • Quick Log — Touch-friendly modal for fast logging with recent exercises and weight adjustment buttons
  • Protocol Tracking — Custom training techniques (drop sets, supersets, myo-reps, etc.) with badge display
  • Duration Estimation — Compare actual vs. estimated workout duration
  • Canvas Export — Visualize workout structure on Obsidian Canvas
  • Dynamic Exercise Types — Strength, Cardio, Flexibility with custom field definitions
  • Exercise Conversion — Convert exercises between types with field mapping
  • Custom Muscle Tags — Map tags in any language to canonical muscle groups
  • Dataview Integration — Public API for querying logs and stats from Dataview queries
  • Templater Integration — Use workout data in templates
  • Responsive Design — Works on desktop and mobile

Volume Trend


Usage

Commands

Access via Command Palette (Ctrl/Cmd + P):

CommandDescription
Create CSV log fileInitialize the CSV file for storing workout logs
Insert workout chartInsert a workout-chart code block
Insert workout tableInsert a workout-log code block
Insert workout timerInsert a workout-timer code block
Insert workout dashboardInsert a workout-dashboard code block
Insert workout durationInsert a workout duration estimator code block
Create exercise pageCreate a new exercise page
Create exercise sectionAdd an exercise block to a note
Add exercise blockInsert an exercise block with autocomplete
Export workout to canvasExport workout data to Obsidian Canvas
Convert exerciseConvert exercise logs from one type to another
Manage muscle tagsOpen the muscle tag manager
Generate tag referenceCreate a reference note for all available muscle tags
Audit exercise namesScan vault for exercise name inconsistencies

Code Blocks

Embed charts, tables, timers, and dashboards directly in your notes using code blocks.

workout-chart

exercise: Squat
type: volume
dateRange: 30
showTrendLine: true
showStats: true
height: 400

Parameters:

ParameterTypeDefaultDescription
exercisestringExercise name to filter
typestringvolumevolume, weight, reps, duration, distance, pace, heartRate
chartTypestringexerciseGroup by: exercise, workout, combined, all
dateRangenumber30Days to include
showTrendLinebooleantrueDisplay trend line
showStatsbooleanfalseShow avg/max/min stats box
exactMatchbooleanfalseExact vs. fuzzy exercise name matching
heightnumber400Chart height in pixels
titlestringCustom chart title
limitnumberMaximum number of data points

Pace charts: trend logic is inverted — decreasing pace (faster) = Improving (green), increasing pace (slower) = Declining (red).

workout-log

exercise: Bench Press
exactMatch: false
dateRange: 14
sortBy: date
sortOrder: desc
limit: 50

Parameters:

ParameterTypeDefaultDescription
exercisestringExercise name to filter
exactMatchbooleantrueExact vs. fuzzy matching
dateRangenumberDays to include
sortBystringdatedate, exercise, weight, reps, volume
sortOrderstringdescasc or desc
limitnumber50Maximum rows to display
columnsarrayallVisible columns, e.g. ["date","reps","weight"]

workout-timer

type: countdown
duration: 90
rounds: 3
sound: true
preset: rest

Parameters:

ParameterTypeDefaultDescription
typestringcountdownTimer mode: countdown, interval, stopwatch
durationnumber30Duration in seconds (countdown/interval)
roundsnumber1Number of rounds (interval mode)
soundbooleanfalsePlay audio on completion
showControlsbooleantrueShow play/pause/reset buttons
presetstringUse a saved preset by name (overridden by explicit params)

workout-dashboard

No parameters — renders the full dashboard with all widgets.


Settings

Setup & data

SettingDescription
CSV log file pathFolder where workout_logs.csv and muscle-tags.csv are stored
Exercise folder pathPath to the folder containing exercise pages
Weight unitkg or lb — affects all views and new log defaults
Setup CSV filesCreates both CSV files in the configured folder
Generate example dataCreates a demo folder with sample workouts

Mobile logging

SettingDescription
Default exact matchWhen enabled, exercise filtering uses exact name matching by default
Quick weight incrementWeight step for +/- buttons in create/edit log modals (e.g., 2.5)

Timer presets

Save reusable timer configurations (countdown, interval, stopwatch) with name, duration, rounds, sound, and controls settings. Set a default preset for new timers.

Custom protocols

Define custom training techniques beyond the built-in ones. Each protocol has a name, abbreviation (max 3 chars), and badge color. Protocols appear as badges in tables and dashboard widgets.

Training parameters

SettingDescription
Weight incrementDefault weight step for progressive overload suggestions
Duration per repetitionSeconds per rep — used when rep count is known
Default reps per setAssumed reps when not specified (0 = use fallback set duration)
Fallback set durationSeconds per set when reps are not available (default: 45s)

Advanced

SettingDescription
Exercise block templateTemplate inserted when creating exercise blocks via modal
Run all maintenanceRuns migration tasks (block IDs, exercise type upgrades)

Custom Muscle Tags

Map custom tags (in any language) to canonical muscle groups for the heatmap and exercise categorization.

Tag Manager

Open via Command Palette → Workout: Manage muscle tags. Supports add, edit, delete, search, and fuzzy duplicate detection.

CSV Format

Tags are stored in muscle-tags.csv alongside your workout log:

tag,muscleGroup
petto,chest
schiena,back
spalle,shoulders

Canonical Muscle Groups

chest, back, shoulders, biceps, triceps, quads, hamstrings, glutes, calves, abs, core, forearms, traps, rear_delts


Data Format

All workout logs are stored in a single CSV file:

date,exercise,reps,weight,volume,origine,workout,timestamp,notes,protocol
ColumnDescription
dateISO 8601 datetime (YYYY-MM-DDTHH:mm:ss.sssZ)
exerciseExercise name
repsRepetitions
weightWeight used
volumeCalculated volume (reps × weight)
origineSource or workout routine (supports Obsidian links)
workoutWorkout name
timestampUnique entry identifier (ms since epoch)
notesOptional notes
protocolTraining protocol (e.g., drop_set, standard)

Custom exercise types add extra columns automatically (e.g., duration, distance, pace).

Example

date,exercise,reps,weight,volume,origine,workout,timestamp,notes,protocol
2025-01-17T10:30:00.000Z,Bench Press,8,100,800,[[Push Day]],Workout A,1737138600000,,standard
2025-01-17T10:35:00.000Z,Squat,10,80,800,[[Leg Day]],Workout A,1737138900000,,standard

Dataview Integration

The plugin exposes window.WorkoutPlannerAPI for use in Dataview queries and other plugins.

Methods

getWorkoutLogs(filter?)

const logs = await WorkoutPlannerAPI.getWorkoutLogs({
  exercise: "Squat", // partial match, case-insensitive
  workout: "Push Day",
  dateRange: { start: "2025-01-01", end: "2025-01-31" },
  protocol: "drop_set",
  exactMatch: false,
});

Returns: date, exercise, reps, weight, volume, workout, notes, timestamp, protocol

getExerciseStats(exercise)

const stats = await WorkoutPlannerAPI.getExerciseStats("Bench Press");
// { totalVolume, maxWeight, prWeight, prReps, prDate, totalSets,
//   averageWeight, averageReps, lastWorkoutDate, trend }

getExercises(filter?)

const exercises = await WorkoutPlannerAPI.getExercises({
  tag: "chest",
});

Examples

Recent logs table:

const logs = await WorkoutPlannerAPI.getWorkoutLogs({
  exercise: "Squat",
  dateRange: { start: "2025-01-01" }
});
dv.table(
  ["Date", "Reps", "Weight", "Volume"],
  logs.map(l => [l.date.split("T")[0], l.reps, l.weight + " kg", l.volume])
);

Exercise PR:

const stats = await WorkoutPlannerAPI.getExerciseStats("Bench Press");
dv.paragraph(`**PR:** ${stats.prWeight} kg × ${stats.prReps} reps (${stats.prDate})`);

Weekly volume:

const logs = await WorkoutPlannerAPI.getWorkoutLogs({
  dateRange: {
    start: moment().subtract(7, "days").format("YYYY-MM-DD"),
    end: moment().format("YYYY-MM-DD")
  }
});
const volume = logs.reduce((sum, l) => sum + l.volume, 0);
dv.paragraph(`**This week:** ${volume.toLocaleString()} kg total volume`);

The API is available after the plugin loads. Access as WorkoutPlannerAPI or window.WorkoutPlannerAPI.


Translations

⚠️ All translations except English are generated via AI (LLM-based machine translation). Some may contain errors or unnatural phrasing. Feel free to open an issue or PR with corrections.


Third-Party Libraries


License

MIT License — see LICENSE for details.

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.