Zettelkasten Forum


Tag Globbing

Several hours into tracking down an usually (chuckle or abysmally) subtle glitch in an attempt to squash a bug in some newly coded[1] regex[2] routines, I've hit on a quite nifty idea...

Tag Globbing[3]

Here's the scoop: Imagine a tag labeled 'books', yeah I know, no big deal, but there's more to it than that hear me out... Now imagine that same tag retitled 'books/fiction' & now I'm thinking about virtualized pathways for tags & the plot thickens. Lets create some more...

tags: books/fiction/the grapes of wrath

tags: books/science/outline of history/my-notes

tags: books/travelogue/wind sand & stars

Now, if you recall I'd noted earlier I was (yes 'was' the issue is fixed) wrestling with a regex/wildcard issue when bam! the idea came to me: paths for tags that can expand via wildcard & globbing. An example...

books, books/, books/*    # all return tag-path books/
books/fiction             # returns all tags within tag-path books/fiction
books/*/wind sand & stars # returns the 'relative path' for wind sand & stars 

Lots more wildcard patterns too... Of course there are no folders or directories, its simply a construct mapped onto the tags providing not only a method of grouping context, but a nested hierarchy or a taxonomy if you like.

Well, got to run for now.

  1. https://forum.zettelkasten.de/discussion/comment/16825/#Comment_16825
  2. https://en.wikipedia.org/wiki/Regular_expression
  3. https://en.wikipedia.org/wiki/Glob_(programming)

Comments

  • edited December 2022

    This one is where things get interesting in taxonomies:

    books/*/wind sand & stars # returns the 'relative path' for wind sand & stars 
    

    Replacing the * with a regex that would match properly shouldn't be too hard, no?

    -- but! This is purely interesting from a technical perspective, I need to add, because my personal experience with taxonomies of this sort broke down in my bookmarks almost 10 years ago, adopting a fancy tagging pattern (of Flickr origin IIRC) where tags were separated by : instead of /.

    It broke down for the same reason that strict categories hamper instead of enhance a Zettelkasten: you will run into the problem of figuring out where to put something, and then you maybe want 'multiple storage', but that's where my taxonomies revealed their problem: book:inspiration wasn't any better than combining search for the tags book+inspiration, and it combined better than book:inspiration next to website:inspiration next to architecture:inspiration etc.

    It's also a human error on my part, of course: I shouldn't have created these subcategories. Arguably, architecture:brutalism would make sense and point to a distinct sub-topic or architecture, while architecture:inspiration is just tagging used wrongly :) But I'd rather not try to be clever there again and instead use architecture+brutalism to narrow things down.

    Post edited by ctietze on

    Author at Zettelkasten.de • https://christiantietze.de/

  • Many thanks Christian, as always I appreciate your input!

    See topic: Tag Maps for a fuller reply :)

Sign In or Register to comment.