Jump to content

Opening a link within a doc found in Alfred

Recommended Posts

I use Obsidian (am still getting my arms around Shimmering Obsidian but have it installed) and I keep all my bookmarks in a folder in Obsidian. I wanted to search in Alfred for a bookmark then have a script that parses the file and pulls out the link (it's denoted consistently in Obsidian, and I can easily grep it out in bash). Then I'd want Alfred to open a browser with that link. Instead, I end up either opening the file in Obsidian (or, annoyingly, in VS Code, my default md file reader). I can't figure out how to insert an action after the file is found so that instead of opening the file it uses the file as input to run a script that outputs the URL that can then be input to a browser step. I couldn't find an example in this forum like this, but maybe I missed it. Appreciate any help in advance!

Link to comment

Welcome to the forum.


3 minutes ago, SpencerD said:

so that instead of opening the file it uses the file as input

I may be able to help with that part but as to the remainder suspect you're a much better programmer than I am so will leave you to take it further, if I may!


Take a look at the Automation Task Read File Contents (and see here for an introduction to Automation Tasks in case you're not already familiar with them). That, at least, should get you the file contents (and, of course, you can put them on the clipboard using the Copy to Clipboard action if you need to).



Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...