This commit is contained in:
binghuai
2025-09-25 10:49:38 +08:00
parent 51608d4b52
commit 3b41b22f59
12 changed files with 114 additions and 34 deletions

View File

@@ -1,5 +1,5 @@
{
"theme": "moonstone",
"theme": "obsidian",
"cssTheme": "Prism",
"enabledCssSnippets": [
"jindutiao"

View File

@@ -12,5 +12,6 @@
"obsidian-importer",
"obsidian-style-settings",
"obsidian-link-embed",
"obsidian-auto-link-title"
"obsidian-auto-link-title",
"automatic-table-of-contents"
]

View File

@@ -7,7 +7,7 @@
"canvas": true,
"outgoing-link": true,
"tag-pane": true,
"properties": false,
"properties": true,
"page-preview": true,
"daily-notes": true,
"templates": true,

View File

@@ -0,0 +1,13 @@
// Automatic Table Of Contents 1.7.3 (https://github.com/johansatge)
var c=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var d=c((ee,k)=>{var g=class{},p={},v=class{},w=t=>t;if(A()){let t=require("obsidian");g=t.Plugin,p=t.MarkdownRenderer,v=t.MarkdownRenderChild,w=t.htmlToMarkdown}k.exports={Plugin:g,MarkdownRenderer:p,MarkdownRenderChild:v,htmlToMarkdown:w};function A(){return typeof process!="object"?!0:!process.env||!process.env.JEST_WORKER_ID}});var y=c((re,b)=>{var s={title:{type:"string",default:"",comment:""},style:{type:"value",default:"nestedList",values:["nestedList","nestedOrderedList","inlineFirstLevel"],comment:"TOC style (nestedList|nestedOrderedList|inlineFirstLevel)"},minLevel:{type:"number",default:0,comment:"Include headings from the specified level"},maxLevel:{type:"number",default:0,comment:"Include headings up to the specified level"},include:{type:"regexp",default:null,comment:""},exclude:{type:"regexp",default:null,comment:""},includeLinks:{type:"boolean",default:!0,comment:"Make headings clickable"},hideWhenEmpty:{type:"boolean",default:!1,comment:"Hide TOC if no headings are found"},debugInConsole:{type:"boolean",default:!1,comment:"Print debug info in Obsidian console"}};b.exports={getOptionsDocs:P,parseOptionsFromSourceText:E};function P(){let t=[];for(let e of Object.keys(s)){let n=s[e],r=n.comment.length>0?` # ${n.comment}`:"",o=n.default!==null?n.default:"";t.push(`${e}: ${o}${r}`)}return t.join(`
`)}function E(t=""){let e={};for(let n of Object.keys(s))e[n]=s[n].default;for(let n of t.split(`
`)){let r=R(n);r!==null&&(e[r.name]=r.value)}return e}function R(t){let e=t.match(/([a-zA-Z0-9._ ]+):(.*)/);if(t.startsWith("#")||!e)return null;let n=e[1].trim(),r=s[n],o=e[2].trim();(!r||!["string","regexp"].includes(r.type))&&(o=o.replace(/#[^#]*$/,"").trim());let a=new Error(`Invalid value for \`${n}\``);if(r&&r.type==="number"){let i=Number.parseInt(o);if(i<0)throw a;return{name:n,value:i}}if(r&&r.type==="boolean"){if(!["true","false"].includes(o))throw a;return{name:n,value:o==="true"}}if(r&&r.type==="value"){if(!r.values.includes(o))throw a;return{name:n,value:o}}if(r&&r.type==="string")return{name:n,value:o};if(r&&r.type==="regexp"){if(o==="null"||o.length===0)return null;try{let i=/^\/(.*)\/([a-z]*)/.exec(o);if(!i)throw new Error("Invalid regexp");let l=new RegExp(i[1],i[2]);return{name:n,value:l}}catch{throw a}}return null}});var x=c((oe,L)=>{var{htmlToMarkdown:S}=d();L.exports={isHeadingAllowed:_,getFormattedMarkdownHeading:W};function _(t,e){return e.include?e.include.test(t):e.exclude?!e.exclude.test(t):!0}function W(t,e){if(e.includeLinks){let n=t;n=$(n),n=j(n),n=M(n,!1);let r=t;return r=M(r,!0),r=q(r),`[[#${r}|${n}]]`}return t}function $(t){return t.replaceAll("*","").replaceAll(/(\W|^)_+(\S)(.*?\S)?_+(\W|$)/g,"$1$2$3$4").replaceAll("`","").replaceAll("==","").replaceAll("~~","").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1")}function j(t){return $(S(t))}function M(t,e){return t.replace(/\[\[([^\]]+)\|([^\]]+)\]\]/g,e?"$1 $2":"$2").replace(/\[\[([^\]]+)\]\]/g,"$1").replaceAll("[[","").replaceAll("| ",e?"":"- ").replaceAll("|",e?" ":"-")}function q(t){return t.replaceAll("#"," ")}});var F=c((le,H)=>{var{isHeadingAllowed:C,getFormattedMarkdownHeading:I}=x();H.exports={getMarkdownFromHeadings:N};function N(t,e){let n={nestedList:D,nestedOrderedList:B,inlineFirstLevel:z},r="";if(e.title&&e.title.length>0){let a=e.style==="inlineFirstLevel"?" ":`
`;r+=`${e.title}${a}`}let o=n[e.style](t,e);return o===null?e.hideWhenEmpty?"":`${r}_Table of contents: no headings found_`:r+o}function D(t,e){return O(t,!1,e)}function B(t,e){return O(t,!0,e)}function O(t,e,n){let r=e?"1.":"-",o=[],a=n.minLevel>0?n.minLevel:Math.min(...t.map(l=>l.level)),i=0;for(let l of t)if(!(i>0&&l.level>i)){if(l.level<=i&&(i=0),!C(l.heading,n)){i=l.level;continue}l.level<a||n.maxLevel>0&&l.level>n.maxLevel||l.heading.length!==0&&o.push(`${" ".repeat(l.level-a)}${r} ${I(l.heading,n)}`)}return o.length>0?o.join(`
`):null}function z(t,e){let n=e.minLevel>0?e.minLevel:Math.min(...t.map(o=>o.level)),r=t.filter(o=>o.level===n).filter(o=>o.heading.length>0).filter(o=>C(o.heading,e)).map(o=>I(o.heading,e));return r.length>0?r.join(" | "):null}});var{Plugin:J,MarkdownRenderer:T,MarkdownRenderChild:K}=d(),{getOptionsDocs:V,parseOptionsFromSourceText:Z}=y(),{getMarkdownFromHeadings:G}=F(),h="table-of-contents",Q="toc",m=class extends J{async onload(){let e=(n,r,o)=>{o.addChild(new f(this.app,r,o.sourcePath,n))};this.registerMarkdownCodeBlockProcessor(h,e),this.registerMarkdownCodeBlockProcessor(Q,e),this.addCommand({id:"insert-automatic-table-of-contents",name:"Insert table of contents",editorCallback:U}),this.addCommand({id:"insert-automatic-table-of-contents-docs",name:"Insert table of contents (with available options)",editorCallback:X})}};function U(t){let e=`\`\`\`${h}
\`\`\``;t.replaceRange(e,t.getCursor())}function X(t){let e=[`\`\`\`${h}
${V()}
\`\`\``];t.replaceRange(e.join(`
`),t.getCursor())}var f=class extends K{constructor(e,n,r,o){super(n),this.app=e,this.element=n,this.sourcePath=r,this.sourceText=o}onload(){this.render(),this.registerEvent(this.app.metadataCache.on("changed",this.onMetadataChange.bind(this)))}onMetadataChange(){this.render()}render(){try{let e=Z(this.sourceText);e.debugInConsole&&u("Options",e);let n=this.app.metadataCache.getCache(this.sourcePath),r=n?.headings?n.headings:[];e.debugInConsole&&u("Headings",r);let o=G(r,e);e.debugInConsole&&u("Markdown",o),this.element.empty(),T.renderMarkdown(o,this.element,this.sourcePath,this)}catch(e){let n=`_\u{1F4A5} Could not render table of contents (${e.message})_`;T.renderMarkdown(n,this.element,this.sourcePath,this)}}};function u(t,e){console.log(`%cAutomatic Table Of Contents %c${t}:
`,"color: orange; font-weight: bold","font-weight: bold",e)}module.exports=m;
/* nosourcemap */

View File

@@ -0,0 +1,10 @@
{
"id": "automatic-table-of-contents",
"name": "Automatic Table Of Contents",
"version": "1.7.3",
"minAppVersion": "1.3.0",
"description": "Create a table of contents in a note, that updates itself when the note changes",
"author": "Johan Satgé",
"authorUrl": "https://github.com/johansatge",
"isDesktopOnly": false
}

View File

@@ -1,5 +1,7 @@
{
"obsidian-prism-theme@@color-schemes-lt": "pt-color-scheme-custom-lt",
"obsidian-prism-theme@@color-schemes-dt": "pt-color-scheme-custom-dt",
"obsidian-prism-theme@@pt-titlebar-hide-text": false
"obsidian-prism-theme@@pt-titlebar-hide-text": false,
"shimmering-focus@@active-line-highlight": "active-line-gutter",
"shimmering-focus@@alt-colorschemes": "colorscheme-gamma"
}

View File

@@ -1 +1 @@
{"月度/8月/8月.md":{"scroll":347.8164,"cursor":{"from":{"ch":13,"line":317},"to":{"ch":22,"line":317}}},"材料/服务器.md":{"scroll":5.2801,"cursor":{"from":{"ch":0,"line":25},"to":{"ch":0,"line":25}}},"月度/9月/9月.md":{"scroll":280.5761,"cursor":{"from":{"ch":0,"line":294},"to":{"ch":0,"line":294}}},"月度/7月/7月.md":{"scroll":138.3906,"cursor":{"from":{"ch":29,"line":147},"to":{"ch":29,"line":147}}},"月度/6月/6月.md":{"scroll":58.2917,"cursor":{"from":{"ch":72,"line":63},"to":{"ch":72,"line":63}}},"月度/5月/5月.md":{"scroll":93.1957,"cursor":{"from":{"ch":20,"line":105},"to":{"ch":20,"line":105}}},"月度/4月/4月.md":{"scroll":120.1806,"cursor":{"from":{"ch":20,"line":139},"to":{"ch":20,"line":139}}},"月度/3月/3月.md":{"scroll":32.7083,"cursor":{"from":{"ch":6,"line":39},"to":{"ch":6,"line":39}}},"月度/7月/7月工作总结及8月工作计划.md":{"scroll":0,"cursor":{"from":{"ch":0,"line":0},"to":{"ch":0,"line":0}}},"月度/6月/6月份晨午检bug修复.md":{"scroll":307.9981,"cursor":{"from":{"ch":0,"line":0},"to":{"ch":0,"line":0}}},"月度/7月/设备管理中心研发记录.md":{"scroll":110.1015,"cursor":{"from":{"ch":0,"line":0},"to":{"ch":0,"line":0}}},"月度/8月/CA身份认证app/CA身份认证app流程图.md":{"scroll":5.8654,"cursor":{"from":{"ch":0,"line":0},"to":{"ch":0,"line":0}}},"月度/9月/常见病/20250903常见病优化沟通.md":{"scroll":0.7205,"cursor":{"from":{"ch":0,"line":0},"to":{"ch":0,"line":0}}},"月度/9月/汇海/对接主机/不登录模式接口文档.md":{"scroll":0,"cursor":{"from":{"ch":0,"line":7},"to":{"ch":0,"line":7}}},"月度/9月/汇海/对接主机/登录算法和密钥.md":{"scroll":0,"cursor":{"from":{"ch":0,"line":9},"to":{"ch":0,"line":9}}},"月度/9月/汇海/对接主机/华夏汇海接口文档.md":{"scroll":1653.2083,"cursor":{"from":{"ch":19,"line":1328},"to":{"ch":19,"line":1328}}},"材料/配置/Obsidian快捷键.md":{"scroll":0,"cursor":{"from":{"ch":18,"line":16},"to":{"ch":18,"line":16}}},"材料/配置/工具.md":{"scroll":0,"cursor":{"from":{"ch":50,"line":0},"to":{"ch":50,"line":0}}}}
{"月度/8月/8月.md":{"scroll":451.6552,"cursor":{"from":{"ch":6,"line":465},"to":{"ch":6,"line":465}}},"材料/服务器.md":{"scroll":0.687,"cursor":{"from":{"ch":7,"line":10},"to":{"ch":17,"line":10}}},"月度/9月/9月.md":{"scroll":294.4507,"cursor":{"from":{"ch":0,"line":307},"to":{"ch":0,"line":307}}},"月度/7月/7月.md":{"scroll":138.3906,"cursor":{"from":{"ch":29,"line":147},"to":{"ch":29,"line":147}}},"月度/6月/6月.md":{"scroll":58.2917,"cursor":{"from":{"ch":72,"line":63},"to":{"ch":72,"line":63}}},"月度/5月/5月.md":{"scroll":93.1957,"cursor":{"from":{"ch":20,"line":105},"to":{"ch":20,"line":105}}},"月度/4月/4月.md":{"scroll":120.1806,"cursor":{"from":{"ch":20,"line":139},"to":{"ch":20,"line":139}}},"月度/3月/3月.md":{"scroll":32.7083,"cursor":{"from":{"ch":6,"line":39},"to":{"ch":6,"line":39}}},"月度/7月/7月工作总结及8月工作计划.md":{"scroll":0,"cursor":{"from":{"ch":0,"line":0},"to":{"ch":0,"line":0}}},"月度/6月/6月份晨午检bug修复.md":{"scroll":307.9981,"cursor":{"from":{"ch":0,"line":0},"to":{"ch":0,"line":0}}},"月度/7月/设备管理中心研发记录.md":{"scroll":110.1015,"cursor":{"from":{"ch":0,"line":0},"to":{"ch":0,"line":0}}},"月度/8月/CA身份认证app/CA身份认证app流程图.md":{"scroll":5.8654,"cursor":{"from":{"ch":0,"line":0},"to":{"ch":0,"line":0}}},"月度/9月/常见病/20250903常见病优化沟通.md":{"scroll":0.7205,"cursor":{"from":{"ch":0,"line":0},"to":{"ch":0,"line":0}}},"月度/9月/汇海/对接主机/不登录模式接口文档.md":{"scroll":36.3079,"cursor":{"from":{"ch":10,"line":11},"to":{"ch":10,"line":11}}},"月度/9月/汇海/对接主机/登录算法和密钥.md":{"scroll":0,"cursor":{"from":{"ch":0,"line":9},"to":{"ch":0,"line":9}}},"月度/9月/汇海/对接主机/华夏汇海接口文档.md":{"scroll":1653.2083,"cursor":{"from":{"ch":19,"line":1328},"to":{"ch":19,"line":1328}}},"材料/配置/Obsidian快捷键.md":{"scroll":0,"cursor":{"from":{"ch":18,"line":16},"to":{"ch":18,"line":16}}},"材料/配置/工具.md":{"scroll":0,"cursor":{"from":{"ch":50,"line":0},"to":{"ch":50,"line":0}}}}

View File

@@ -4,25 +4,25 @@
"type": "split",
"children": [
{
"id": "98d33b1dc65bb288",
"id": "220d9983e79f41cf",
"type": "tabs",
"children": [
{
"id": "8fb520badf9154a8",
"id": "a235abeecb5f99cd",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "月度/9月/汇海/对接主机/华夏汇海接口文档.md",
"file": "月度/9月/9月.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "华夏汇海接口文档"
"title": "9月"
}
},
{
"id": "00945af966ea77da",
"id": "b2245126a9b6c144",
"type": "leaf",
"state": {
"type": "markdown",
@@ -34,9 +34,23 @@
"icon": "lucide-file",
"title": "不登录模式接口文档"
}
},
{
"id": "7db3464b3bdfb68c",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "材料/服务器.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "服务器"
}
}
],
"currentTab": 1
"currentTab": 2
}
],
"direction": "vertical"
@@ -68,7 +82,7 @@
"state": {
"type": "search",
"state": {
"query": "",
"query": "tag:#lpane",
"matchingCase": false,
"explainSearch": false,
"collapseAll": false,
@@ -109,13 +123,13 @@
"state": {
"type": "outline",
"state": {
"file": "月度/9月/汇海/对接主机/不登录模式接口文档.md",
"file": "材料/服务器.md",
"followCursor": false,
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-list",
"title": "不登录模式接口文档 的大纲"
"title": "服务器 的大纲"
}
},
{
@@ -165,6 +179,20 @@
"icon": "lucide-tags",
"title": "标签"
}
},
{
"id": "e58658e6a9a90e18",
"type": "leaf",
"state": {
"type": "all-properties",
"state": {
"sortOrder": "frequency",
"showSearch": false,
"searchQuery": ""
},
"icon": "lucide-archive",
"title": "添加笔记属性"
}
}
]
}
@@ -183,30 +211,31 @@
"templates:插入模板": false,
"command-palette:打开命令面板": false,
"obsidian-excalidraw-plugin:新建绘图文件": false,
"univer:Univer": false,
"obsidian-git:Open Git source control": false,
"obsidian-importer:Open Importer": false
"obsidian-importer:Open Importer": false,
"univer:Univer": false
}
},
"active": "e726e6f21e6a6cb2",
"active": "7db3464b3bdfb68c",
"lastOpenFiles": [
"月度/9月/9月.md",
"材料/服务器.md",
"月度/9月/汇海/对接主机/不登录模式接口文档.md",
"未命名.md",
"月度/8月/资源发展中心汇报/资源发展中心问题.md",
"月度/8月/8月.md",
"月度/月度封面.base",
"月度/9月/汇海/对接主机/华夏汇海接口文档.md",
"月度/9月/汇海/2025 09 22新疆学生体质健康网—— 普测—— 照片采集方法.docx",
"月度/9月/汇海/2025 09 22新疆学生体质健康网—— 普测—— 照片采集方法.pdf",
"月度/9月/汇海/汇海人脸识别操作说明.docx",
"月度/9月/汇海/软件录入照片采集功能使用说明.pdf",
"月度/9月/漏扫/~$6天衡QWSY渗透测试报告.docx",
"月度/9月/漏扫/新疆青卫舜源网络资产情况表.xlsx",
"月度/9月/漏扫/Alibaba druid index,html 未授权访问漏洞修复记录.docx",
"月度/9月/9月.md",
"月度/8月/8月.md",
"月度/9月/汇海/对接主机/不登录模式接口文档.md",
"月度/9月/汇海/对接主机/华夏汇海接口文档.md",
"月度/9月/汇海/对接主机/登录算法和密钥.md",
"月度/9月/汇海/照片采集说明~D7C5F.tmp",
"月度/9月/汇海/照片采集说明~CE04E.tmp",
"月度/9月/汇海/~$照片采集说明.docx",
"月度/9月/汇海/照片采集说明.docx",
"月度/9月/汇海/新建 DOCX 文档.docx",
"月度/9月/汇海/软件录入照片采集功能使用说明.pdf",
"材料/frp/frpc.exe",
"月度/9月/汇海/汇海人脸识别操作说明.docx",
"材料/服务器.md",
"材料/配置/工具.md",
"主机登录模式API接口文档 .docx.md",
"材料/配置/Obsidian快捷键.md",
@@ -225,7 +254,6 @@
"月度/9月/解析汇海设备请求.md",
"月度/9月/体质测试数据上传接口文档.md",
"月度/9月/9.12与华夏汇海对接线上技术会.md",
"月度/9月/华夏汇海技术对接交流会议纪要.md",
"图片/9月.png",
"月度/未命名.canvas",
"图片/8月.png",