Zettelkasten Forum


[REQUEST] Convert The Archive's copied links from [[YYMMDDHHMM Title]] to [[YYMMDDHHMM]] Title

edited April 2 in The Archive

I want to use "[[YYMMDDHHMM]] Title" when linking between notes, since this makes it possible to edit titles in the future, without breaking any existing links.

When using Cmd-C to copy a note title – or when right clicking to copy a note link – the result is YYMMDDHHMM Title or [[YYMMDDHHMM Title]]. Could Textexpander och Keyboard Maestro be used to convert what's in the clipboard to my desired format? Or is this a feature that are on the roadmap for The Archive?

Comments

  • Yes! Keyboard Maestro to the rescue. Not exactly what you asked for but it might work.

    Thanks to @kaidoh for the inspiration and Chris Stone who helped with the regex and @sfast for pointing out that the IDs should be separate from the zettel titles.

    This will convert "201811281633 - Book - The Physics of Life" to "Book -The Physics of Life [[201811281633]]" inserting it into a note, making the ID a link. Not sure why notes are not created like this in the first place. But I'm going with it for now.

    Setup In Keboard Mastro

    Macro in action - Choosing a Link

    The Results

    Here is the macro file
    The Keyboard Maestro macro file.

    Will Simpson
    kestrelcreek.com

  • Will - I've notice several of your Macros run the shell script "cd /Users/will/Dropbox/zettelkasten/
    ls | sed -E -e 's/.[^.]*$//' -e 's!^([0-9]+)[[:space:]-]+(.+)![[\1]] \2!'" or something similar.

    What exactly are you pointing to so I can figure out what the script should look like on my computer?

  • Will - I figured it out and what my problem was. Thank you for these resources!

Sign In or Register to comment.