Skip to content

May 12 2023

Using Alfred to append to Obsidian, escapism, and a cool ass chip

Bram Adams
Bram Adams
4 min read
May 12 2023

Table of Contents

cool chip.
cool chip 1.png
cool chip 2.png


At times I have had many next actions that required me to be in “creative writing” mode; though those actions were At Computer, they required a different time and frame of mind than the rest of the things I needed to do at my laptop. It was much more relaxing and productive to manage my focus by sorting those onto a different, Creative Writing action list. I currently divide my computer-required actions into those that don’t require an Internet connection, those that do, and those that are just surfing (potentially fun or interesting things on the Web to explore). (Location 3745)


Append to Resources (ATR) is my response to fast PARA style addition of resources without context switching. For non Alfred or Mac users the idea stays the same. You come across research that is useful to you what next? Where do you save it? How do you leverage it? Cite it?

ATR does:

  1. Reads all the files in a active projects directory; in my case PARA/Projects
  2. You (the user) choose a folder to append to
  3. Alfred opens an input box for appending some copied link or short thought
  4. The input is appended to {project_name}/

copy a link in arc (cmd-shift-c)!!
arc copy link.jpg

filter project folder in Alfred
filter projects in alfred by keystroke.png

copy link into alfred
copy link into alfred.png

the entire workflow
pm obsidian workflow.png

append link into Obsidian
in obsidian resource result.png

Here's the code!

Script Filter


shopt -s nullglob

echo "<?xml version='1.0'?><items>"

for project_path in "/Users/bram/Desktop/Obsidian/2023/_PARA/Projects"/*
  project=$(basename "$project_path")
  echo "<item uid='$project' arg='$project,' query='$query' valid='YES'><title>$project</title><subtitle>Append to in this project</subtitle></item>"

echo "</items>"

Script to Append to Resources

update 2023-05-13:
commas turn out to be super common so it now splits on unicode for skull and crossbones: ☠️. In addition, the -d flag was added. The -d '' option tells read to continue reading until it encounters a null string, which effectively means it will read the entire input, including newline characters.


IFS=$(printf '\u2620') read -d '' -r project query <<< "$1"
today=$(date +"%Y-%m-%d")

echo "$query [[$today]]" >> "/Users/bram/Desktop/Obsidian/2023/_PARA/Projects/$project/"

also added a version that pairs with Obsidian Kanban


IFS=$(printf '\u2620') read -d '' -r project query <<< "$1"


# Specify the markdown file

# Specify the line to be appended
TODO_LINE="- [ ] $query"

# Temp file

# Flag to check if "# To Do" section was found

while IFS= read -r line
  # If the line matches "## In Progress" and TODO_FOUND is set, write TODO_LINE
  if [[ $line == "## In Progress" ]] && [[ $TODO_FOUND -eq 1 ]]; then
    echo "$TODO_LINE" >> "$TEMP_FILE"

  # Write the current line to TEMP_FILE
  echo "$line" >> "$TEMP_FILE"

  # If the line matches "# To Do", set TODO_FOUND
  if [[ $line == "## To Do" ]]; then

# Overwrite the original file with the temp file

echo "_PARA/Projects/$project/Kanban"

with Obsidian Advanced URI we can open the file directly in Obsidian in the same flow!!!


encoded_string="${query// /%20}"
trimmed_encoded_string=$(echo "$encoded_string" | xargs)

open "obsidian://advanced-uri?vault=2023&filepath=$trimmed_encoded_string"

echo "obsidian://advanced-uri?vault=2023&filepath=$trimmed_encoded_string"


wild to go from planning to jump off a roof to peeping in on a lady dancing saving your life

same energy as

this music video is a whole ass movie wtf lol

IVE HAD THIS SHIT ON REPEAT is a reader-supported published Zettelkasten. Both free and paid subscriptions are available. If you want to support my work, the best way is by taking out a paid subscription.


Bram Adams

writer, programmer


Related Posts

Members Public

June 06 2023

City on fire (hot!)

June 06 2023
Members Public

Issue 12: Smaller Programs, Longer Walks

The more we escape our heads, the deeper we get tangled.

Issue 12: Smaller Programs, Longer Walks
Members Public

Jun 03 2023

latitude and longitude logic, the hardest part of programming is naming, spoiler for a chatgpt plugin im working on, lazy plot devices

Jun 03 2023