Template Creation Process
To generate a personalized template, follow these steps:
- Access the Settings tab.
- Navigate to the Templates section.
- Specify the desired output utilizing the provided variables.
- Execute the Obsidian Command
append-currently-playing-track-using-template
orappend-currently-playing-episode-using-template
(Hotkeys configuration is also an option). - Your note will display the customized template, populating information sourced from Spotify.
info
Note: This plugin is built around the currently playing track and may not retrieve all available data. If there are missing elements, you can request them through a Github Issue. Starting v1.2.0 it supports both track and episode.
Available Variables for Songs
{{ song_name }}
{{ song_link }}
{{ album }}
{{ album_release }}
{{ album_cover_large }}
{{ album_cover_medium }}
{{ album_cover_small }}
{{ album_cover_link_large }}
{{ album_cover_link_medium }}
{{ album_cover_link_small }}
{{ album_link }}
{{ artists }}
{{ timestamp }}
=> This one prints the current datetime
Available Variables for Podcasts
{{ episode_name }}
{{ episode_link }}
{{ description }}
{{ duration_ms }}
{{ audio_preview_url }}
{{ episode_cover_large }}
{{ episode_cover_medium }}
{{ episode_cover_small }}
{{ episode_cover_link_large }}
{{ episode_cover_link_medium }}
{{ episode_cover_link_small }}
{{ release_date }}
{{ show_name }}
{{ publisher }}
{{ show_description }}
{{ show_link }}
{{ total_episodes }}
{{ timestamp }}"
=> This one prints the current datetime
Notes
- This template automatically inserts a double line break (
\n\n
) at the end of your template. - Utilize Markdown to define your template.
- The plugin does not filter or sanitize your inputs.
Examples
Text:
'{{ song_name }}' by {{ artists }} from {{ album }} released in {{ album_release }}\n{{ timestamp }}
**Song Name:** {{ song_name }}
**Song URL:** {{ song_link }}
**Album Name:** {{ album }}
**Album Release Date:** {{ album_release }}
**Album URL:** {{ album_link }}
**Cover:** {{ album_cover_medium }}
**Cover URL:** {{ album_cover_link_medium }}
**Artists:** {{ artists }}
**Added at:** _{{ timestamp }}_
Table:
| {{ song_name }} | {{ artists }} | {{ album }} | {{ album_release }} | {{ timestamp }} |
Outside the template you can define a header to generate a Markdown Table, like this:
| Song | Artists | Album | Album Release Date | Added at |
| ---- | ------- | ------ | ------------------ | -------- |
CSV:
{{ song_name }};{{ artists }};{{ album }};{{ album_release }};{{ timestamp }};
**Episode Name:** {{ episode_name }}
**Description:** {{ description }}
**Added at:** _{{ timestamp }}_