Zerospace docs

This commit is contained in:
2026-09-24 23:54:12 -04:00
parent 9d2da03f61
commit 6531e7ec58
124 changed files with 3619 additions and 276 deletions
+3 -1
View File
@@ -1 +1,3 @@
{}
{
"promptDelete": false
}
+3
View File
@@ -0,0 +1,3 @@
{
"backlinkInDocument": true
}
+4
View File
@@ -0,0 +1,4 @@
[
"sample-plugin",
"frontmatter-folder-organizer"
]
@@ -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
}
File diff suppressed because it is too large Load Diff
@@ -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.
*/
+100 -40
View File
@@ -36,26 +36,75 @@
"icon": "lucide-table",
"title": "_Talents"
}
}
],
"currentTab": 1
},
{
"id": "756d9924fb5e23c2",
"type": "tabs",
"children": [
},
{
"id": "6e58412b029dfbac",
"id": "022423d551867488",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Koru Symbiosis.md",
"file": "PVE Map/Fabricators.md",
"mode": "source",
"source": false
"source": false,
"backlinks": true,
"backlinkOpts": {
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
"showSearch": false,
"searchQuery": "",
"backlinkCollapsed": false,
"unlinkedCollapsed": true
}
},
"icon": "lucide-file",
"title": "Koru Symbiosis"
"title": "Fabricators"
}
},
{
"id": "6e58412b029dfbac",
"type": "leaf",
"pinned": true,
"state": {
"type": "bases",
"state": {
"file": "_Buildings.base",
"viewName": "Table"
},
"pinned": true,
"icon": "lucide-table",
"title": "_Buildings"
}
}
],
"currentTab": 2
},
{
"id": "053f8ad47efefbe1",
"type": "tabs",
"children": [
{
"id": "544b6c2c78763839",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "Rewards.md",
"mode": "source",
"source": false,
"backlinks": true,
"backlinkOpts": {
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
"showSearch": false,
"searchQuery": "",
"backlinkCollapsed": false,
"unlinkedCollapsed": true
}
},
"icon": "lucide-file",
"title": "Rewards"
}
}
]
@@ -78,7 +127,9 @@
"type": "file-explorer",
"state": {
"sortOrder": "alphabetical",
"autoReveal": false
"autoReveal": false,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-folder-closed",
"title": "Files"
@@ -220,36 +271,45 @@
"bases:Create new base": false
}
},
"active": "6e58412b029dfbac",
"active": "544b6c2c78763839",
"lastOpenFiles": [
"_Talents.base",
"Corsair Flamer.md",
"Koru Symbiosis.md",
"_Units.base",
"Research Upgrade.md",
"Build Building.md",
"Untitled 8.md",
"PVE Map/Fabricators.md",
"PVE Map",
"Information",
"Tag/Respawns for free after death.md",
"Tag/Regains Energy From Attacking.md",
"Tag/Light Armor.md",
"Tag/Bonus Damage vs Light Armor.md",
"Tag/Bonus Damage vs Heavy Armor.md",
"Tag/Air unit.md",
"Tag/Biological.md",
"_Buildings.base",
"Lasher.md",
"Production of Army.md",
"Recruit Mercenaries.md",
"Corsair.md",
"_Talents.base",
"PVE Map/Blockage.md",
"Pasted image 20260619123019.png",
"Pasted image 20260619123010.png",
"Information/First Win of The Day.md",
"Rewards.md",
"[[Unit]]/[[Grell]]/1/Brood Guard.md",
"[[Unit]]/[[Grell]]/0/Gatherer.md",
"PVE Map/Scavenging.md",
"PVE Map/Retreat.md",
"PVE Map/Siege.md",
"PVE Map/Iron Shield.md",
"PVE Map/Advance.md",
"PVE Map/Hillside.md",
"Rule/Flux.md",
"Rule/Hexite.md",
"Rule/Spells.md",
"Rule/Power.md",
"Rule/Unit.md",
"_Units.base",
"_.md",
"Faction",
"Tag",
"Pasted image 20260614164156.png",
"Untitled 7.md",
"Air unit.md",
"Bonus Damage vs Buildings.md",
"Bonus Damage vs Heavy Armor.md",
"Vine Feeder.md",
"Bonus Damage vs Air.md",
"Biological.md",
"Skyclutch.md",
"Bloodwell Attacker.md",
"Cultivator Defender.md",
"Synapse Canopy.md",
"Macrogenisis Canopy.md",
"Young Canopy.md",
"Elderwomb.md",
"Incubator.md"
"[[Unit]]/[[Grell]]/2.5",
"[[Unit]]/[[Grell]]/1.5",
"Building/[[Grell]]/3"
]
}