3.9 KiB
up::obsidian plugins link::https://github.com/Vinzent03/obsidian-advanced-uri title::"utiliser des URI pour faire différentes actions dans obsidian" #s/obsidian
Tip
Use command line (my
urlencodealias) to encode with the%notation
Opening files
| parameters | explanation | |
|---|---|---|
| workspace | workspace |
opens the workspace called workspace |
| save current workspace | saveworkspace=true |
Saves the current workspace. (Can be combined with workspace to open a new workspace afterwards) |
| file | <identification> |
opens file |
| line in file | <identification>, line |
opens line in file |
| heading | <identification>, heading |
opens heading in file |
| block reference | <identification>, block |
opens block in file |
| settings tab | settingid |
opens a setting tab by id |
[!example] Examples Open workspace "main":
obsidian://advanced-uri?vault=<your-vault>&workspace=mainOpen heading "Goal" in "my-file.md" (Important: Without syntax, onlyGoal):obsidian://advanced-uri?vault=<your-vault>&filepath=my-file&heading=GoalOpen block-id "12345" in "my-file.md" (Important: Without syntax, only12345):obsidian://advanced-uri?vault=<your-vault>&filepath=my-file&block=12345
Editing files
| parameters | explanation | |
|---|---|---|
| write | <id>, data |
Only writes data to the file if the file is not already present |
| overwrite | <id>, data, mode=overwrite |
writes data to filepath even if the file already exists |
| append | <id>, data, mode=append |
only append data to the file |
| prepend | <id>, data, mode=prepend |
only prepend data to the file |
| new | <id>, data, mode=new |
creates a new file. if filepath already exists, an incrementing number is appened |
[!example] Examples Write "Hello World" to "my-file.md":
obsidian://advanced-uri?vault=cours&filepath=my-file&data=Hello%2520WorldOverwrite "This text is overwritten" to "my-file.md":obsidian://advanced-uri?vault=<your-vault>&filepath=my-file&data=This%2520text%2520is%2520overwritten&mode=overwriteAppend "Hello World" to today's daily note:obsidian://advanced-uri?vault=<your-vault>&daily=true&data=Hello%2520World&mode=appendAppend content from the clipboard to today's daily note:obsidian://advanced-uri?vault=<your-vault>&daily=true&clipboard=true&mode=append
Navigation parameters
View modes
Just put one of the following parameters :
source: sets to "reading: source mode"live: sets to "reading: live mode"preview: sets to preview mode
Open in new pane
the newpane parameters tell if the uri should be opened in a new pane
accepts newpane=true or newpane=false