• Development,  Tech Tips

    Using Dataview with Charts in Obsidian

    Obsidian is my third most used application after Keyboard Maestro and Alfred. I’ve been using the dataview plugin since I got started with Obsidian. It’s an incredible plugin that gives you the ability to treat your notes like database records. In this example I’ll show how I use dataview to make my projects queryable, and then how I use Obsidian-Charts to make some bar charts of this data.

    Using Dataview Variables

    Here’s an example of a Project file in my Obsidian vault:

    Example project file in Obsidian

  • Tech Tips

    Obsidian Daily Note Implementation v2

    Here’s what my current Obsidian Daily Note looks like:

    Example of an Obsidian daily note

    I’m pleased with this, having come from a pretty bland Daily Note setup prior to this. I’ll explain the setup:

    Requirements

    As of July 15, 2022 this only works as expected if you edit in regular source mode, not live preview mode (the live preview won’t show the styling; see https://www.reddit.com/r/ObsidianMD/comments/vz2mw5/comment/ig9g0k9)

    Template File

    I set up the “Daily notes” plugin as follows:

  • Tech Tips

    Correcting Date Tags using sed in an Entire Obsidian Vault

    I’ve been using Obsidian for about 8 months. It wasn’t until today that I realized I’ve been using hierarchical tags incorrectly since day one!

    The Problem

    In my templater templates I was using the following:

    The result of this is:

    Unfortunately there are two problems with this. First, there is no need for that extra tag at the end; it’s already covered by the first combo tag.

    Second, the hierarchy is backwards! This leads to:

    Houston, we have a problem! What I really was after was a tag structure like this:

    The Fix

    Thankfully, Obsidian stores all of the files on the filesystem natively, which means you can manipulate them using whatever tools you’d like.

    Enter sed, a stream editor. Using sed and find, I was able to quickly resolve both of the issues above.

    If I’d taken a little more time I would have handled both problems in one shot, but I did not. I fixed problem 2, then problem 1.

    First, I cd’d into the root directory of my vault. Then…

    Finally, I updated all of my templater templates to drop the second tag and fix the first to be in the right order.

    Obsidian picked up all of the changes immediately, which were reflected in the tag pane. Much cleaner!

    Obsidian Tags