84: Chris Lawley, the iPad Man

1 Like

Here are a couple of follow-ups on things that came up during the episode that I think might be interest to listeners.

PowerShell

Automating with Python was brought up as an alternative for automating on the Mac to PowerShell. I’m sure most people realise that you can run get Python to run on Windows, but did you know PowerShell can also run on the Mac? That’s where I do my PowerShell scripting when I’m away from my work PC. It is just another shell, like zsh, bash, fish, etc.

Cross Linking in Drafts

If you find you want more cross-linking goodness in Drafts than the action group referenced in the show notes has, my ThoughtAsylum - Management action group has a section that can give your ability to work with cross-links in Drafts a significant boost.

Here’s a quick overview of what’s available, but as well as broadening the ways in which links can be inserted, you also get access to more types of links (including sections), working with explicit or implicit backlinks, and keyboard navigation of links.

Expand this for the details...

TAD-Link for Draft (Title)

Create a cross-link for a draft based on the draft title. Markdown heading markers are stripped from the start of the link for improved readability.

TAD-Link for Draft (Title+BL)

Create a cross-link for a draft based on the draft title. Markdown heading markers are stripped from the start of the link for improved readability.

A back link is also added to a back link section in the linked draft.

TAD-Link for Draft (UUID)

Create a cross-link for a draft based on UUID.

TAD-Link for Draft (UUID+BL)

Create a cross-link for a draft based on the draft UUID.

A back link (based on UUID) is also added to a back link section in the linked draft.

TAD-Link for Draft Section

Create a cross-link for a draft based on the draft title and a section. Markdown heading markers are stripped from the start of the link for improved readability.

TAD-Link for Draft Section (BL)

Create a cross-link for a draft based on the a draft title and a section within the draft. Markdown heading markers are stripped from the start of the link for improved readability.

A back link is also added to a back link section in the linked draft.

TAD-Load a Linked Draft

Generates an ad hoc list of back linked drafts - i.e. any draft that includes any type of draft wiki-style link (title, display title, with or without the ‘d’ identifier, or a UUID link). Drafts are displayed in last modified order along with a set of information to help you distinguish similarly or identically named drafts. Selecting a draft will load it into the editor.

TAD-Link for Workspace

Create a cross-link for a workspace.

TAD-Link for URL

Create a cross-link for a URL.

TAD-Link for Drafts Action

Create a cross-link to run a drafts action.

TAD-Link for Draft Search

Create a cross-link for a draft search. If you enter or cancel, an empty search will be inserted.

TAD-Link for Google Search

Create a cross-link for a Google search. If you enter or cancel, an empty search will be inserted.

TAD-Link for Wikipedia Page (Name)

Create a cross-link for a Wikipedia page, by name.

TAD-Link for Bear Note (Name)

Create a cross-link for a Bear note, by name.

TAD-Select and Process Cross-Link

Display a list of available cross-links in the current draft. The user selects a cross link, and the action will attempt to process it. The action supports title and UUID based draft links, searches, workspace, URLs, Google Searches, Wikipedia searches and Bear note links. The user selection of links is sorted alphabetically and is deduplicated.

TAD-Select and Process MD Link

Display a list of available Markdown links in the current draft. The user selects a link title, and the action will attempt to process it. The user selection of links is sorted is deduplicated.

TAD-Process Link

Taking the start of any selection as the cursor location, this action will attempt to identify any Markdown or wiki-style cross-link that the cursor is within. The action will then process that link as though it was a link the user had manually activated. If you favour the keyboard as your primary Drafts interaction device, consider creating an action that calls this one and assign it a keyboard shortcut.

TAD-Process URL

Open a URL located under the cursor. Will also open Markdown links from positioning the curosr anywhere within the link block.

TAD-Before Previous Wiki Link End

Move the cursor to just after the last character inside the previous wiki link. If there are no wiki links beyond the curent cursor position, the cursor will remain where it is.

TAD-After Previous Wiki Link Start

Move the cursor to just before the first character inside the previous wiki link. If there are no wiki links beyond the curent cursor position, the cursor will remain where it is.

TAD-Before Next Wiki Link End

Move the cursor to just after the last character inside the next wiki link. If there are no wiki links beyond the curent cursor position, the cursor will remain where it is.

TAD-After Next Wiki Link Start

Move the cursor to just before the first character inside the next wiki link. If there are no wiki links beyond the current cursor position, the cursor will remain where it is.

In addition, there are also a few other sections in the action group that would be of particular interest to users who cross-link:

1. Unique Reference Links

TAD-Insert Ref & Copy URL

Prompts the user for a note. This note is then placed into the current draft at the cursor along with a unique identifier and some strings to delimit and separate the content.

The unique identifier is essentially made of the unique ID of the draft plus an epoch time index.

Once inserted, the action also copies an x-callback URL to the clipboard that can be used to jump back to this insertion; by way of the second action.

For more information, see:

URL link to a spot in a draft - #3 by sylumer - Actions - Help & Questions - Drafts Community

TAD-OpenRef

The URL generated by the TAD-Insert Ref & Copy URL action will trigger Drafts to open with a piece of text and run this action. The text is the unique identifier in our earlier draft. The action splits the identifier, opens the draft specified by the UUID and locates the position of the unique position identifier and sets the cursor to the start of the identifier.

2. Embedding and Refreshing Embedded Drafts

TAD-Embed a Draft

Create a refreshable embed block in a draft that includes another draft’s content.

TAD-Refresh Embeds of this Draft

Searches all other non-trashed drafts for an embed block for the current draft and refreshes them to include the current content of the draft.

TAD-Refresh Embeds in this Draft

Refreshes the content of all embed blocks in the current draft.

Hope people find this extra information useful.

4 Likes