Supertags in Obsidian?

Hi there
I’ve just released Metadata menu v0.3 that combines metadata menu capibilities with tags (i’ve named them « supercharged tags » :slightly_smiling_face:)

see the release note below :point_down:. This could be a mvp towards supertags (given what i’ve seen in their videos since I don’t have a tana account yet)

—-

:muscle:t2: Note Supercharged tags: Bind tags with fileClass definition. When you put a supercharged tag anywhere in a note, all fields defined in its fileClass definition are available for this note.
:hatching_chick: Create a supercharged tag: from existing or not yet exisiting tags
:dog::lion::red_car::world_map: Add multiple fileClass and supertags per note: combine fileClass, supercharged tags and fileclass queries to finegrain-grain which metadata fields are available for your note.There’s a priority management If the same field is defined in serveral fileclasses.
:clipboard:New Note’s metadata fields form: access all available metadata fields for your note in a sigle form where you can easily:

  • insert (at cursor or at a chosen section or at the end of the frontmatter section) a field
  • update a field
  • see which fileclass/supertag the field belongs to
  • change the field settings
  • add a new field definition to one of the supercharged tag/fileclass of this note (it will therefore be available for other notes sharing the same supercharged tags and fileclasses)

:sparkles:For notes with a supercharged tag/fileclass definition, a Note’s metadata button will be added right next to the note’s link/tab header/file/backlink/star-result/search-result/… to access the note’s metadata form without opening the note or navigating in the context menu.
:man_artist:t2: The Note’s metadata button icon can be customized in the fileClass definition (from lucide.dev icons set). You can customize where these buttons are displayed or hidden in the settings.
:handshake:When used in combination with the Supercharged links plugin, you get a great understanding of what a note is about and great ease to manipulate its metadata from anywhere in your vault.
:pushpin:Better UX for section choice for “add a field at section” command.
:wrench:Lots of under-the-hood optimization, so if anything work act as expected, don’t hesitate to open an issue in github.
:books:Documentation here: Metadata Menu
:popcorn:Demo here: https://youtu.be/I73uW8fqOZ8

24 Likes

This is really good !!

There are a lot of limitations with supertags in Tana that need to be addressed to meet the high expectations. Let’s let the Tana hype settle.

I have two questions regarding Supercharged Tags:

  • Can they extend a tag (e.g. Guitar and Piano as extensions of Instrument)
  • Is it possible to query attributes under a Supercharged Tag (e.g. incomplete task say in a remarks field under the Guitar supercharged tag across several notes)

Hope you can clarify…

2 Likes

Yes you can extend supertag definition.
In your example, add ˋextends: instrument` in the frontmatter section of the Guitar fileclass note and in the Piano fileclass note

For the query question, this could be achieved with a complex dataviewjs query.
I could add an api method ˋavailableFieldsForFileClassName` that return a list of available fields with their name and type that you can interate on in a dataviewjs query.

4 Likes

Perfect!

I would like to try this. It would be a game changer for me. Though I am not great at coding :frowning:

All very interesting (the video), but it leads to lock-in to the Tana platform. Seems the antithesis of the Obsidian anti-lockin approach.

I collected and reorganized some of the ideas expressed in my post above in a major Feature/Workflow Request for obsidian.

11 Likes

From your lips to the Gods’ ears!

This is really impressive. Thanks for building this!

1 Like

I do the exact same thing for a wide variety of note “types” (e.g. people, organizations, projects, books, articles, etc.). I consider most notes in my vault to be one of these “types.” They typically look something like this:

---
uuid: YYYYMMDDHHMMSS
---

# Person Metadata

Type:: #contacts/people 
Pronunciation:: 
Spouse:: 
Parents:: 
Siblings:: 
Children:: 
Relatives:: 
Organization:: 
Role:: 

===

Content of note

I don’t put this “metadata” in the YAML because it often includes links that I want to be updated should I change the name of a linked note (e.g. I learn a relative’s last name and update the linked note to reflect that).

As the metadata in my vault evolves, I do two things:

  1. I update the existing notes using BBEdit’s Multi-File Regex search and replace. (Over the past year, I’ve become shockingly proficient at writing regular expressions for a guy whose day job is being a pastor.)
  2. I update the template I use to create these notes.

As @andy76 mentions, this is incredibly tedious. @WhiteNoise, Notion’s functionality is incredibly tempting, because it solves these problems. I even toyed around with switching note platforms for this reason. Your product is just way more flexible (and much faster), so I’m unwilling to leave. I hope you develop this feature request that you submitted. A metadata typing system that works at the note level (as opposed to the block level) would be more than sufficient for my workflow, and I imagine others.

