# Saved search and keyboard shortcuts

edited April 2018

Just a few notes of my experience in case it's of any help to anyone else…

I've been using The Archive for a few weeks now and initially thought I wouldn't have a use for Saved Searched. That's changing.

I've now got four saved searches that work really well with how I use The Archive and keep notes generally. They are each assigned a keyboard shortcut (⌘1, ⌘2, ⌘3, and ⌘4) for ease of use:

1. All notes. The search string is blank here and it simply shows all notes. This is useful if The Archive is the active app but is minimised or hidden and if there is a different search active.
2. Inbox. Searches for a tag of #inbox which I use to 'file' notes I don't yet know what I want to do with.
3. Flagged. If I'm working on something and it's incomplete or I know I should return to it I tag it #flag (in the area of the note that needs revisiting rather than at the top where I usually put tags).
4. Attachments. By searching for the string ](media/ I can easily see all my files with links to documents I've put into the media folder.

As an aside related to the attachment search, I've set up an Automator service and Keyboard Maestro macro that I use as follows:

• Right click on a pdf that I want to add to The Archive and select my Automator 'reduce pdf filesize' service
• The Automator service puts a copy into a local directory I've called Media-archive (this enables me to keep a full-size version in case I ever need it)
• Moves the file into The Archive's media directory
• Reduces the filesize with the Quartz filter
• Keyboard Maestro 'watches' the media folder for new files being added, spots the new file and formats a markdown file link with the filename and puts it into the clipboard ready to be pasted into an Archive file.

The Archive is quickly becoming indispensible to me.

• Whoah, totally missed this post! If you want to share your Automator workflow and KM macro, you're welcome to attach files to your post, maybe in a new thread! I'll add a link to the KM index then: https://forum.zettelkasten.de/discussion/213/the-archive-keyboard-maestro-macros

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

• I do a similar thing to your PDF automation, Dan, specifically to include images of my sketches inline in my text files.

I keep a paper logbook, one of those unlined pocket-sized Moleskine cahiers things that's with me all the time. Throughout the day, I make notes in it, and occasionally sketches. I like paper and pen, just something a little more spiritual about it. But I also want it digitized and searchable, so at the end of the day I transcribe it into a txt journal file.

My workflow for getting the sketches into the digital journal file is roughly to make an image, transfer it to my /Assets/ folder, and write a markdown image snippet.

I use Scanner Pro to make the image on my iPhone. It lets me control the crop, makes a nice black and white (not grayscale) image, seems to correct the distortion of the notebook page, and seems to work better (than the camera app) with Marked for preserving image rotation. I have a workflow in Scanner Pro that uploads the image to an /Inbox/ folder in Dropbox where I dump all files for immediate use.

When that shows up on my MacBook, I have an Automator service that:
1. Moves the file to /Assets/
2. Prompts me for a filename (I usually make it descriptive, as well as including the cahier serial number that I write in the beginning of the book)
3. Copies that path and filename to the Clipboard
4. Opens The Archive.

Then, a text expander snippet creates the image markdown and prompts me for the alt/figcaption text.

I usually get a little of the surrounding text in the image, and somehow that makes it a little more charming and trustworthy when you see that same text in the file's text itself.

Kind of an edge case, I guess, but it pleases me a lot. I don't think I could automate it more, as some of the manual aspects are needed for me to explicitly think about (like the Inbox staging location, and the file name prompt.) This has made my journaling process a lot more functional and complete for me.

Here's a throwaway example of how it comes out when rendered in Marked:

• How come I didn't see this sooner? Anyway...

@Dan your # 1 sounds a lot like hitting ESC, isn't it?
But your # 4, wow! That is really clever! (I think I'll have to move my files in a subfolder now... )
Also, your use of #flag inside the text (rather than at the top) is brilliant.
Your KM macro, as well as @rrieke journaling workflow are inspiring too.

Thanks for sharing guys!

• This is super interesting. One big thing that helped me was creating a KM macro to remove all spaces from the filename and replace them with dashes, that way the links are clickable. Gonna dive into this more. Super cool.

• @joegilder said:
This is super interesting. One big thing that helped me was creating a KM macro to remove all spaces from the filename and replace them with dashes, that way the links are clickable. Gonna dive into this more. Super cool.

This is my Keyboard Maestro macro for moving ANY file, not just PDF's, to the /zettelkasten/media/ directory and creating a correctly formatted clickable link (sans spaces) in the %SystemClipboard% ready to paste in a zettel.

![](media/Feet_First_-_Will_Simpson.Scott's_comments.docx)

Will Simpson
I'm a zettelnant.
Research areas: Attention Horizon, Productive Procrastination, Dzogchen, Non-fiction Creative Writing
kestrelcreek.com

• @Will you are a genius. That very first action, is it just to clear any lingering stuff that might be "stuck" in the %Output% variable? Start it off with a blank slate?

• @joegilder said:
That very first action, is it just to clear any lingering stuff that might be "stuck" in the %Output% variable? Start it off with a blank slate?

Yes, and yes.

This is a good programming practice to declare and clear your variables at the beginning of any script. I don't always do this and sometimes not doing it comes around to haunt me with a seemingly random failing script.

Will Simpson
I'm a zettelnant.
Research areas: Attention Horizon, Productive Procrastination, Dzogchen, Non-fiction Creative Writing
kestrelcreek.com

• I am no programmer and there are likely holes in this (won't work with multiple files!) but this seems to work with Automator out of the box for Mac users.

NB: I renamed my /media folder to /Attachments.

AppleScript:

on run {input, parameters}
set filename to name of (info for input)
set filename to "![](Attachments/" & filename & ")"
display notification filename with title "Moved file to Attachments" subtitle "Copied to clipboard" sound name "Glass"
set the clipboard to filename
return input
end run


You can set a shortcut for it in the System Preferences > Keyboard > Services, I used Cmd+Ctrl+M

Thanks to @Will for the idea.