Git Product home page Git Product logo

fitbit-obsidian-templater-script's Introduction

Fitbit Activity in Obsidian

What is it?

This is a user script for the Templater Obsidian plugin. The script will connect to the fitbit API to fetch all your activity for a given day and format it as markdown.

If you like this script, please consider buying me a coffee.

How do I use this?

  1. Download the script here.
  2. Put the script in your templater script directory.
  3. Edit the DIR variable in the script to point to a folder of your choice relative to the obsidian vault root folder (the default folder is misc). If this folder does not yet exist it will be created when the user script is being run for the first time. The file "fibit.json" will be created inside it.
  4. Create a templater template with the following content: <% tp.user.fitbit(tp.file.creation_date()) %>
  5. Run the templater script (by inserting the template to an existing file) to create the "fitbit.json" file. The error message is expected behavior and can be ignored.
  6. Go to tiim.ch/fitbit-oauth2-token/ and follow the instructions to get your fitbit authentication code.
  7. Edit the file "fibit.json" with a text editor and replace its content with the JSON document given in the step above.
  8. Run the templater script again, the file "fitbit.json" will be updated and your activities of the day will be inserted to the note.

Example of data returned from the script

Fitness

πŸ•° Start Time:: 16:40 πŸ€Έβ€β™‚οΈ Sport:: Fitness πŸ“ Time:: 37 ⏱️ Distance:: πŸ’“ Heartrate:: 110 ✨ Motivation::

<enter the fitness plan here>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.