@Mat, I noticed that Metadata Menu 0.3.4 adds a command to “bulk insert missing fields.” Is it possible to create a “template” for what these bulk inserted fields look like? (See my example above.) Currently when I use this functionality, it inserts the fields at the selected position reading from the top of the fileClass to the bottom, inserting the fileClass information in essentially the reverse order and skipping anything that’s already included in the note. (See GIF below.)

2022.11.01 at 21.45.29

2 Likes

I didn’t considered the benefit of having auto-update for link attributes if they are in “::” form. It’s a very useful trick :slight_smile:

1 Like

I’ve just saw a plugin (link below) that claim to have tag details for each tags. Is it equivalent to supertags in Tana?

Hi @millerstevew.
In fact it’s inserting them in the right order but always on the same line number (to not override any existing data in the note) and pushing the pervious field inserted one line below. So the result is a reversed order display. I will change the insertion order in the next release to match the order of the fields in the fileClass

What else would you like to customize in the layout of missing fields insertion?

I realize that this is largely aesthetic, but I would love the ability to:

  1. prescribe the order of inserted metadata,
  2. merge the current metadata in a file with the inserted metadata, and
  3. group or offset this metadata from the rest of the note.

I currently achieve #1 and #2 with the MetaEdit and Templater plugins. Using javascript, MetaEdit pulls in the current metadata and Templater inserts it in the proper order. Managing this, however, when I want to make small tweaks to the metadata template is incredibly tedious.

I accomplish #3 by grouping the inserted metadata under a header (in my case an H1 with this format # {{Note Type}} Metadata. This yields the block I mentioned in my previous post.

That said, I recently saw a video by Nicole van der Hoeven where she inserts this metadata between %% (see below). I think there’s a lot of merit to this. Aesthetically, it fades into the background, and it’s not rendered in preview mode or when you hover over links. There’s also the added benefit that metadata exists between characters that aren’t regularly used and easy to search for. (This is part of the reason that I structure notes the way I do. I place additional metadata between a note’s YAML and the rest of the note, separating the two with ===, but I’m tempted to embrace the between %% method instead.)

%%
Type:: #contacts/people 
Pronunciation:: 
Spouse:: 
Parents:: 
Siblings:: 
Children:: 
Relatives:: 
Organization:: 
Role::
%%
1 Like

@Mat Loving the plugin!

Appreciate if you can help with the following:

  • Is there a way to add a field with a fixed value? Say Company is always set to ABC for ABCperson (ABCperson is an extension of person fileClass).
  • How do I make a field choose from other fileClasses? Say attendees will accept multiple values from source all notes that have ABCperson fileClass.

Hi Ashish, thank you for the feedback.
1/ There’s no fixed field available at the moment. Maybe I could add a option to input field “fixed: true, value: xyz”. If these options are set, then inserting this field wouldn’t require to open a modal or something → it would insert the value directly in the note.
If it’s covering your need, could you open an issue on github please?

2/ use MultiFile field for attendees and set the optional Dataview query to dv.pages().where(p => p.fileClass === "ABCperson")

1 Like

Thanks so much for the guidance.

Sure

Works perfectly!

Not at the moment. I’m not sure where the details are stored, but it’s not accessible to the other plugins (DB Folder, Project, etc.).

The idea of giving tags extra info seems really good. If we make these info accessible to the other plugins, we’re gonna have a very clean and efficient version of supertags!

1 Like

I wish there was a plugin where I did not have to program out a dataview query, where i could define supertags and get a structured view of my Obsidian vault similar to how Tana does it.

Did you try the last version of Metadata Menu ? Plugins - Obsidian.

You now have access to a table view of all notes with a fileClass or a tag without having to code any dataview query.
You can also edit all the metadata straight from the table

here are some demo

Metadata Menu 0.3.6 - Fileclass view and Supercharged tags aliases - YouTube (from 2:23)
Metadata Menu 0.3.7 - YouTube

Is this close to what you are looking for?

2 Likes

I’ve been using @Mat ‘s Metadata Menu plugin which is as close to supertags as is possible in Obsidian. I’m glad that he’s built it.

Unless the Obsidian developers improve on the frontmatter fields, the Tana experience will remain superior and so much more efficient. I guess it’s another compromise of using Obsidian.

3 Likes