Opening links into specific apps from Obsidian

Hey,

I just wrote BASH-script to retrieve GMail messages which could be helpful to create a vault.
The script extracts a .txt-file, a .html-file and makes a .md file with necessary information (date of the mail, Subject, Sender and ‘link’ to .txt and .html file.)

Example

Date: 25 Jan 2013 11:25:32 +0100
From: Sender [email protected]
Subject: Subject line
Text: 13c713da99fb3e49.txt
HTML: 13c713da99fb3e49.html

When I open the directory in Obsidian, all the .md files are correctly taken in and displayed (few thousands of them). I am able to perform search actions so that’s fine too.

What I’d like to achieve is the following:
When I use the[Text](./13c713da99fb3e49.txt) notation I need to be able to open the file in their respective default programs.
.txt file would open in Sublime Text and .html files would open in Chrome.

Is that something Obsidian is yet able to do?

Some research on linking didn’t bring me to the needed results.
Hence my request for Help in this forum.
Could be I am not looking at the right places of course :wink:

No, this would not work.

In fact, Obsidian won’t even display it as a proper link. Only the raw Markdown link.

Feature request?

If the respective apps have a URL scheme, that might work. The idea would be to write e.g., [some linking text to some email](googlechrome://somesite.com/something.html).

Check out this for Chrome:

and this for Sublime Text:

You can use this technique outside of Obsidian, too.

Otherwise I think you’d need a way to specify how URL handling should be done on the Operating System level. On Mac that’s possible via an old third-party utility: macos - How to set default application for special link types (e.g., ssh://)? - Ask Different

edit: I changed the title of this thread to be more specific. Hope that’s okay!

1 Like

Believe there is some misunderstanding here, or I am misunderstanding the response (English is not my mothertongue)

The request was to implement the same behaviour as for .PDF-files:

When you make a link ![[RikD - LinkedIn Profile.pdf]] to a PDF-file Obsidian automatically displays


When you click the icon the PDF default App opens and shows the PDF.

When this behaviour would also be possible with .HTML, .TXT, .DOCX, .XLSX and .PPTX that would be great.

1 Like

There’s a feature request for this https://forum.obsidian.md/t/insert-embed-other-file-formats-like-xlsx-and-docx-but-not-limited-to-in-addition-to-pdf-and-images/3418/5

1 Like