Hey, I'm a student from Germany building apps with Flutter and plugins for Obsidian.
If you want to support me you can consider:
Advanced modes for Obsidian URI
License: MIT License
As far as I can tell, the "Copy Advanced URI" command is currently only available in the "More options" menu. It would be great, if we could invoke it with a quick keyboard shortcut instead of having to reach for the mouse, click on the the little "More options" menu button, and then click on the actual command inside that menu.
Thank you so much for this fantastic plugin. It's really filled to the brim with insanely useful features.
Using a link like: obsidian://advanced-uri?vault=MyDaily&daily=true&data=%3C%25%20tp.file.cursor%20%25%3E&mode=append
And the append action fails with no data append to the daily note.
Is it a bug for Obsidian or just a bug for the plugin?
I see two methods of implementing this:
save-current=true
to save a workspace before changing to a different workspace.Not sure which implementation makes more sense, the latter is more fine grained control, while the former is more compact as it is only one URI.
If I want to quick add data to daily note, it will be hard to change the date everyday, OR i should write a script for myself.
**But I think it is hard to code this feature, so this issue is just an inspiration **
Argenos had coded a similiar feature before. https://github.com/argenos/nldates-obsidian
It would be nice that make a parameter like daily?
like obsidian://advanced-uri?vault=<test-vault>&timepath=%DD%%MM%%WW%%20Weekly%20Note&data=<text>&mode=append
Hello!
From time to time you need to know if a note exists already to decide if you need to write or append to it. On desktop I can use AppleScript or tools like Keyboard Maestro to check if note exists before writing (I'm on Mac). But on iOS there is no easy way to do the same using Shortcuts.
Any chance you can implement checking for note existence with Advanced URI?
Thanks a lot!
Is it possible to support smoother integration with Hook as discussed in the following post?
https://discourse.hookproductivity.com/t/link-obsidian-with-advanceduri-plugin/4691/6
Hook is not able to get the advanced URI. Currently, it seems it is impossible to set a shortcut for just copying advanced URI without bringing up the UI. Besides it would be better to have proper automation without UI scripting
If the advanced URI plugin provide the following two we could provide integration:
“copy advanced markdown URI” for both title and url.
Allow the user to set a shortcut for “copy advanced markdown URI” without bringing up the UI so Hook can use the shortcut to > get the markdown URI.
However, much better would be to provide x-callback-url support in the plugin. Or other automation. Is that there or possible?
Hi, I have this command using your plugin with a bash script that does work to open a file:
xdg-open "obsidian://advanced-uri?vault=${VAULT2}&filename=${FILE4}"
Is there a way to force it to open the file in a new pane? I'm usually viewing my files in obsidian but if they're not already linked in the current file calling them up with a rofi (bash) script to open them. 99% of the time I'd like to see the new file beside the current one, not replacing the current one. Is this possible using your plugin (or any other way you can think of?)
I see a reference to your other plugin "obsidian-shortcuts-for-starred-files" that has that, but not sure if this functionality is also in the obsidian-advanced-uri plugin or not
thank you!
Hi all
im trying to create a complex (well at least to me since im suck :) ) obsidian advanced URL to launch from within ios shortcuts.
this is the current state of what works
obsidian://advanced-uri?vault=Food&filepath=CQ/title&data=body
this does create a note with title
and a body body
which is great. but it always opens in reading mode
I've read that you can use view
mode to specify the mode it will open in. yet for the life of me i cannot get it to work or follow the correct syntax for this
can anyone guide me
also can one launch a insert template after the advanced URI launches?
thx so much
Z
The plugin works great in Obsidian Windows version but although it installs ok but no functionality is working in Obsidian Android version. I really like to see it working on mobile as well. Thanks again.
Analogue to the URI to update plugins, there could also be an URI to update the currently used theme.
Thanks for your work on this useful plugin, @Vinzent03.
My daily notes all start with a template from the core Templates plugin, which includes a heading for "Reading Notes." I've been using the following URI as part of a shortcut on iOS to add text under that heading:
obsidian://advanced-uri?vault=<vault>&daily=true&heading=Reading%20Notes&data=<text>&mode=append&viewmode=source
If the daily note already exists, it works beautifully. However, if the daily note hasn't been created yet, nothing happens.
If I use the same URI without the heading=
, it also works, creating a daily note and appending text to the bottom. But when I try to create a daily note and append to a heading at the same time, it consistently fails.
Hey! Thanks for this amazing plugin.
I have run into an issue with search and replace. Here's the error:
This is the command I wanted to run: obsidian://advanced-uri?vault=Vault&filepath=Current%20Weekly%20Review.md&search=[x]&replace=[%20]
.
I made sure the plugin is updated and my Obsidian version is v.0.11.13.
I'm using an iOS Shortcut to create a URI to generate a page. This includes dataviewjs blocks. The process of generating the page fails at the same point, but I cannot understand why.
This is the URI:
obsidian://advanced-uri?vault=PPTN&filepath=More%20Testing/More%20Testing%20Dashboard&data=---%0Atype:%20project%0Aproject-start:%202022-01-13%0Aproject-due:%20%0Aarea:%0Atags:%20%5B%5D%0A---%0A%0A%5B%20%5B%5BMain%20Dashboard%7C%F0%9F%97%84%EF%B8%8F%5D%5D%20-%20%5B%5BMore%20Testing%20Dashboard%20%7C%F0%9F%93%81%5D%5D%20-%20%7C%7C%20%5B%F0%9F%93%8A%5D(obsidian://advanced-uri%3Fvault%3DPPTN%26workspace%3DGraphs)%20-%20%5B%F0%9F%93%B1%5D(obsidian://advanced-uri%3Fvault%3DPPTN%26workspace%3DMobile)%20%5D%0A%5Eheader-links%0A%0A---%0A%0A%23%20Project%20Info%0A%0A%3E%20%23%23%20More%20Testing%0A%3E%20%23%23%20Start:%20%60%3Dthis.project-start%60%0A%3E%20%23%23%20Due:%20%60%3Dthis.project-due%60%0A%0A---%0A%0A%23%20Tasks%0A%0A!%5B%5BButtons%23%5EmakeTask%5D%5D%0A%0A%60%60%60dataviewjs%0A%09dv.taskList(dv.pages('%22More%20Testing/001-Tasks%22').file.tasks.where(t%20%3D%3E%20!t.completed).sort(f%20%3D%3E%20f.due),%20false%20)%0A%60%60%60%0A%0A---%0A%0A%23%20Notes%0A%0A!%5B%5BButtons%23%5EaddNote%5D%5D%0A%0A%60%60%60dataview%0Alist%20from%20%22More%20Testing/002-Notes%22%0A%60%60%60%0A---%0A%0A%23%20Resources%20%0A%0A!%5B%5BButtons%23%5EmakeResource%5D%5D%0A%0A%60%60%60dataview%0Alist%20from%20%22More%20Testing/003-Resources%22%0A%60%60%60%0A%0A---%0A%5B%20%5B%5BMain%20Dashboard%7C%F0%9F%97%84%EF%B8%8F%5D%5D%20-%20%5B%5BMore%20Testing%20%7C%F0%9F%93%81%5D%5D%20%5D%0A%5Efooter-links
And it should generate this Markdown:
[ [[Main Dashboard|🗄️]] - [[LSB Technical College Dashboard |📁]] - || 📊 - 📱 ]
^header-links
LSB Technical College
Start:
=this.project-start
Due:
=this.project-due
![[Buttons#^makeTask]]
dv.taskList(dv.pages('"LSB Technical College/001-Tasks"').file.tasks
.where(t => !t.completed)
.sort(f => f.due),false)
![[Buttons#^addNote]]
list from "LSB Technical College/002-Notes"
![[Buttons#^makeResource]]
list from "LSB Technical College/003-Resources"
[ [[Main Dashboard|🗄️]] - [[LSB Technical College Dashboard |📁]] ]
^footer-links
`
The point where it fails is:
dataviewjs dv.taskList(dv.pages('"LSB Technical College/001-Tasks"').file.tasks .where(t => !t.completed) .sort(f => f.due),false
Essentially, after 'false', the process of creating the content in Obsidian stops.
Any idea what is causing this?
Many thanks
I noticed after a while, that there are three things in the settings that I open very regularly, so speeding up the process via URI might be useful. In particular:
Right now, via the settingid
URI, I can only access the community plugin tab, and the appearance tab, creating an unnecessary extra step. This is only a super minor feature request, so no hurry at all! :)
Thank you for the great plugin! I use this plugin a lot. There is an issue that has been bothering me for a long time. The "Open" action got stuck for several seconds sometimes, before opening the target page. It doesn't happen every time. There is no error message in the DevTool console.
What could be the reason? Or How could I debug this issue?
Hi,
I am using Advanced URI on iOS in my shortcut to append a clipping (e.g. website) to my Daily Note like this:
obsidian://advanced-uri?daily=true&mode=append&data=
My vault is synced between Mac and iOS via iCloud. Today (and I think also yesterday) I noticed that my daily note got overwritten by my iPhone - theory is that the following happened:
Not sure Advanced URI is the culprit, but maybe you could have a look if the above theory could be plausible and fixed from advanced URI side (e.g. change step 3).
Using the workspace parameter in an Obsidian URI to load a workspace works for me on Mac, but if I try the same URL on Windows, against the same vault, and with exactly the same workspace name set up, it does not work. When the URI is opened on Windows, the Obsidian app is opened, or is switched to the foreground, but no loading of the workspace takes place. When doing this on Mac, the workspace loads immediately .
e.g. this URI works for me on Mac but not on Windows against the same vault and configuration.
obsidian://open?vault=demo&workspace=1-Main
Windows: 10 (21H1, build 19043.1165)
Obsidian: 0.12.15
Advanced Obsidian URI Plugin: 1.11.1
Would it be possible to add a URI for random note in a vault?
I have found mention the functionality in command-uri-obsidian, but it is not working today , and repo abandoned.
Would it be possible to add a URI for closing a vault?
Currently it's not really possible to switch between vaults.
One workaround I could think of would be to close the current vault first before opening it.
Right now, when I use filename=Toby
a new file is created even though I have a document that has that alias. Is it feasible to add a parameter, say name
feasible that opens the file with that if it exists, the file that alias if that exists and only if neither do creates a new file?
Your plugin is super useful. I use it to allow me to open files from a bash script (from a rofi search as well as other bash scripts e.g. from a crontab reminder type thing) as that's quicker than using the native Obsidian search.
The one slight wrinkle is that I get a lot of repeat notes all open at the same time. Is there a way with your plugin (or any other way you know off the top of your head) to have it "go to" the already open note if it has been opened previously?
this is what I'm using to open my notes:
xdg-open "obsidian://advanced-uri?vault=${VAULT}&filename=${FILE}"
thanks,
Hi @Vinzent03 - great plugin!
I am using it to open my daily note, with e.g. obsidian://advanced-uri?vault=main&daily=true
It works, but always opens a new pane instead of just switching my current pane to the daily note (which is what Obsidian's native URI open does). Is there any way to fix or control this? Even if I have the daily note open, it still opens a new pane.
there is a problem when uri contains symbol "%"
origin text is increase 100%
after url encode increase%20100%25
so, when I try to open this url
obsidian://advanced-uri?vault=notes&daily=true&mode=append&data=increase%20100%25
it does't work
Uncaught (in promise) URIError: URI malformed
at decodeURIComponent (<anonymous>)
at AdvancedURI.eval (eval at <anonymous> (app.js:1), <anonymous>:3462:69)
at step (eval at <anonymous> (app.js:1), <anonymous>:72:23)
at Object.eval [as next] (eval at <anonymous> (app.js:1), <anonymous>:53:53)
at eval (eval at <anonymous> (app.js:1), <anonymous>:46:71)
at new Promise (<anonymous>)
at __awaiter (eval at <anonymous> (app.js:1), <anonymous>:42:12)
at eval (eval at <anonymous> (app.js:1), <anonymous>:3452:100)
at t (app.js:1)
at <anonymous>:1:52
Steps to reproduce:
abc
somewhere in the current daily note (in my case, Periodic/Daily/2021-11-12
).obsidian://advanced-uri?daily=true&search=abc&replace=123
.Expected: The abc
should be replaced with 123
.
Actual: Nothing changes.
Notably, as expected:
obsidian://advanced-uri?filepath=Periodic%252FDaily%252F2021-11-12.md
opens the file.obsidian://advanced-uri?daily=true
also opens the file.obsidian://advanced-uri?filepath=Periodic%252FDaily%252F2021-11-12.md&search=abc&replace=123
replaces abc
with 123
.Hello again @Vinzent03 !!!!!!
I'd like to make a request related to these amazing URI:
obsidian://advanced-uri?vault=<my_vault>&filepath=<my_file.md>&data=<my_data>&mode=prepend
obsidian://advanced-uri?vault=<my_vault>&filepath=<my_file.md>&data=<my_data>&mode=append
My suggestion is a new option to NOT open Obsidian while doing this URI.
In other words: append/prepend text to a specific note without opening Obsidian (background)
Let me explain :)
My idea is to send (append/prepend) information to INP.md on Mobile using URI and the Shortcuts App. After searching in our forum, I wrote two shortcuts that uses your amazing plug-in to append/prepend information to this INP.md note.
—> This one uses the clipboard to prepend to the note
—> This one opens a modal that let me write what I want to remember and prepend to the note
This is amazing, but every new input that I send via URI, Obsidian Opens and I have to get back to the previous App that I was using.
Would be amazing to have a way to send information via URI on background (without opening Obsidian) :)
I hope my FR is feasible and I hope you liked :)
Thanks again for all your help. Is always a pleasure talking to you.
I wish you a fantastic day!!!!!!
Thanks for another useful plugin @Vinzent03 —and even more thanks that you didn’t forget us multi-lingual people who switch the Obsidian language often, by allowing us to use the Command ID instead of its name!
I’ve missed that a lot in the Buttons and Obsidian Leaflet plugins: Whenever one switches Obsidian’s language, the command names used aren’t the same anymore and all logic breaks. Not so when using the Command IDs instead.
Since there is unfortunately no official list of command ids (and plugins can add to the commands anyway), you can use my Obsidian Command and Hotkey List (new version) to show command ids and their currently assigned hotkeys within Obsidian. This requires the Dataview plugin to be installed and operational.
Here’s the link to the code, in the Obsidian Forums:
https://forum.obsidian.md/t/dataviewjs-snippet-showcase/17847/37
How hard would it be to add the ability to append to a section, noted by a header reference like ###Section?
This plugin is excellent. I am using it with Obsidian for macOS and iOS through shortcuts mostly (although just having a link has been helpful in my task manager as well).
It does work to use the action X-Callback-URL, you can also see the general spec page. When I run that action, it just seems to just hang and not finish. Having the ability for these URLs to speak back to the application that sent them is a nice addition, especially if there is a sequence of steps. A workaround that currently works is to use the action "Open URL" and this will allow me to manipulate data in multiple different obsidan documents.
Hi, I hope to insert my template in append mode for my daily notes. But I couldn't implement such things by using current parameters. Would you like to add some parameters to Implement such functionality? Thank you!
Hi,
I'm using Obsidian Advanced URI with an Alfred workflow to open my notes directly from Alfred. When I activate the Advanced URI plug-in, opening a note also reactive the left panel and reveal where the note is located, which is a bit annoying. Any idea how to avoid that?
with parameter mode it works. otherwise it won't work.
When we prepend to a file, I don't think we ever want to prepend before the yaml metadata and I'd expect the plugin to take into consideration.
no any option, no any shortcuts.
obsidian://advanced-uri?vault=vaultName&file=Test%2F2
I found the uri is diff : obsidian://advanced-uri?vault=
vs obsidian://open?vault=
Why not add option in obsidian://open?vault=<your-vault>&filepath=my-file&heading=Goal
???
How should I modify this uri to achieve it?
obsidian://advanced-uri?vault=<your-vault>&filepath=my-file
It would be really nice if specifying a filepath
but no data
would just open the given path.
I'm building some iOS Shortcuts to automate some flows, and I'd love to rely only on obsidian-advanced-uri
instead of switching between this and the official open
action depending on whether or not I have data
Right now it looks like this case is ignored by registerObsidianProtocolHandler
, when it can probably just be implemented with this.app.workspace.openLinkText(parameters.filepath, "");
A nice-to-have would be if the cursor were at the appropriate position based on mode=append
or mode=prepend
It looks like URIs must be double encoded. Is this intended behavior?
Raw
<\\%
Encoded
%3C%5C%5C%25
Double Encoded
%253C%255C%255C%2525
Run this in your console
open("obsidian://advanced-uri?vault=" + encodeURI(app.vault.adapter.basePath.split("\\").reverse()[0]) + "&searchregex=" + encodeURI(encodeURI(/<\\%/g)) + "&replace=" + encodeURI(encodeURI("<%")))
On this content
<\% tp.frontmatter.field %>
If this is intended behavior, it may be helpful to others if the README page mentions it.
I found that the append mode allows us to append data to the begining of the file. But I think append means that add things to the end, and prepend means that add things to the beginning.
I think it would be nice that add an action name: prepend and append. That are both useful for people.
Thanks for building such a good job.
I don't know if it is doable to use obsidian advanced URI to call an action on a specific note or focusing note?
like insert a template
Well, as I mentioned in Discord: A feature to open specific settings-tabs would be great. e.g. obsidian://advanced-uri?settingid=editor
would open the editor settings and obsidian://advanced-uri?settingid=hotkeys
would open the hotkeys.
Thank you for this amazing plug-in, which solves the problem of obsidian unstable links.
I have a feature request.
How to create markdown note using both UID and file path?
I hope it can be achieved through the link below, but it doesn't seem to work.
obsidian://advanced-uri?vault=knowledgehub&filepath=markdown%2F002_avatar%2Fa.md&uid=123
Of course, UID is preferred when matching.
This feature is very important to me. Could you consider supporting it?
The scroll to text fragment feature provides support for specifying a text snippet in the URL hash. So if I click a link that specifies a fragment, I would be navigated to that fragment of text on the page.
if obsidian-advanced-uri support it , I guess I can link any character from any document. This is more elegant than the obsidian block reference.
Some links to understand text fragment:
Thank you for any replies.
Currently, there are options for copying links to files, commands, etc. It would be great if there can be a command for copying links to workspaces.
I want to always open a node in preview mode (as opposed to editor mode).
Is it possible for Advanced URI to support this? How complicated will this be? Happy to create pull request if you can give me some idea how to do it.
It will be nice that obsidian advanced URI supports this feature (for people who don't want to install two plugins).
when the file in url is no, the lumberjack of plugin can create new file with templater, ,but advance url only creat a new file without templater , i think your plugin is much better than it maybe I was not be able to find the function, Could you tell how to set it,thanks
Hi again
This is similar to my previous issues where i may be doing something wrong but i cant see any examples :)
to my understanding the line in file
command should open the note with the cursor on the line #? is that correct?
if so i have this example
obsidian://advanced-uri?vault=Food&filepath=CQ/test&viewmode=source&data=XXX%0D%0A333&line=2
which creates the test file but never moves the cursor to line #2
any tips?
thx
Z
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.