mirror of
https://gitlab.com/upRootNutrition/obsidian.git
synced 2025-06-16 06:15:12 -05:00
feat: 5/10/24 update
This commit is contained in:
parent
e22bd788fe
commit
da37ce527c
32 changed files with 1130 additions and 45001 deletions
21
.obsidian/plugins/folders2graph/LICENSE
vendored
Executable file
21
.obsidian/plugins/folders2graph/LICENSE
vendored
Executable file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2024 Lucas Bastian
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
1
.obsidian/plugins/folders2graph/main.js
vendored
Executable file
1
.obsidian/plugins/folders2graph/main.js
vendored
Executable file
|
@ -0,0 +1 @@
|
|||
(()=>{"use strict";var t={452:e=>{e.exports=require("obsidian")}},a={};function i(e){var r=a[e];return void 0!==r||(r=a[e]={exports:{}},t[e](r,r.exports,i)),r.exports}var e={};{var r=e,o=(Object.defineProperty(r,"__esModule",{value:!0}),i(452));const l="tag";class d extends o.Plugin{async onload(){this.refreshGraphLeaves(),this.registerEvent(this.app.workspace.on("active-leaf-change",e=>{this.refreshGraphLeaves([e])})),this.registerEvent(this.app.workspace.on("layout-change",()=>{this.refreshGraphLeaves()}))}onunload(){this.getLeavesOfTypeGraph().forEach(e=>{e.view.renderer.originalSetData&&(e.view.renderer.setData=e.view.renderer.originalSetData,delete e.view.renderer.originalSetData,e.view.unload(),e.view.load())})}refreshGraphLeaves(e=this.getLeavesOfTypeGraph()){e.forEach(e=>{"graph"===e.view.getViewType()&&(this.injectDataInLeaf(e),e.view.unload(),e.view.load())})}injectDataInLeaf(e){const r=e.view.renderer;null==r.originalSetData&&(r.originalSetData=r.setData),r.setData=t=>{const a=new Set("/");if(Object.entries(t.nodes).forEach(([e,r])=>{e=this.getNodeParentFolders(e);r.folderNode||r.type==l||null==e||e.forEach(a.add,a)}),a.forEach(e=>{t.nodes[e]={type:l,links:{},folderNode:!0}}),Object.entries(t.nodes).forEach(([e,r])=>{r.type==l&&!r.folderNode||(r=this.getNodeParentFolder(e),t.nodes[r].links[e]=!0)}),r.originalSetData)return r.originalSetData(t);throw new Error("originalSetData is undefined.")}}getLeavesOfTypeGraph(){return this.app.workspace.getLeavesOfType("graph")}getNodeParentFolders(e){const r=["/"];e=e.split("/"),e=e.slice(0,e.length-1);let t="";return e.forEach(e=>{t+="/"+e,r.push(t)}),r}getNodeParentFolder(e){e=e.split("/");return"/"+e.slice(0,e.length-1).filter(e=>""!=e).join("/")}}r.default=d}var s,n=exports;for(s in e)n[s]=e[s];e.__esModule&&Object.defineProperty(n,"__esModule",{value:!0})})();
|
11
.obsidian/plugins/folders2graph/manifest.json
vendored
Executable file
11
.obsidian/plugins/folders2graph/manifest.json
vendored
Executable file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"id": "folders2graph",
|
||||
"name": "Folders to Graph",
|
||||
"description": "Display your vault folder structure into your graphs.",
|
||||
"version": "1.0.0",
|
||||
"author": "ratibus11",
|
||||
"authorUrl": "https://github.com/ratibus11",
|
||||
"fundingUrl": "https://paypal.me/bastianlucas",
|
||||
"minAppVersion": "1.4.16",
|
||||
"isDesktopOnly": false
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue