Description
This little macro is for usage with TaskPaper.
As you know, when you drag a file into an open TaskPaper document, it will create a file link like this:
/Users/tom/Documents/Tasks/my.txt
This is an absolute link. Absolute links will break when you move/rename the target file or one of its enclosing components in the path.
That means: If you are linking to a file in the same folder as the TP document, or to a file in same parent folder (e.g. the project folder) you most likely want to have a relative link. This allows you to move the parent folder around without breaking the link.
A relative link in TaskPaper looks like this:
./../Tasks/my.txt # same parent folder
./../my.txt # same parent folder
./my.txt # same folder
That’s where the macro comes in. It simply converts absolute file links in a TP document to relative links.
Usage
- Open any TaskPaper document that contains a file link. Make sure the document is saved to disk.
- Select the link
- You can also select the whole branch (⇧⌘B) or the whole document (⌘A). In that case the macro will detect and convert every file link.
- Run the macro
TaskPaper: Absolute File Links to Relative.kmmacros (3.5 KB)
Notes
The macro is a sibling of my LaunchBar action that does the same thing: