Auto organize notes

This commit is contained in:
2026-06-22 14:57:57 -04:00
parent 12dc012dce
commit 1f689230b5
84 changed files with 156 additions and 123 deletions
+2 -1
View File
@@ -2,5 +2,6 @@
"obsidian-note-autocreator",
"custom-font-loader",
"calendar",
"code-styler"
"code-styler",
"frontmatter-folder-organizer"
]
@@ -0,0 +1,3 @@
{
"frontmatterHierarchy": "character, category"
}
@@ -0,0 +1,6 @@
/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
"use strict";var d=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var w=(i,t)=>{for(var e in t)d(i,e,{get:t[e],enumerable:!0})},z=(i,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of p(t))!y.call(i,r)&&r!==e&&d(i,r,{get:()=>t[r],enumerable:!(n=F(t,r))||n.enumerable});return i};var S=i=>z(d({},"__esModule",{value:!0}),i);var b={};w(b,{default:()=>m});module.exports=S(b);var g=require("obsidian");var l=require("obsidian"),f={frontmatterHierarchy:"Category, Faction"},h=class extends l.PluginSettingTab{constructor(t,e){super(t,e),this.plugin=e}display(){let{containerEl:t}=this;t.empty(),t.createEl("h2",{text:"Frontmatter Folder Organizer"}),new l.Setting(t).setName("Frontmatter hierarchy").setDesc("Enter frontmatter keys in order. Files will be organized into folders based on these values.").addTextArea(e=>e.setPlaceholder("category").setValue(this.plugin.settings.frontmatterHierarchy).onChange(async n=>{this.plugin.settings.frontmatterHierarchy=n,await this.plugin.saveSettings()})),new l.Setting(t).setName("Organize files now").setDesc("Create folders and move markdown files according to the configured frontmatter hierarchy.").addButton(e=>e.setButtonText("Organize now").onClick(async()=>{await this.plugin.organizeFilesByFrontmatter()}))}};var m=class extends g.Plugin{async onload(){await this.loadSettings(),this.addCommand({id:"organize-frontmatter-folders",name:"Organize markdown by frontmatter hierarchy",callback:async()=>{await this.organizeFilesByFrontmatter()}}),this.addSettingTab(new h(this.app,this))}async organizeFilesByFrontmatter(){let t=this.getHierarchyKeys();if(!t.length){new g.Notice("Set a frontmatter hierarchy in plugin settings before organizing files.");return}let e=this.app.vault.getFiles().filter(r=>r.extension==="md"),n=0;for(let r of e){let a=this.getFolderSegmentsForFile(r,t);if(!a||!a.length)continue;let s=a.join("/");if(`${s}/${r.name}`===r.path)continue;await this.ensureFolderExists(s);let c=await this.getAvailableTargetPath(s,r.name);await this.app.vault.rename(r,c),n+=1}new g.Notice(`Organized ${n} markdown file${n===1?"":"s"} by frontmatter folder hierarchy.`)}getHierarchyKeys(){return this.settings.frontmatterHierarchy.split(/[,\r\n]+/).map(t=>t.trim()).filter(Boolean)}getFolderSegmentsForFile(t,e){let n=this.app.metadataCache.getFileCache(t);if(!n?.frontmatter)return null;let r=[];for(let a of e){let s=this.getFrontmatterValueByKey(n.frontmatter,a),o=this.normalizeFrontmatterValue(s);if(o===null)break;r.push(this.sanitizeFolderName(o))}return r.length?r:null}getFrontmatterValueByKey(t,e){let n=e.trim().toLowerCase();for(let[r,a]of Object.entries(t))if(r.trim().toLowerCase()===n)return a}normalizeFrontmatterValue(t){if(t==null||typeof t=="object")return null;let e=String(t).trim();return e.length?e:null}sanitizeFolderName(t){return t.replace(/[<>:"/\\|?*]/g,"-").trim()}async ensureFolderExists(t){let e=t.replace(/\\/g,"/").split("/").filter(Boolean),n="";for(let r of e)n=n?`${n}/${r}`:r,this.app.vault.getAbstractFileByPath(n)||await this.app.vault.createFolder(n)}async getAvailableTargetPath(t,e){let n=t.replace(/\\/g,"/"),r=`${n}/${e}`;if(!this.app.vault.getAbstractFileByPath(r))return r;let a=e.lastIndexOf("."),s=a>=0?e.slice(0,a):e,o=a>=0?e.slice(a):"",c=1;for(;;){let u=`${n}/${s}-${c}${o}`;if(!this.app.vault.getAbstractFileByPath(u))return u;c+=1}}async loadSettings(){this.settings=Object.assign({},f,await this.loadData())}async saveSettings(){await this.saveData(this.settings)}};
@@ -0,0 +1,10 @@
{
"id": "frontmatter-folder-organizer",
"name": "Frontmatter Folder Organizer",
"version": "1.0.0",
"minAppVersion": "1.0.0",
"description": "Organize markdown files into folders based on frontmatter hierarchy.",
"author": "Obsidian",
"authorUrl": "https://obsidian.md",
"isDesktopOnly": false
}
@@ -0,0 +1,8 @@
/*
This CSS file will be included with your plugin, and
available in the app when your plugin is enabled.
If your plugin does not need CSS, delete this file.
*/
+42 -37
View File
@@ -13,12 +13,12 @@
"state": {
"type": "markdown",
"state": {
"file": "Xavian/Omnistrike.md",
"file": "Spells - 1. 2 - Dawnflare.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "Omnistrike"
"title": "Spells - 1. 2 - Dawnflare"
}
}
]
@@ -192,52 +192,57 @@
},
"active": "cf07e32fae8559d4",
"lastOpenFiles": [
"Vigour/Avatar of Light.md",
"Xavian/_Base.base",
"Vigour/Avatar of Light Icon.png",
"Spells - 4. Q - Dawnbreaker Orb.md",
"Spells - 6. E - Greater Heal.md",
"Xavian/Sky Crash.md",
"Xavian/Solar Shield.md",
"Xavian/Omega Reprieval.md",
"Spells - 7. Shift+R - Luminous Barrier.md",
"Spells - 8. Shift+T - Remove Magic.md",
"Spells - Shift+Space - Avatar of Light.md",
"Spells - 9. 3 - Rune of Renewal.md",
"Xavian/Buff/Swift Reprival.md",
"_Keyboard.canvas",
"_Rime.canvas",
"_Keyboard 1.canvas",
"Xavian/Skill/Brilliant Flare.md",
"Xavian/Character/Xavian.md",
"Xavian/Skill/Brilliant Flash.md",
"Xavian/Skill/Aura of Solace.md",
"Xavian/Skill/Blinding Slash.md",
"Vigour/Avatar of Light.md",
"Images/Pasted image 20260605123320.png",
"Xavian/Omnislash.md",
"Xavian/_Keyboard 2.canvas",
"Xavian/Taunt.md",
"Xavian/Sun Struck.md",
"Xavian/Xavian.md",
"Xavian/Brilliant Flare.md",
"Xavian/Brilliant Flash.md",
"Xavian/Swift Reprival.md",
"Xavian/Shinning Halo.md",
"Xavian/Blind.md",
"Xavian/Ruptured Dawn.md",
"Xavian/Aura of Solace.md",
"Xavian/Decree of the Sun.md",
"Xavian/Interupt.md",
"Xavian/Solar Blades.md",
"Xavian/Blinding Slash.md",
"Xavian/Omnistrike.md",
"Xavian/Sun Strike.md",
"Xavian/_Base.base",
"Xavian/Skill/Decree of the Sun.md",
"_Vigour.canvas",
"Pasted image 20260605132922.png",
"Q.md",
"Keys/Shift + 1.md",
"Shift.md",
"Xavian/Skill/Solar Blades.md",
"Rime/Brain Freeze.md",
"Keys/C.md",
"Images/Pasted image 20260223234556.png",
"Images/Pasted image 20260223133526.png",
"Rime/Skill",
"Xavian/Debuff",
"Xavian/Skill",
"Xavian/Buff",
"Xavian/Character",
"Vigour/Throw Book.md",
"Vigour/Throw Book.png",
"Vigour/Throw Book Icon.png",
"Vigour/Avatar of Light Icon.png",
"Space.md",
"Spells.md",
"Shift.md",
"Spells - 1. 2 - Dawnflare.md",
"Hotkeys.md",
"Xavian/Debuff/Blind.md",
"Keys/Mouse 1.md",
"Images/Pasted image 20260224121329.png",
"Images/Pasted image 20260605113647.png",
"Images/Pasted image 20260605112156.png",
"Frost Bolt Icon.png",
"Keys",
"Images/Pasted image 20260605125121.png",
"Images/Pasted image 20260605125057.png",
"Images/Pasted image 20260605124858.png",
"_.base",
"_.canvas",
"_Keyboard.canvas",
"Xavian",
"_Keyboard 1.canvas",
"_Rime.canvas",
"_Vigour.canvas",
"Vigour",
"Rime"
"Vigour"
]
}
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,4 +1,4 @@
---
type: Key
category: Key
action: Move Back
---
+1 -1
View File
@@ -1,5 +1,5 @@
---
type: Key
category: Key
action: Move Forward
---
Move forward
+1 -1
View File
@@ -1,4 +1,4 @@
---
type: Key
category: Key
action: Move Right
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Mouse
category: Mouse
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Mouse
category: Mouse
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Mouse
category: Mouse
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Mouse
category: Mouse
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Mouse
category: Mouse
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,4 +1,4 @@
---
type: Key
category: Key
action: Move Back
---
+1 -1
View File
@@ -1,5 +1,5 @@
---
type: Key
category: Key
action: Move Forward
---
Move forward
+1 -1
View File
@@ -1,4 +1,4 @@
---
type: Key
category: Key
action: Move Right
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,4 +1,4 @@
---
type: Key
category: Key
action: Move Left
---
+1 -1
View File
@@ -1,4 +1,4 @@
---
type: Key
category: Key
action: Jump
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
@@ -1,6 +1,6 @@
---
character: Rime
type: Skill
category: Skill
cooldown: "10"
---
@@ -1,6 +1,6 @@
---
character: Rime
type: Skill
category: Skill
key: R
cast: Instant
damage: 3,283 - 4,012
@@ -1,6 +1,6 @@
---
character: Rime
type: Skill
category: Skill
key: G
cooldoqn: "15"
---
@@ -1,6 +1,6 @@
---
character: Rime
type: Skill
category: Skill
---
![[Frigid Winds.png]]
@@ -1,6 +1,6 @@
---
character: Rime
type: Skill
category: Skill
key: T
cast: 1.5s
damage: 2,106 - 2,574
@@ -1,6 +1,6 @@
---
character: Rime
type: Skill
category: Skill
---
![[Glacial Blast.png]]
@@ -1,6 +1,6 @@
---
character: Rime
type: Skill
category: Skill
---
![[Ice Comet.png]]
+1 -1
View File
@@ -1,4 +1,4 @@
---
type: Key
category: Key
action: Move Left
---
+1 -1
View File
@@ -1,4 +1,4 @@
---
type: Key
category: Key
action: Jump
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,4 +1,4 @@
---
type: Key
category: Key
---
Interrupts
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
+1 -1
View File
@@ -1,3 +1,3 @@
---
type: Key
category: Key
---
@@ -1,6 +1,6 @@
---
character: Xavian
type: Buff
category: Buff
maxStacks: 3
description: Converts Brilliant Flash into Brilliant Flare and vice versa. Consumed by Brilliant Flare.
---
@@ -1,4 +1,4 @@
---
character: Xavian
type: Character
category: Character
---
@@ -1,8 +1,8 @@
---
character: Xavian
type: Debuff
category: Debuff
maxStacks: 1
duration: 8
description: Increases chance for enemy auto attacks to be parried by 20%. Consumed on parry.
parryChanceBonus: 0.2
---
---
@@ -1,6 +1,6 @@
---
character: Xavian
type: Debuff
category: Debuff
maxStacks: 10
duration: 20
description: Consumed by your next Omnistrike to replenish mana. 100 mana base + 50 per additional stack.
View File
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
cast: Instant
description: |-
Burn all enemies within a large radius for X magical damage every 1.5 seconds while active and increases your Parry chance by +8%.
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
raw:
cast: Instant
description: |-
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
cast: 1.5s
description: Heal target all for X health.
key: W
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
cast: Instant
description: |-
Instantly heal target ally for X health or deal X damage to target enemy.
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
cast: Instant
description: |-
Envelope yourself in solar power, making you Immune to all damage for 3 seconds, ending with an explosion of light that deals X magical damage to nearby enemies.
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
key: V
cast: Instant
cooldown: 12
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
cast: Instant
description: Instantly gain 2 stacks of Omega Reprieveal, causing your Brilliant Flare to turn into Brilliant Flash with added enhancements when used to consume the 2 stacks.
offGlobalCooldown: true
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
cast: Instant
description: |-
Swing your sword in a large arc around you, dealing X physical damage to all enemies around you.
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
cast: Instant
description: Rupture the ground in front of you, dealing X magic damage to all enemies in a case in front of you, Stunning them for 2 seconds and Pulling them to you.
key:
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
cast: Instant
description: |-
Sunlight envelopers the ground at your feet, burning enemies within its area fir 288 magic damage for every 1.5 seconds over 12 seconds.
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
cast: Instant
description: Instantly ascend to the skies in a beam of light and crash down at the targeted location, dealing 558 magical damage to enemies in the area.
key: T
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
cast: Instant
description: |-
Conjure blades of pure sunlight to fall from above upon your target, dealing X magical damage to it and other enemies within a 700 radius.
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
cast: Instant
description: |-
Instantly shield the target, absorbing up to X damage. This shield lasts for up to 8 seconds.
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
key: R
cast: Instant
range: 5
@@ -1,6 +1,6 @@
---
character: Xavian
type: Skill
category: Skill
cast: Instant
description: Taunt the target, forcing it to attack you for 6 sec.
key: B
+2 -2
View File
@@ -49,8 +49,8 @@
{"id":"007a7f67c250f17b","type":"file","file":"Keys/Mouse 2.md","x":5360,"y":230,"width":400,"height":400},
{"id":"c2b4efa74da49292","type":"file","file":"Keys/Mouse 3.md","x":5800,"y":369,"width":400,"height":400},
{"id":"18c1ba481f21d364","type":"file","file":"Keys/Mouse 5.md","x":4880,"y":1300,"width":400,"height":400},
{"id":"d59c2435c0ad0ae2","x":905,"y":340,"width":400,"height":400,"type":"file","file":"Xavian/Sun Strike.md"},
{"id":"91df5254727c89de","x":900,"y":1120,"width":400,"height":400,"type":"file","file":"Xavian/Interupt.md"}
{"id":"d59c2435c0ad0ae2","x":905,"y":340,"width":400,"height":400,"type":"file","file":"Xavian/Skill/Sun Strike.md"},
{"id":"91df5254727c89de","x":900,"y":1120,"width":400,"height":400,"type":"file","file":"Xavian/Skill/Interupt.md"}
],
"edges":[]
}
+1 -1
View File
@@ -1,4 +1,4 @@
---
type: Key
category: Key
---
Horse
+7 -7
View File
@@ -1,20 +1,20 @@
{
"nodes":[
{"id":"5a69cd3e3f60a5b6","type":"file","file":"Rime/Frost Bolt.md","x":600,"y":-1200,"width":400,"height":1060},
{"id":"5a69cd3e3f60a5b6","type":"file","file":"Rime/Skill/Frost Bolt.md","x":600,"y":-1200,"width":400,"height":1060},
{"id":"ddbd2ef5f4bb806a","type":"file","file":"Rime/Ice Blitz.md","x":-1200,"y":-140,"width":400,"height":647},
{"id":"fd96c38aa5bccd98","type":"file","file":"Rime/Wrath of Winter.md","x":1040,"y":-2055,"width":400,"height":895},
{"id":"276371b5510e930f","type":"file","file":"Rime/Cold Snap.md","x":140,"y":-1220,"width":400,"height":1100},
{"id":"276371b5510e930f","type":"file","file":"Rime/Skill/Cold Snap.md","x":140,"y":-1220,"width":400,"height":1100},
{"id":"67ef0d1429360caa","type":"file","file":"Rime/Frost Ward.md","x":-1160,"y":-1200,"width":400,"height":800},
{"id":"a118f948b9376aa5","type":"file","file":"Rime/Flight of the Navir.md","x":-720,"y":-120,"width":400,"height":754},
{"id":"052b4507b67fefaf","type":"file","file":"Rime/Glacial Blast.md","x":1120,"y":680,"width":400,"height":772},
{"id":"163c661d08ee4625","type":"file","file":"Rime/Ice Comet.md","x":1560,"y":147,"width":400,"height":720},
{"id":"052b4507b67fefaf","type":"file","file":"Rime/Skill/Glacial Blast.md","x":1120,"y":680,"width":400,"height":772},
{"id":"163c661d08ee4625","type":"file","file":"Rime/Skill/Ice Comet.md","x":1560,"y":147,"width":400,"height":720},
{"id":"fbe338d002eb4232","type":"file","file":"Rime/Ice Dash.md","x":680,"y":943,"width":400,"height":637},
{"id":"b9c3f97c88808a08","type":"file","file":"Rime/Brain Freeze.md","x":240,"y":943,"width":400,"height":694},
{"id":"aabf8ce8b2fbc381","type":"file","file":"Rime/Winter's Blessing.md","x":-240,"y":977,"width":400,"height":660},
{"id":"642b9f1422743861","type":"file","file":"Rime/Frigid Winds.md","x":-720,"y":943,"width":400,"height":760},
{"id":"642b9f1422743861","type":"file","file":"Rime/Skill/Frigid Winds.md","x":-720,"y":943,"width":400,"height":760},
{"id":"4c541ab5bd4a75cf","type":"file","file":"Images/Pasted image 20260227215952.png","x":-1824,"y":-2200,"width":2424,"height":683},
{"id":"52e80c3d4d4f3869","type":"file","file":"Rime/Bursting Ice.md","x":-320,"y":-1220,"width":400,"height":959},
{"id":"fec4810318ccaac5","type":"file","file":"Rime/Freezing Torrent.md","x":-760,"y":-1260,"width":400,"height":1040}
{"id":"52e80c3d4d4f3869","type":"file","file":"Rime/Skill/Bursting Ice.md","x":-320,"y":-1220,"width":400,"height":959},
{"id":"fec4810318ccaac5","type":"file","file":"Rime/Skill/Freezing Torrent.md","x":-760,"y":-1260,"width":400,"height":1040}
],
"edges":[]
}