chore: sync
This commit is contained in:
8
mengyanote-backend/data/mengyanote/.obsidian/app.json
vendored
Normal file
8
mengyanote-backend/data/mengyanote/.obsidian/app.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"promptDelete": false,
|
||||
"readableLineLength": false,
|
||||
"strictLineBreaks": false,
|
||||
"showLineNumber": false,
|
||||
"rightToLeft": false,
|
||||
"spellcheck": false
|
||||
}
|
||||
10
mengyanote-backend/data/mengyanote/.obsidian/appearance.json
vendored
Normal file
10
mengyanote-backend/data/mengyanote/.obsidian/appearance.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"cssTheme": "Phycat",
|
||||
"theme": "moonstone",
|
||||
"monospaceFontFamily": "霞鹜文楷,Maple Mono NF CN",
|
||||
"baseFontSize": 15,
|
||||
"interfaceFontFamily": "Maple Mono NF CN",
|
||||
"textFontFamily": "霞鹜文楷,Maple Mono NF CN",
|
||||
"nativeMenus": false,
|
||||
"accentColor": "#ffbb00"
|
||||
}
|
||||
9
mengyanote-backend/data/mengyanote/.obsidian/community-plugins.json
vendored
Normal file
9
mengyanote-backend/data/mengyanote/.obsidian/community-plugins.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
[
|
||||
"obsidian-style-settings",
|
||||
"obsidian-hover-editor",
|
||||
"remotely-save",
|
||||
"obsidian42-brat",
|
||||
"editing-toolbar",
|
||||
"obsidian-icon-folder",
|
||||
"tray"
|
||||
]
|
||||
33
mengyanote-backend/data/mengyanote/.obsidian/core-plugins.json
vendored
Normal file
33
mengyanote-backend/data/mengyanote/.obsidian/core-plugins.json
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"file-explorer": true,
|
||||
"global-search": true,
|
||||
"switcher": true,
|
||||
"graph": false,
|
||||
"backlink": true,
|
||||
"canvas": false,
|
||||
"outgoing-link": true,
|
||||
"tag-pane": true,
|
||||
"properties": false,
|
||||
"page-preview": true,
|
||||
"daily-notes": false,
|
||||
"templates": false,
|
||||
"note-composer": true,
|
||||
"command-palette": true,
|
||||
"slash-command": false,
|
||||
"editor-status": true,
|
||||
"bookmarks": true,
|
||||
"markdown-importer": false,
|
||||
"zk-prefixer": false,
|
||||
"random-note": false,
|
||||
"outline": false,
|
||||
"word-count": true,
|
||||
"slides": false,
|
||||
"audio-recorder": false,
|
||||
"workspaces": false,
|
||||
"file-recovery": true,
|
||||
"publish": false,
|
||||
"sync": false,
|
||||
"webviewer": false,
|
||||
"footnotes": false,
|
||||
"bases": false
|
||||
}
|
||||
22
mengyanote-backend/data/mengyanote/.obsidian/graph.json
vendored
Normal file
22
mengyanote-backend/data/mengyanote/.obsidian/graph.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"collapse-filter": true,
|
||||
"search": "",
|
||||
"showTags": false,
|
||||
"showAttachments": false,
|
||||
"hideUnresolved": false,
|
||||
"showOrphans": true,
|
||||
"collapse-color-groups": true,
|
||||
"colorGroups": [],
|
||||
"collapse-display": true,
|
||||
"showArrow": false,
|
||||
"textFadeMultiplier": 0,
|
||||
"nodeSizeMultiplier": 1,
|
||||
"lineSizeMultiplier": 1,
|
||||
"collapse-forces": true,
|
||||
"centerStrength": 0.518713248970312,
|
||||
"repelStrength": 10,
|
||||
"linkStrength": 1,
|
||||
"linkDistance": 250,
|
||||
"scale": 1,
|
||||
"close": true
|
||||
}
|
||||
456
mengyanote-backend/data/mengyanote/.obsidian/plugins/editing-toolbar/data.json
vendored
Normal file
456
mengyanote-backend/data/mengyanote/.obsidian/plugins/editing-toolbar/data.json
vendored
Normal file
@@ -0,0 +1,456 @@
|
||||
{
|
||||
"lastVersion": "3.2.7",
|
||||
"aestheticStyle": "default",
|
||||
"positionStyle": "top",
|
||||
"menuCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:editor-undo",
|
||||
"name": "Undo Edit",
|
||||
"icon": "undo-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor-redo",
|
||||
"name": "Redo Edit",
|
||||
"icon": "redo-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:toggle-format-brush",
|
||||
"name": "Format Brush",
|
||||
"icon": "paintbrush"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:format-eraser",
|
||||
"name": "Clear Text Formatting",
|
||||
"icon": "eraser"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:header2-text",
|
||||
"name": "Header 2",
|
||||
"icon": "header-2"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:header3-text",
|
||||
"name": "Header 3",
|
||||
"icon": "header-3"
|
||||
},
|
||||
{
|
||||
"id": "SubmenuCommands-header",
|
||||
"name": "submenu",
|
||||
"icon": "header-n",
|
||||
"SubmenuCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:header1-text",
|
||||
"name": "Header 1",
|
||||
"icon": "header-1"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:header4-text",
|
||||
"name": "Header 4",
|
||||
"icon": "header-4"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:header5-text",
|
||||
"name": "Header 5",
|
||||
"icon": "header-5"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:header6-text",
|
||||
"name": "Header 6",
|
||||
"icon": "header-6"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:toggle-bold",
|
||||
"name": "Bold",
|
||||
"icon": "bold-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:toggle-italics",
|
||||
"name": "Italic",
|
||||
"icon": "italic-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:toggle-strikethrough",
|
||||
"name": "Strikethrough",
|
||||
"icon": "strikethrough-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:underline",
|
||||
"name": "Underline",
|
||||
"icon": "underline-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:toggle-highlight",
|
||||
"name": "Highlight",
|
||||
"icon": "highlight-glyph"
|
||||
},
|
||||
{
|
||||
"id": "SubmenuCommands-text-tools",
|
||||
"name": "Text Tools",
|
||||
"icon": "box",
|
||||
"menuType": "dropdown",
|
||||
"SubmenuCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:get-plain-text",
|
||||
"name": "Get Plain Text",
|
||||
"icon": "lucide-file-text"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:smart-symbols",
|
||||
"name": "Full Half Converter",
|
||||
"icon": "lucide-at-sign"
|
||||
},
|
||||
{
|
||||
"id": "editingToolbar-Divider-Line",
|
||||
"name": "Line Operations",
|
||||
"icon": "vertical-split"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:insert-blank-lines",
|
||||
"name": "Insert Blank Lines",
|
||||
"icon": "lucide-space"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:remove-blank-lines",
|
||||
"name": "Remove Blank Lines",
|
||||
"icon": "lucide-minimize-2"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:split-lines",
|
||||
"name": "Split Lines",
|
||||
"icon": "lucide-split"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:merge-lines",
|
||||
"name": "Merge Lines",
|
||||
"icon": "lucide-merge"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:dedupe-lines",
|
||||
"name": "Dedupe Lines",
|
||||
"icon": "lucide-filter"
|
||||
},
|
||||
{
|
||||
"id": "editingToolbar-Divider-Line",
|
||||
"name": "Text Processing",
|
||||
"icon": "vertical-split"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:add-wrap",
|
||||
"name": "Add Prefix/Suffix",
|
||||
"icon": "lucide-wrap-text"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:number-lines",
|
||||
"name": "Number Lines (Custom)",
|
||||
"icon": "lucide-list-ordered"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:remove-whitespace-trim",
|
||||
"name": "Trim Line Ends",
|
||||
"icon": "lucide-scissors"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:remove-whitespace-compress",
|
||||
"name": "Shrink Extra Spaces",
|
||||
"icon": "lucide-minimize"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:remove-whitespace-all",
|
||||
"name": "Remove All Whitespace",
|
||||
"icon": "lucide-eraser"
|
||||
},
|
||||
{
|
||||
"id": "editingToolbar-Divider-Line",
|
||||
"name": "Advanced Tools",
|
||||
"icon": "vertical-split"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:list-to-table",
|
||||
"name": "List to Table",
|
||||
"icon": "lucide-table"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:table-to-list",
|
||||
"name": "Table to List",
|
||||
"icon": "lucide-list"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:extract-between",
|
||||
"name": "Extract Between Strings",
|
||||
"icon": "lucide-brackets"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "SubmenuCommands-lucdf3en5",
|
||||
"name": "submenu",
|
||||
"icon": "edit",
|
||||
"SubmenuCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:editor-cut",
|
||||
"name": "Cut",
|
||||
"icon": "lucide-scissors"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor-copy",
|
||||
"name": "Copy",
|
||||
"icon": "lucide-copy"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor-paste",
|
||||
"name": "Paste",
|
||||
"icon": "lucide-clipboard-type"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor:swap-line-down",
|
||||
"name": "Swap Line Down",
|
||||
"icon": "lucide-corner-right-down"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor:swap-line-up",
|
||||
"name": "Swap Line Up",
|
||||
"icon": "lucide-corner-right-up"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor:attach-file",
|
||||
"name": "Attach File",
|
||||
"icon": "lucide-paperclip"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor:insert-table",
|
||||
"name": "Insert Table",
|
||||
"icon": "lucide-table"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor:cycle-list-checklist",
|
||||
"name": "Cycle List and Checklist",
|
||||
"icon": "check-circle"
|
||||
},
|
||||
{
|
||||
"id": "SubmenuCommands-luc8efull",
|
||||
"name": "submenu",
|
||||
"icon": "message-square",
|
||||
"SubmenuCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:editor:toggle-blockquote",
|
||||
"name": "Blockquote",
|
||||
"icon": "lucide-text-quote"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:insert-callout",
|
||||
"name": "Callout",
|
||||
"icon": "lucide-quote"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "SubmenuCommands-mdcmder",
|
||||
"name": "submenu",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M464 608 l0 -568 q0 -3 -2.5 -5.5 q-2.5 -2.5 -5.5 -2.5 l-80 0 q-3 0 -5.5 2.5 q-2.5 2.5 -2.5 5.5 l0 568 l-232 0 q-3 0 -5.5 2.5 q-2.5 2.5 -2.5 5.5 l0 80 q0 3 2.5 5.5 q2.5 2.5 5.5 2.5 l560 0 q3 0 5.5 -2.5 q2.5 -2.5 2.5 -5.5 l0 -80 q0 -3 -2.5 -5.5 q-2.5 -2.5 -5.5 -2.5 l-232 0 ZM864 696 q17 0 28.5 11.5 q11.5 11.5 11.5 28.5 q0 17 -11.5 28.5 q-11.5 11.5 -28.5 11.5 q-17 0 -28.5 -11.5 q-11.5 -11.5 -11.5 -28.5 q0 -17 11.5 -28.5 q11.5 -11.5 28.5 -11.5 ZM864 640 q-40 0 -68 28 q-28 28 -28 68 q0 40 28 68 q28 28 68 28 q40 0 68 -28 q28 -28 28 -68 q0 -40 -28 -68 q-28 -28 -68 -28 ZM576 322 l0 -63 q0 -3 2 -5 l89 -70 l-89 -70 q-2 -2 -2 -5 l0 -63 q0 -4 3.5 -5.5 q3.5 -1.5 6.5 0.5 l170 133 q4 3 4.5 8.5 q0.5 5.5 -2.5 9.5 l-2 2 l-170 133 q-3 2 -6.5 0.5 q-3.5 -1.5 -3.5 -5.5 ZM256 322 l0 -63 q0 -3 -2 -5 l-89 -70 l89 -70 q2 -2 2 -5 l0 -63 q0 -4 -3.5 -5.5 q-3.5 -1.5 -6.5 0.5 l-170 133 q-4 3 -4.5 8.5 q-0.5 5.5 2.5 9.5 l2 2 l170 133 q3 2 6.5 0.5 q3.5 -1.5 3.5 -5.5 Z\"></path></g></svg>",
|
||||
"SubmenuCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:superscript",
|
||||
"name": "Superscript",
|
||||
"icon": "superscript-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:subscript",
|
||||
"name": "Subscript",
|
||||
"icon": "subscript-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor:toggle-code",
|
||||
"name": "Inline Code",
|
||||
"icon": "code-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:codeblock",
|
||||
"name": "Code Block",
|
||||
"icon": "codeblock-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor:insert-wikilink",
|
||||
"name": "Wikilink",
|
||||
"icon": "<svg width=\"15\" height=\"15\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M306 134 l91 0 q1 0 1 -8 l0 -80 q0 -8 -1 -8 l-91 0 q-1 0 -1 7 q0 -8 -5 -8 l-45 0 q-5 0 -5 8 l0 784 q0 8 5 8 l45 0 q5 0 5 -8 q0 8 1 8 l91 0 q1 0 1 -8 l0 -80 q0 -8 -1 -8 l-91 0 q-1 0 -1 8 l0 -623 q0 8 1 8 ZM139 134 l91 0 q1 0 1 -8 l0 -80 q0 -8 -1 -8 l-91 0 q-1 0 -1 7 q0 -8 -5 -8 l-45 0 q-5 0 -5 8 l0 784 q0 8 5 8 l45 0 q5 0 5 -8 q0 8 1 8 l91 0 q1 0 1 -8 l0 -80 q0 -8 -1 -8 l-91 0 q-1 0 -1 8 l0 -623 q0 8 1 8 ZM711 134 q1 0 1 -8 l0 623 q0 -8 -1 -8 l-91 0 q-1 0 -1 8 l0 80 q0 8 1 8 l91 0 q1 0 1 -8 q0 8 4 8 l46 0 q4 0 4 -8 l0 -784 q0 -8 -4 -8 l-46 0 q-4 0 -4 8 q0 -7 -1 -7 l-91 0 q-1 0 -1 8 l0 80 q0 8 1 8 l91 0 ZM878 134 q1 0 1 -8 l0 623 q0 -8 -1 -8 l-91 0 q-1 0 -1 8 l0 80 q0 8 1 8 l91 0 q1 0 1 -8 q0 8 5 8 l45 0 q4 0 4 -8 l0 -784 q0 -8 -4 -8 l-45 0 q-5 0 -5 8 q0 -7 -1 -7 l-91 0 q-1 0 -1 8 l0 80 q0 8 1 8 l91 0 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor:insert-embed",
|
||||
"name": "Embed",
|
||||
"icon": "note-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:insert-link",
|
||||
"name": "Link",
|
||||
"icon": "link-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:hrline",
|
||||
"name": "Horizontal Divider",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M912 424 l0 -80 q0 -3 -2.5 -5.5 q-2.5 -2.5 -5.5 -2.5 l-784 0 q-3 0 -5.5 2.5 q-2.5 2.5 -2.5 5.5 l0 80 q0 3 2.5 5.5 q2.5 2.5 5.5 2.5 l784 0 q3 0 5.5 -2.5 q2.5 -2.5 2.5 -5.5 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:toggle-inline-math",
|
||||
"name": "Inline Math",
|
||||
"icon": "lucide-sigma"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:editor:insert-mathblock",
|
||||
"name": "MathBlock",
|
||||
"icon": "lucide-sigma-square"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "SubmenuCommands-list",
|
||||
"name": "submenu-list",
|
||||
"icon": "bullet-list-glyph",
|
||||
"SubmenuCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:editor:toggle-checklist-status",
|
||||
"name": "Checklist",
|
||||
"icon": "checkbox-glyph"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:renumber-ordered-list",
|
||||
"name": "Renumber Ordered List",
|
||||
"icon": "list-restart"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:toggle-numbered-list",
|
||||
"name": "Ordered List",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M860 424 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-457 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l457 0 ZM860 756 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-457 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l457 0 ZM860 92 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-457 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l457 0 ZM264 136 l-3 -3 l-51 -57 l56 0 q14 0 24.5 -10 q10.5 -10 11.5 -25 l0 -1 q0 -15 -10.5 -25.5 q-10.5 -10.5 -24.5 -10.5 l-137 0 q-15 0 -25 10 q-10 10 -11 24.5 q-1 14.5 9 25.5 l63 70 l49 54 q7 7 7 16.5 q0 9.5 -7.5 16.5 q-7.5 7 -18.5 7 q-11 0 -18.5 -6.5 q-7.5 -6.5 -8.5 -16.5 l0 0 q0 -15 -10.5 -25.5 q-10.5 -10.5 -25.5 -10.5 q-15 0 -25.5 10.5 q-10.5 10.5 -10.5 25.5 q0 26 13.5 47.5 q13.5 21.5 36 34.5 q22.5 13 49 13 q26.5 0 49.5 -13 q23 -13 36 -34.5 q13 -21.5 13 -47.5 q0 -20 -7.5 -37.5 q-7.5 -17.5 -21.5 -30.5 l-1 -1 ZM173 794 q11 11 25 10.5 q14 -0.5 24.5 -10.5 q10.5 -10 10.5 -25 l0 -293 q0 -15 -10 -25.5 q-10 -10.5 -25 -10.5 q-15 0 -25.5 10 q-10.5 10 -11.5 25 l0 211 q-10 -8 -23.5 -7 q-13.5 1 -22.5 11 l-1 0 q-10 11 -9.5 25.5 q0.5 14.5 10.5 24.5 l58 54 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:toggle-bullet-list",
|
||||
"name": "Unordered List",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M860 424 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-477 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l477 0 ZM860 756 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-477 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l477 0 ZM860 92 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-477 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l477 0 ZM176 716 l0 0 ZM112 716 q0 -27 18.5 -45.5 q18.5 -18.5 45.5 -18.5 q27 0 45.5 18.5 q18.5 18.5 18.5 45.5 q0 27 -18.5 45.5 q-18.5 18.5 -45.5 18.5 q-27 0 -45.5 -18.5 q-18.5 -18.5 -18.5 -45.5 ZM176 384 l0 0 ZM112 384 q0 -27 18.5 -45.5 q18.5 -18.5 45.5 -18.5 q27 0 45.5 18.5 q18.5 18.5 18.5 45.5 q0 27 -18.5 45.5 q-18.5 18.5 -45.5 18.5 q-27 0 -45.5 -18.5 q-18.5 -18.5 -18.5 -45.5 ZM176 52 l0 0 ZM112 52 q0 -27 18.5 -45.5 q18.5 -18.5 45.5 -18.5 q27 0 45.5 18.5 q18.5 18.5 18.5 45.5 q0 27 -18.5 45.5 q-18.5 18.5 -45.5 18.5 q-27 0 -45.5 -18.5 q-18.5 -18.5 -18.5 -45.5 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:undent-list",
|
||||
"name": "Unindent List",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M872 302 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-429 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l429 0 ZM872 542 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-429 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l429 0 ZM872 784 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM872 62 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM244 534 l-123 -122 q-8 -7 -8 -18 q0 -11 8 -18 l123 -122 q8 -7 19 -7 q11 0 18.5 7.5 q7.5 7.5 7.5 18.5 l0 242 q0 11 -7.5 18.5 q-7.5 7.5 -18.5 7.5 q-11 0 -19 -7 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:indent-list",
|
||||
"name": "Indent list",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M872 302 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-429 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l429 0 ZM872 542 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-429 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l429 0 ZM872 784 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM872 62 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM158 534 l124 -122 q7 -7 7 -18 q0 -11 -7 -18 l-124 -122 q-7 -7 -18 -7 q-11 0 -19 7.5 q-8 7.5 -8 18.5 l0 242 q0 11 8 18.5 q8 7.5 19 7.5 q11 0 18 -7 Z\"></path></g></svg>"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "SubmenuCommands-aligin",
|
||||
"name": "submenu-aligin",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M724 304 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 540 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM724 776 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 68 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 Z\"></path></g></svg>",
|
||||
"SubmenuCommands": [
|
||||
{
|
||||
"id": "editing-toolbar:justify",
|
||||
"name": "Justify Text",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M112 736 l0 0 ZM120 736 l784 0 q8 0 8 -8 l0 -80 q0 -8 -8 -8 l-784 0 q-8 0 -8 8 l0 80 q0 8 8 8 ZM112 331 l0 0 ZM120 331 l784 0 q8 0 8 -8 l0 -80 q0 -8 -8 -8 l-784 0 q-8 0 -8 8 l0 80 q0 8 8 8 ZM112 128 l0 0 ZM120 128 l784 0 q8 0 8 -8 l0 -80 q0 -8 -8 -8 l-784 0 q-8 0 -8 8 l0 80 q0 8 8 8 ZM112 533 l0 0 ZM120 533 l784 0 q8 0 8 -8 l0 -80 q0 -8 -8 -8 l-784 0 q-8 0 -8 8 l0 80 q0 8 8 8 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:left",
|
||||
"name": "Align Text Left",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M572 304 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 540 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM572 776 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 68 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:center",
|
||||
"name": "Center Text",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M724 304 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 540 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM724 776 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 68 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 Z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:right",
|
||||
"name": "Align Text Right",
|
||||
"icon": "<svg width=\"18\" height=\"18\" focusable=\"false\" fill=\"currentColor\" viewBox=\"0 0 1024 1024\"><g transform=\"scale(1, -1) translate(0, -896) scale(0.9, 0.9) \"><path class=\"path\" d=\"M872 304 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 540 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 ZM872 776 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-421 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l421 0 ZM872 68 q17 0 28.5 -11.5 q11.5 -11.5 11.5 -28 q0 -16.5 -11.5 -28.5 q-11.5 -12 -27.5 -12 l-721 0 q-17 0 -28.5 11.5 q-11.5 11.5 -11.5 28 q0 16.5 11.5 28.5 q11.5 12 27.5 12 l721 0 Z\"></path></g></svg>"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:change-font-color",
|
||||
"name": "Change Font Color",
|
||||
"icon": "<svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" focusable=\"false\" fill=\"currentColor\"><g fill-rule=\"evenodd\"><path id=\"change-font-color-icon\" d=\"M3 18h18v3H3z\" style=\"fill:#2DC26B\"></path><path d=\"M8.7 16h-.8a.5.5 0 01-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 01-.5.6h-.8a.5.5 0 01-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 00.5.6h1.6a.5.5 0 00.5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z\"></path></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:change-background-color",
|
||||
"name": "Change Background Color",
|
||||
"icon": "<svg width=\"18\" height=\"24\" viewBox=\"0 0 256 256\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><g stroke=\"none\" stroke-width=\"1\" fill=\"currentColor\" fill-rule=\"evenodd\"><g ><g fill=\"currentColor\"><g transform=\"translate(119.502295, 137.878331) rotate(-135.000000) translate(-119.502295, -137.878331) translate(48.002295, 31.757731)\" ><path d=\"M100.946943,60.8084699 L43.7469427,60.8084699 C37.2852111,60.8084699 32.0469427,66.0467383 32.0469427,72.5084699 L32.0469427,118.70847 C32.0469427,125.170201 37.2852111,130.40847 43.7469427,130.40847 L100.946943,130.40847 C107.408674,130.40847 112.646943,125.170201 112.646943,118.70847 L112.646943,72.5084699 C112.646943,66.0467383 107.408674,60.8084699 100.946943,60.8084699 Z M93.646,79.808 L93.646,111.408 L51.046,111.408 L51.046,79.808 L93.646,79.808 Z\" fill-rule=\"nonzero\"></path><path d=\"M87.9366521,16.90916 L87.9194966,68.2000001 C87.9183543,69.4147389 86.9334998,70.399264 85.7187607,70.4 L56.9423078,70.4 C55.7272813,70.4 54.7423078,69.4150264 54.7423078,68.2 L54.7423078,39.4621057 C54.7423078,37.2523513 55.5736632,35.1234748 57.0711706,33.4985176 L76.4832996,12.4342613 C78.9534987,9.75382857 83.1289108,9.5834005 85.8093436,12.0535996 C87.1658473,13.303709 87.9372691,15.0644715 87.9366521,16.90916 Z\" fill-rule=\"evenodd\"></path><path d=\"M131.3,111.241199 L11.7,111.241199 C5.23826843,111.241199 0,116.479467 0,122.941199 L0,200.541199 C0,207.002931 5.23826843,212.241199 11.7,212.241199 L131.3,212.241199 C137.761732,212.241199 143,207.002931 143,200.541199 L143,122.941199 C143,116.479467 137.761732,111.241199 131.3,111.241199 Z M124,130.241 L124,193.241 L19,193.241 L19,130.241 L124,130.241 Z\" fill-rule=\"nonzero\"></path></g></g><path d=\"M51,218 L205,218 C211.075132,218 216,222.924868 216,229 C216,235.075132 211.075132,240 205,240 L51,240 C44.9248678,240 40,235.075132 40,229 C40,222.924868 44.9248678,218 51,218 Z\" id=\"change-background-color-icon\" style=\"fill:#FA541C\"></path></g></g></svg>"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:fullscreen-focus",
|
||||
"name": "Fullscreen Focus Mode",
|
||||
"icon": "fullscreen"
|
||||
},
|
||||
{
|
||||
"id": "editing-toolbar:workplace-fullscreen-focus",
|
||||
"name": "Workplace Fullscreen",
|
||||
"icon": "exit-fullscreen"
|
||||
}
|
||||
],
|
||||
"followingCommands": [],
|
||||
"topCommands": [],
|
||||
"fixedCommands": [],
|
||||
"mobileCommands": [],
|
||||
"enableMultipleConfig": false,
|
||||
"enableTopToolbar": true,
|
||||
"enableFollowingToolbar": false,
|
||||
"enableFixedToolbar": false,
|
||||
"appendMethod": "workspace",
|
||||
"shouldShowMenuOnSelect": false,
|
||||
"cMenuVisibility": true,
|
||||
"cMenuBottomValue": 4.25,
|
||||
"cMenuNumRows": 12,
|
||||
"cMenuWidth": 610,
|
||||
"cMenuFontColor": "#c00000",
|
||||
"cMenuBackgroundColor": "#d3f8b6",
|
||||
"autohide": false,
|
||||
"Iscentered": false,
|
||||
"custom_bg1": "#FFB78B8C",
|
||||
"custom_bg2": "#CDF4698C",
|
||||
"custom_bg3": "#A0CCF68C",
|
||||
"custom_bg4": "#F0A7D88C",
|
||||
"custom_bg5": "#ADEFEF8C",
|
||||
"custom_fc1": "#D83931",
|
||||
"custom_fc2": "#DE7802",
|
||||
"custom_fc3": "#245BDB",
|
||||
"custom_fc4": "#6425D0",
|
||||
"custom_fc5": "#646A73",
|
||||
"isLoadOnMobile": false,
|
||||
"horizontalPosition": 0,
|
||||
"verticalPosition": 0,
|
||||
"formatBrushes": {},
|
||||
"customCommands": [],
|
||||
"viewTypeSettings": {},
|
||||
"appearanceByStyle": {
|
||||
"top": {
|
||||
"toolbarBackgroundColor": "rgba(var(--background-secondary-rgb), 0.7)",
|
||||
"toolbarIconColor": "var(--text-normal)",
|
||||
"toolbarIconSize": 18,
|
||||
"aestheticStyle": "default"
|
||||
},
|
||||
"following": {
|
||||
"toolbarBackgroundColor": "rgba(var(--background-secondary-rgb), 0.7)",
|
||||
"toolbarIconColor": "var(--text-normal)",
|
||||
"toolbarIconSize": 18,
|
||||
"aestheticStyle": "default"
|
||||
},
|
||||
"fixed": {
|
||||
"toolbarBackgroundColor": "rgba(var(--background-secondary-rgb), 0.7)",
|
||||
"toolbarIconColor": "var(--text-normal)",
|
||||
"toolbarIconSize": 18,
|
||||
"aestheticStyle": "default"
|
||||
},
|
||||
"mobile": {
|
||||
"toolbarBackgroundColor": "rgba(var(--background-secondary-rgb), 0.7)",
|
||||
"toolbarIconColor": "var(--text-normal)",
|
||||
"toolbarIconSize": 18,
|
||||
"aestheticStyle": "default"
|
||||
}
|
||||
},
|
||||
"toolbarBackgroundColor": "rgba(var(--background-secondary-rgb), 0.7)",
|
||||
"toolbarIconColor": "var(--text-normal)",
|
||||
"toolbarIconSize": 18,
|
||||
"useCurrentLineForRegex": false
|
||||
}
|
||||
12
mengyanote-backend/data/mengyanote/.obsidian/plugins/editing-toolbar/main.js
vendored
Normal file
12
mengyanote-backend/data/mengyanote/.obsidian/plugins/editing-toolbar/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
mengyanote-backend/data/mengyanote/.obsidian/plugins/editing-toolbar/manifest.json
vendored
Normal file
10
mengyanote-backend/data/mengyanote/.obsidian/plugins/editing-toolbar/manifest.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "editing-toolbar",
|
||||
"name": "Editing Toolbar",
|
||||
"version": "3.2.7",
|
||||
"minAppVersion": "0.14.0",
|
||||
"description": "The Obsidian Editing Toolbar is modified from cmenu, which provides more powerful customization settings and has many built-in editing commands to be a MS Word-like toolbar editing experience.",
|
||||
"author": "Cuman",
|
||||
"authorUrl": "https://github.com/cumany/obsidian-editing-toolbar",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
1506
mengyanote-backend/data/mengyanote/.obsidian/plugins/editing-toolbar/styles.css
vendored
Normal file
1506
mengyanote-backend/data/mengyanote/.obsidian/plugins/editing-toolbar/styles.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
260
mengyanote-backend/data/mengyanote/.obsidian/plugins/live-wallpaper/data.json
vendored
Normal file
260
mengyanote-backend/data/mengyanote/.obsidian/plugins/live-wallpaper/data.json
vendored
Normal file
@@ -0,0 +1,260 @@
|
||||
{
|
||||
"LatestVersion": "1.6.0",
|
||||
"currentWallpaper": {
|
||||
"path": "plugins/live-wallpaper/wallpapers/active/normal/wallpaper-3bf8a59e58bd7144744b0ad4e9d5bbc3.png",
|
||||
"type": "image",
|
||||
"zIndex": 5,
|
||||
"opacity": 25,
|
||||
"brightness": 130,
|
||||
"blurRadius": 4,
|
||||
"contrast": 105,
|
||||
"playbackSpeed": 1,
|
||||
"Reposition": false,
|
||||
"Quality": false,
|
||||
"useObjectFit": true,
|
||||
"position": "Center",
|
||||
"positionX": 50,
|
||||
"positionY": 50,
|
||||
"Scale": 1,
|
||||
"Index": 0
|
||||
},
|
||||
"globalConfig": {
|
||||
"config": {
|
||||
"path": "plugins/live-wallpaper/wallpapers/active/normal/wallpaper-3bf8a59e58bd7144744b0ad4e9d5bbc3.png",
|
||||
"type": "image",
|
||||
"zIndex": 5,
|
||||
"opacity": 25,
|
||||
"brightness": 130,
|
||||
"blurRadius": 4,
|
||||
"contrast": 105,
|
||||
"playbackSpeed": 1,
|
||||
"Reposition": false,
|
||||
"Quality": false,
|
||||
"useObjectFit": true,
|
||||
"position": "Center",
|
||||
"positionX": 50,
|
||||
"positionY": 50,
|
||||
"Scale": 1,
|
||||
"Index": 0
|
||||
},
|
||||
"enabled": true
|
||||
},
|
||||
"Preview": false,
|
||||
"WallpaperConfigs": [
|
||||
{
|
||||
"path": "plugins/live-wallpaper/wallpapers/active/normal/wallpaper-3bf8a59e58bd7144744b0ad4e9d5bbc3.png",
|
||||
"type": "image",
|
||||
"zIndex": 5,
|
||||
"opacity": 40,
|
||||
"brightness": 100,
|
||||
"blurRadius": 8,
|
||||
"contrast": 100,
|
||||
"playbackSpeed": 1,
|
||||
"Reposition": false,
|
||||
"Quality": false,
|
||||
"useObjectFit": true,
|
||||
"position": "Center",
|
||||
"positionX": 50,
|
||||
"positionY": 50,
|
||||
"Scale": 1,
|
||||
"Index": 0
|
||||
},
|
||||
{
|
||||
"path": "",
|
||||
"type": "image",
|
||||
"zIndex": 5,
|
||||
"opacity": 40,
|
||||
"brightness": 100,
|
||||
"blurRadius": 8,
|
||||
"contrast": 100,
|
||||
"playbackSpeed": 1,
|
||||
"Reposition": false,
|
||||
"Quality": false,
|
||||
"useObjectFit": true,
|
||||
"position": "Center",
|
||||
"positionX": 50,
|
||||
"positionY": 50,
|
||||
"Scale": 1,
|
||||
"Index": 1
|
||||
},
|
||||
{
|
||||
"path": "",
|
||||
"type": "image",
|
||||
"zIndex": 5,
|
||||
"opacity": 40,
|
||||
"brightness": 100,
|
||||
"blurRadius": 8,
|
||||
"contrast": 100,
|
||||
"playbackSpeed": 1,
|
||||
"Reposition": false,
|
||||
"Quality": false,
|
||||
"useObjectFit": true,
|
||||
"position": "Center",
|
||||
"positionX": 50,
|
||||
"positionY": 50,
|
||||
"Scale": 1,
|
||||
"Index": 2
|
||||
},
|
||||
{
|
||||
"path": "",
|
||||
"type": "image",
|
||||
"zIndex": 5,
|
||||
"opacity": 40,
|
||||
"brightness": 100,
|
||||
"blurRadius": 8,
|
||||
"contrast": 100,
|
||||
"playbackSpeed": 1,
|
||||
"Reposition": false,
|
||||
"Quality": false,
|
||||
"useObjectFit": true,
|
||||
"position": "Center",
|
||||
"positionX": 50,
|
||||
"positionY": 50,
|
||||
"Scale": 1,
|
||||
"Index": 3
|
||||
},
|
||||
{
|
||||
"path": "",
|
||||
"type": "image",
|
||||
"zIndex": 5,
|
||||
"opacity": 40,
|
||||
"brightness": 100,
|
||||
"blurRadius": 8,
|
||||
"contrast": 100,
|
||||
"playbackSpeed": 1,
|
||||
"Reposition": false,
|
||||
"Quality": false,
|
||||
"useObjectFit": true,
|
||||
"position": "Center",
|
||||
"positionX": 50,
|
||||
"positionY": 50,
|
||||
"Scale": 1,
|
||||
"Index": 4
|
||||
},
|
||||
{
|
||||
"path": "",
|
||||
"type": "image",
|
||||
"zIndex": 5,
|
||||
"opacity": 40,
|
||||
"brightness": 100,
|
||||
"blurRadius": 8,
|
||||
"contrast": 100,
|
||||
"playbackSpeed": 1,
|
||||
"Reposition": false,
|
||||
"Quality": false,
|
||||
"useObjectFit": true,
|
||||
"position": "Center",
|
||||
"positionX": 50,
|
||||
"positionY": 50,
|
||||
"Scale": 1,
|
||||
"Index": 5
|
||||
},
|
||||
{
|
||||
"path": "",
|
||||
"type": "image",
|
||||
"zIndex": 5,
|
||||
"opacity": 40,
|
||||
"brightness": 100,
|
||||
"blurRadius": 8,
|
||||
"contrast": 100,
|
||||
"playbackSpeed": 1,
|
||||
"Reposition": false,
|
||||
"Quality": false,
|
||||
"useObjectFit": true,
|
||||
"position": "Center",
|
||||
"positionX": 50,
|
||||
"positionY": 50,
|
||||
"Scale": 1,
|
||||
"Index": 6
|
||||
},
|
||||
{
|
||||
"path": "",
|
||||
"type": "image",
|
||||
"zIndex": 5,
|
||||
"opacity": 40,
|
||||
"brightness": 100,
|
||||
"blurRadius": 8,
|
||||
"contrast": 100,
|
||||
"playbackSpeed": 1,
|
||||
"Reposition": false,
|
||||
"Quality": false,
|
||||
"useObjectFit": true,
|
||||
"position": "Center",
|
||||
"positionX": 50,
|
||||
"positionY": 50,
|
||||
"Scale": 1,
|
||||
"Index": 7
|
||||
},
|
||||
{
|
||||
"path": "",
|
||||
"type": "image",
|
||||
"zIndex": 5,
|
||||
"opacity": 40,
|
||||
"brightness": 100,
|
||||
"blurRadius": 8,
|
||||
"contrast": 100,
|
||||
"playbackSpeed": 1,
|
||||
"Reposition": false,
|
||||
"Quality": false,
|
||||
"useObjectFit": true,
|
||||
"position": "Center",
|
||||
"positionX": 50,
|
||||
"positionY": 50,
|
||||
"Scale": 1,
|
||||
"Index": 8
|
||||
},
|
||||
{
|
||||
"path": "",
|
||||
"type": "image",
|
||||
"zIndex": 5,
|
||||
"opacity": 40,
|
||||
"brightness": 100,
|
||||
"blurRadius": 8,
|
||||
"contrast": 100,
|
||||
"playbackSpeed": 1,
|
||||
"Reposition": false,
|
||||
"Quality": false,
|
||||
"useObjectFit": true,
|
||||
"position": "Center",
|
||||
"positionX": 50,
|
||||
"positionY": 50,
|
||||
"Scale": 1,
|
||||
"Index": 9
|
||||
}
|
||||
],
|
||||
"HistoryPaths": [
|
||||
{
|
||||
"path": "plugins/live-wallpaper/wallpapers/history/wallpaper-3bf8a59e58bd7144744b0ad4e9d5bbc3.png",
|
||||
"type": "image",
|
||||
"fileName": "wallpaper-3bf8a59e58bd7144744b0ad4e9d5bbc3.png"
|
||||
}
|
||||
],
|
||||
"mobileBackgroundWidth": "100vw",
|
||||
"mobileBackgroundHeight": "100vh",
|
||||
"AdnvOpend": false,
|
||||
"modalStyle": {
|
||||
"effect": "blur+dim",
|
||||
"blurRadius": 10,
|
||||
"dimOpacity": 0.7,
|
||||
"dimColor": "black",
|
||||
"disableModalBg": false
|
||||
},
|
||||
"TextArenas": [
|
||||
{
|
||||
"attribute": ""
|
||||
}
|
||||
],
|
||||
"Color": "#000000",
|
||||
"INBUILD": false,
|
||||
"SizeLimited": true,
|
||||
"ScheduledOptions": {
|
||||
"dayNightMode": false,
|
||||
"weekly": false,
|
||||
"autoSwitch": false,
|
||||
"dayStartTime": "08:00",
|
||||
"nightStartTime": "20:00",
|
||||
"intervalCheckTime": "00:10",
|
||||
"isCustomInterval": false
|
||||
},
|
||||
"migrated": false
|
||||
}
|
||||
2345
mengyanote-backend/data/mengyanote/.obsidian/plugins/live-wallpaper/main.js
vendored
Normal file
2345
mengyanote-backend/data/mengyanote/.obsidian/plugins/live-wallpaper/main.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
10
mengyanote-backend/data/mengyanote/.obsidian/plugins/live-wallpaper/manifest.json
vendored
Normal file
10
mengyanote-backend/data/mengyanote/.obsidian/plugins/live-wallpaper/manifest.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "live-wallpaper",
|
||||
"name": "Live Background",
|
||||
"version": "1.6.0",
|
||||
"minAppVersion": "1.1.0",
|
||||
"author": "Rememememe :3",
|
||||
"authorUrl": "https://github.com/remememe",
|
||||
"description": "Add dynamic live wallpapers (images/videos) to your workspace with customizable effects",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
97
mengyanote-backend/data/mengyanote/.obsidian/plugins/live-wallpaper/styles.css
vendored
Normal file
97
mengyanote-backend/data/mengyanote/.obsidian/plugins/live-wallpaper/styles.css
vendored
Normal file
@@ -0,0 +1,97 @@
|
||||
.titlebar {
|
||||
background-color: transparent !important;
|
||||
z-index: 99999;
|
||||
}
|
||||
.windows .titlebar {
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
.titlebar-button-container {
|
||||
z-index: 9999;
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
||||
.titlebar-button {
|
||||
color: var(--text-normal) !important;
|
||||
}
|
||||
|
||||
.titlebar-button:hover {
|
||||
background-color: var(--background-modifier-hover) !important;
|
||||
}
|
||||
|
||||
.live-wallpaper-active .titlebar {
|
||||
border-bottom: none !important;
|
||||
-webkit-app-region: drag;
|
||||
}
|
||||
|
||||
#live-wallpaper-container {
|
||||
transition: opacity 0.3s ease, filter 0.3s ease;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
video#live-wallpaper-media {
|
||||
transition: playback-rate 0.3s ease;
|
||||
}
|
||||
.text-arena-table {
|
||||
border-collapse: collapse;
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.text-arena-table th,
|
||||
.text-arena-table td {
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
padding: 8px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.text-arena-table th {
|
||||
background-color: var(--background-primary-alt);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text-arena-table tr:nth-child(even) {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
|
||||
.text-arena-table tr:hover {
|
||||
background-color: var(--background-secondary);
|
||||
}
|
||||
|
||||
.text-arena-table .setting-item {
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
.text-arena-table .setting-item-control {
|
||||
width: 100%;
|
||||
}
|
||||
.EditCodeBlock {
|
||||
background-color: #1e1e1e;
|
||||
color: #dcdcdc;
|
||||
padding: 10px;
|
||||
border-radius: 6px;
|
||||
font-family: monospace;
|
||||
overflow-x: auto;
|
||||
white-space: pre;
|
||||
resize: none;
|
||||
}
|
||||
body.is-mobile .workspace-drawer.mod-left,
|
||||
body.is-mobile .workspace-drawer.mod-right,
|
||||
body.is-mobile .vertical-tab-content-container,
|
||||
body.is-mobile .modal-header {
|
||||
backdrop-filter: blur(4px);
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
body.is-mobile .menu{
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
}
|
||||
.live-wallpaper-settings-nav {
|
||||
display: flex;
|
||||
overflow-x: auto;
|
||||
white-space: nowrap;
|
||||
gap: 0.5rem;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
.live-wallpaper-settings-nav .setting-button {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 210 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 210 KiB |
20
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-hover-editor/main.js
vendored
Normal file
20
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-hover-editor/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-hover-editor/manifest.json
vendored
Normal file
10
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-hover-editor/manifest.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "obsidian-hover-editor",
|
||||
"name": "Hover Editor",
|
||||
"version": "0.11.27",
|
||||
"minAppVersion": "1.5.8",
|
||||
"description": "Transform the Page Preview hover popover into a fully working editor instance",
|
||||
"author": "NothingIsLost",
|
||||
"authorUrl": "https://github.com/nothingislost",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
582
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-hover-editor/styles.css
vendored
Normal file
582
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-hover-editor/styles.css
vendored
Normal file
@@ -0,0 +1,582 @@
|
||||
/* @settings
|
||||
|
||||
name: Hover Editor
|
||||
id: hover-editor
|
||||
settings:
|
||||
-
|
||||
id: titlebar-heading
|
||||
title: Title bar
|
||||
type: heading
|
||||
level: 1
|
||||
collapsed: true
|
||||
-
|
||||
id: titlebar-heading
|
||||
title: Title bar background/foreground
|
||||
type: heading
|
||||
level: 2
|
||||
collapsed: true
|
||||
-
|
||||
id: he-title-bar-active-bg
|
||||
title: Active unpinned title bar background color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: he-title-bar-inactive-bg
|
||||
title: Inactive unpinned title bar background color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: he-title-bar-active-pinned-bg
|
||||
title: Active pinned title bar background color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: he-title-bar-inactive-pinned-bg
|
||||
title: Inactive pinned title bar background color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: he-title-bar-active-fg
|
||||
title: Active title bar foreground color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: he-title-bar-inactive-fg
|
||||
title: Inactive title bar foreground color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: titlebar-action-heading
|
||||
title: Title bar icons
|
||||
type: heading
|
||||
level: 2
|
||||
collapsed: true
|
||||
-
|
||||
id: he-title-bar-inactive-action
|
||||
title: Title bar inactive icon color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: he-title-bar-active-action
|
||||
title: Titlebar active icon color
|
||||
type: variable-themed-color
|
||||
format: hex
|
||||
default-light: '#'
|
||||
default-dark: '#'
|
||||
-
|
||||
id: titlebar-text-heading
|
||||
title: Title bar text
|
||||
type: heading
|
||||
level: 2
|
||||
collapsed: true
|
||||
-
|
||||
id: he-title-bar-font-size
|
||||
title: Title bar Font size
|
||||
type: variable-text
|
||||
description: Accepts any CSS font-size value
|
||||
default: 15px
|
||||
-
|
||||
id: titlebar-height-heading
|
||||
title: Title bar height
|
||||
type: heading
|
||||
level: 2
|
||||
collapsed: true
|
||||
-
|
||||
id: he-title-bar-height
|
||||
title: Title bar height
|
||||
type: variable-text
|
||||
description: Accepts any CSS font-size value
|
||||
default: 28px
|
||||
*/
|
||||
|
||||
:root {
|
||||
/* general styling */
|
||||
--he-popover-opacity-while-dragging: 0.8;
|
||||
--he-popover-border-radius: 6px;
|
||||
--he-popover-header-transition-speed: 0.3s;
|
||||
--he-popover-snap-to-edge-transition-speed: 0.3s;
|
||||
/* resize handle sizing */
|
||||
--he-resize-handle-side-size: 12px;
|
||||
--he-resize-handle-corner-size: 18px;
|
||||
/* view header height */
|
||||
--he-view-header-height: 36px;
|
||||
}
|
||||
|
||||
body {
|
||||
--he-text-on-accent-inactive: var(--text-on-accent); /* couldn't find a good variable that worked across themes */
|
||||
--he-text-on-accent-active: #fff;
|
||||
/* z-index layer settings, probably not a good idea to mess with these */
|
||||
--he-popover-layer-inactive: calc(var(--layer-slides) - 4);
|
||||
--he-popover-layer-active: calc(var(--he-popover-layer-inactive) + 1);
|
||||
--he-popover-layer-new: calc(var(--he-popover-layer-inactive) + 2);
|
||||
--he-leaf-drag-overlay: calc(var(--he-popover-layer-inactive) + 3);
|
||||
/* calculated variables, do not modify */
|
||||
--he-resize-handle-side-offset: calc((var(--he-resize-handle-side-size) - 3px) * -1);
|
||||
--he-resize-handle-corner-offset: calc((var(--he-resize-handle-corner-size) / 2) * -1);
|
||||
--he-resize-handle-side-length: calc(100% - var(--he-resize-handle-corner-size));
|
||||
/* title bar colors */
|
||||
--he-title-bar-active-bg: var(--interactive-accent);
|
||||
--he-title-bar-inactive-bg: #777777;
|
||||
--he-title-bar-inactive-pinned-bg: #777777;
|
||||
--he-title-bar-active-pinned-bg: var(--interactive-accent);
|
||||
|
||||
--he-title-bar-active-fg: var(--he-text-on-accent-active);
|
||||
--he-title-bar-inactive-fg: var(--he-text-on-accent-inactive);
|
||||
/* title bar action/icon colors */
|
||||
--he-title-bar-inactive-action: var(--he-text-on-accent-inactive);
|
||||
--he-title-bar-active-action: var(--he-text-on-accent-active);
|
||||
/* titlebar sizing */
|
||||
--he-title-bar-height: 28px;
|
||||
--he-title-bar-font-size: 15px;
|
||||
}
|
||||
|
||||
.popover.hover-editor .workspace-leaf,
|
||||
.popover.hover-editor .workspace-split {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/*
|
||||
Obsidian 1.6 sets a different background for non-root splits,
|
||||
then uses primary as an override at root. Since hover editors
|
||||
don't live in a root split, we have to copy the override:
|
||||
*/
|
||||
.popover.hover-editor .workspace-split .view-content {
|
||||
background-color: var(--background-primary);
|
||||
}
|
||||
|
||||
.popover.hover-editor {
|
||||
min-height: unset;
|
||||
max-height: unset;
|
||||
/* touch action none fixes dragging and resizing on mobile */
|
||||
touch-action: none;
|
||||
/* this is set to allow the drag/resize handles to overflow the popover frame */
|
||||
overflow: visible;
|
||||
border: none;
|
||||
padding: 0;
|
||||
z-index: var(--he-popover-layer-inactive);
|
||||
border-radius: var(--he-popover-border-radius);
|
||||
|
||||
/* Prevent snagging on titlebar */
|
||||
-webkit-app-region: no-drag;
|
||||
}
|
||||
|
||||
.popover.hover-editor .markdown-preview-view {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-active {
|
||||
z-index: var(--he-popover-layer-active);
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-new {
|
||||
z-index: var(--he-popover-layer-new);
|
||||
}
|
||||
|
||||
/* Drag/link overlay needs to overlay popups */
|
||||
.workspace-fake-target-overlay,
|
||||
.workspace-drop-overlay {
|
||||
z-index: var(--he-leaf-drag-overlay);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle {
|
||||
position: absolute;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.top {
|
||||
top: var(--he-resize-handle-side-offset);
|
||||
height: var(--he-resize-handle-side-size);
|
||||
left: calc(var(--he-resize-handle-corner-offset) * -1);
|
||||
width: var(--he-resize-handle-side-length);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.left {
|
||||
height: var(--he-resize-handle-side-length);
|
||||
left: var(--he-resize-handle-side-offset);
|
||||
top: calc(var(--he-resize-handle-corner-offset) * -1);
|
||||
width: var(--he-resize-handle-side-size);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.right {
|
||||
height: var(--he-resize-handle-side-length);
|
||||
right: var(--he-resize-handle-side-offset);
|
||||
top: calc(var(--he-resize-handle-corner-offset) * -1);
|
||||
width: var(--he-resize-handle-side-size);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.bottom {
|
||||
bottom: var(--he-resize-handle-side-offset);
|
||||
height: var(--he-resize-handle-side-size);
|
||||
left: calc(var(--he-resize-handle-corner-offset) * -1);
|
||||
width: var(--he-resize-handle-side-length);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.bottom-left {
|
||||
bottom: var(--he-resize-handle-corner-offset);
|
||||
height: var(--he-resize-handle-corner-size);
|
||||
left: var(--he-resize-handle-corner-offset);
|
||||
width: var(--he-resize-handle-corner-size);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.bottom-right {
|
||||
bottom: var(--he-resize-handle-corner-offset);
|
||||
height: var(--he-resize-handle-corner-size);
|
||||
right: var(--he-resize-handle-corner-offset);
|
||||
width: var(--he-resize-handle-corner-size);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.top-left {
|
||||
top: var(--he-resize-handle-corner-offset);
|
||||
height: var(--he-resize-handle-corner-size);
|
||||
left: var(--he-resize-handle-corner-offset);
|
||||
width: var(--he-resize-handle-corner-size);
|
||||
}
|
||||
|
||||
.popover.hover-editor .resize-handle.top-right {
|
||||
top: var(--he-resize-handle-corner-offset);
|
||||
height: var(--he-resize-handle-corner-size);
|
||||
right: var(--he-resize-handle-corner-offset);
|
||||
width: var(--he-resize-handle-corner-size);
|
||||
}
|
||||
|
||||
/* body.is-dragging-popover .tooltip {
|
||||
opacity: 0;
|
||||
} */
|
||||
|
||||
.popover-header-icon {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
.mod-pin-popover > svg {
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
.mod-pin-popover.is-active > svg {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
.popover-action,
|
||||
.popover-header-icon {
|
||||
margin: 0 8px;
|
||||
cursor: pointer;
|
||||
color: var(--he-title-bar-inactive-action);
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.popover-action.is-active,
|
||||
.mod-pin-popover.is-active {
|
||||
color: var(--he-title-bar-active-action);
|
||||
}
|
||||
|
||||
.popover-action:hover,
|
||||
.popover-header-icon:hover {
|
||||
color: var(--he-title-bar-active-action);
|
||||
}
|
||||
|
||||
.popover-action.is-active svg,
|
||||
.mod-pin-popover.is-active svg {
|
||||
}
|
||||
|
||||
.mod-pin-popover.is-active > svg {
|
||||
transform: unset;
|
||||
}
|
||||
|
||||
.popover.hover-editor .workspace-leaf-content[data-type="empty"] .view-header {
|
||||
/* ensures that minimal theme doesn't hide the popover header */
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.popover.hover-editor .workspace-split > .workspace-leaf:last-child > .workspace-leaf-resize-handle {
|
||||
/* this hides the leaf resize handles that touch the edge of the popover */
|
||||
/* without this the leaf resize handles conflict with the popover resize handles */
|
||||
display: none;
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-dragging {
|
||||
opacity: var(--he-popover-opacity-while-dragging);
|
||||
}
|
||||
|
||||
.popover.hover-editor:is(.snap-to-viewport, .snap-to-left, .snap-to-right) .resize-handle {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.popover.hover-editor.snap-to-right .resize-handle.left,
|
||||
.popover.hover-editor.snap-to-left .resize-handle.right {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-dragging.snap-to-left,
|
||||
.popover.hover-editor.is-dragging.snap-to-right,
|
||||
.popover.hover-editor.is-dragging.snap-to-viewport {
|
||||
transition: width var(--he-popover-snap-to-edge-transition-speed),
|
||||
height var(--he-popover-snap-to-edge-transition-speed), top var(--he-popover-snap-to-edge-transition-speed),
|
||||
left var(--he-popover-snap-to-edge-transition-speed);
|
||||
}
|
||||
|
||||
.hover-popover.is-dragging.snap-to-left::after,
|
||||
.hover-popover.is-dragging.snap-to-right::after,
|
||||
.hover-popover.is-dragging.snap-to-viewport::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
border-radius: var(--he-popover-border-radius);
|
||||
box-shadow: inset 0px 0px 0px 4px var(--interactive-accent);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.popover.hover-editor.snap-to-left {
|
||||
max-height: unset !important;
|
||||
}
|
||||
|
||||
.popover.hover-editor.snap-to-right {
|
||||
right: 0 !important;
|
||||
max-height: unset !important;
|
||||
}
|
||||
|
||||
.popover.hover-editor.snap-to-viewport {
|
||||
max-height: unset !important;
|
||||
max-width: unset !important;
|
||||
}
|
||||
|
||||
.popover.hover-editor .popover-titlebar {
|
||||
display: flex;
|
||||
height: var(--he-title-bar-height);
|
||||
width: 100%;
|
||||
background-color: var(--he-title-bar-inactive-bg);
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-active .popover-titlebar {
|
||||
background-color: var(--he-title-bar-active-bg);
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-pinned.is-pinned .popover-titlebar {
|
||||
background-color: var(--he-title-bar-inactive-pinned-bg);
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-pinned.is-pinned.is-active .popover-titlebar {
|
||||
background-color: var(--he-title-bar-active-pinned-bg);
|
||||
}
|
||||
|
||||
.popover.hover-editor .popover-titlebar .popover-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.popover.hover-editor > .popover-content {
|
||||
margin: 0;
|
||||
border-radius: var(--he-popover-border-radius);
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.popover.hover-popover.hover-editor .pdf-toolbar:not(.pdf-findbar.mod-hidden) {
|
||||
/* Show PDF toolbar in hover editor */
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.popover.hover-editor .popover-titlebar .popover-title {
|
||||
display: block;
|
||||
flex-grow: 1;
|
||||
transition: all 0.3s;
|
||||
align-self: center;
|
||||
font-size: var(--he-title-bar-font-size);
|
||||
font-weight: 500;
|
||||
white-space: pre;
|
||||
word-wrap: normal;
|
||||
color: var(--he-title-bar-inactive-fg);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-active .popover-title {
|
||||
color: var(--he-title-bar-active-fg);
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-active .popover-title:after {
|
||||
background: linear-gradient(to right, transparent, var(--he-title-bar-active-bg));
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-pinned.is-pinned.is-active .popover-title:after {
|
||||
background: linear-gradient(to right, transparent, var(--he-title-bar-active-pinned-bg));
|
||||
}
|
||||
|
||||
.popover.hover-editor.is-pinned.is-pinned .popover-title:after {
|
||||
background: linear-gradient(to right, transparent, var(--he-title-bar-inactive-pinned-bg));
|
||||
}
|
||||
|
||||
.popover.hover-editor .popover-title:after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 30px;
|
||||
height: 100%;
|
||||
background: linear-gradient(to right, transparent, var(--he-title-bar-inactive-bg));
|
||||
}
|
||||
|
||||
.popover.hover-editor .mod-show-navbar svg {
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
|
||||
.popover.hover-editor > .popover-content > .workspace-split {
|
||||
height: calc(100% - var(--he-title-bar-height));
|
||||
}
|
||||
|
||||
.popover.hover-editor .view-header {
|
||||
border-top: none;
|
||||
transition: all var(--he-popover-header-transition-speed);
|
||||
display: flex;
|
||||
}
|
||||
|
||||
/* Restore 1.5.x view header icons */
|
||||
.view-header .view-header-icon {
|
||||
display: none;
|
||||
padding: var(--size-2-2);
|
||||
margin-right: var(--size-2-3);
|
||||
color: var(--text-muted);
|
||||
align-self: center;
|
||||
cursor: grab;
|
||||
}
|
||||
.view-header .view-header-icon:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.popover.hover-editor .view-header .view-header-icon {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.popover.hover-editor.show-navbar:not(.is-minimized) .popover-title {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.popover.hover-editor:not(.show-navbar) .view-header {
|
||||
height: 0px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.popover.hover-editor.show-navbar .view-header {
|
||||
/* theme devs: if you want to change the header height, you must do so by setting the --he-view-header-height variable */
|
||||
/* if you don't use the variable, you will break internal measurement logic */
|
||||
height: var(--he-view-header-height);
|
||||
overflow: unset;
|
||||
}
|
||||
|
||||
.popover.hover-editor:not(.show-navbar) .view-content {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.popover.hover-editor .workspace-leaf-content[data-type="image"] .view-content {
|
||||
padding: 0;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.popover.hover-editor .workspace-leaf-content[data-type="image"] img {
|
||||
display: block;
|
||||
position: relative;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
max-width: unset;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
body .popover.hover-editor .view-content {
|
||||
/* theme devs: if you want to change the header height, you must do so by setting the --he-view-header-height variable */
|
||||
/* if you don't use the variable, you will break internal measurement logic */
|
||||
height: calc(100% - var(--he-view-header-height));
|
||||
}
|
||||
|
||||
/* start: zoomable images feature */
|
||||
|
||||
.popover.hover-editor.image-zoom .view-content .image-embed:active {
|
||||
aspect-ratio: unset;
|
||||
cursor: zoom-out;
|
||||
display: block;
|
||||
z-index: 200;
|
||||
position: fixed;
|
||||
max-height: calc(100% + 1px);
|
||||
max-width: 100%;
|
||||
height: calc(100% + 1px);
|
||||
width: 100%;
|
||||
object-fit: contain;
|
||||
margin: -0.5px auto 0;
|
||||
text-align: center;
|
||||
padding: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
max-width: unset;
|
||||
}
|
||||
|
||||
/* extra specificity to override some community theme styles that cause issues */
|
||||
.popover.hover-editor.image-zoom .view-content .image-embed img:active {
|
||||
top: 50%;
|
||||
z-index: 99;
|
||||
transform: translateY(-50%);
|
||||
padding: 0;
|
||||
margin: 0 auto;
|
||||
width: calc(100% - 20px);
|
||||
height: unset;
|
||||
max-height: 95vh;
|
||||
object-fit: contain;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
opacity: 1;
|
||||
max-width: unset;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.popover.hover-editor.image-zoom .view-content .image-embed:active:after {
|
||||
background-color: var(--background-primary);
|
||||
opacity: 0.9;
|
||||
content: " ";
|
||||
height: calc(100% + 1px);
|
||||
width: 100%;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 1px;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.popover.hover-editor.image-zoom .view-content img {
|
||||
cursor: zoom-in;
|
||||
}
|
||||
|
||||
/* extra specificity to override some community theme styles that cause issues */
|
||||
.popover.hover-editor.image-zoom .workspace-leaf-content[data-type="image"] img {
|
||||
cursor: zoom-in;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
object-fit: contain;
|
||||
height: unset;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
position: absolute;
|
||||
opacity: 1;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
/* end: zoomable images feature */
|
||||
33
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-icon-folder/data.json
vendored
Normal file
33
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-icon-folder/data.json
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"settings": {
|
||||
"migrated": 6,
|
||||
"iconPacksPath": ".obsidian/icons",
|
||||
"fontSize": 16,
|
||||
"emojiStyle": "native",
|
||||
"iconColor": null,
|
||||
"recentlyUsedIcons": [
|
||||
"LiActivitySquare"
|
||||
],
|
||||
"recentlyUsedIconsSize": 5,
|
||||
"rules": [],
|
||||
"extraMargin": {
|
||||
"top": 0,
|
||||
"right": 4,
|
||||
"bottom": 0,
|
||||
"left": 0
|
||||
},
|
||||
"iconInTabsEnabled": false,
|
||||
"iconInTitleEnabled": false,
|
||||
"iconInTitlePosition": "above",
|
||||
"iconInFrontmatterEnabled": false,
|
||||
"iconInFrontmatterFieldName": "icon",
|
||||
"iconColorInFrontmatterFieldName": "iconColor",
|
||||
"iconsBackgroundCheckEnabled": false,
|
||||
"iconsInNotesEnabled": true,
|
||||
"iconsInLinksEnabled": true,
|
||||
"iconIdentifier": ":",
|
||||
"lucideIconPackType": "native",
|
||||
"debugMode": false,
|
||||
"useInternalPlugins": false
|
||||
}
|
||||
}
|
||||
7158
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-icon-folder/main.js
vendored
Normal file
7158
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-icon-folder/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-icon-folder/manifest.json
vendored
Normal file
10
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-icon-folder/manifest.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "obsidian-icon-folder",
|
||||
"name": "Iconize",
|
||||
"version": "2.14.7",
|
||||
"minAppVersion": "0.9.12",
|
||||
"description": "Add icons to anything you desire in Obsidian, including files, folders, and text.",
|
||||
"author": "Florian Woelki",
|
||||
"authorUrl": "https://florianwoelki.com/",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
120
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-icon-folder/styles.css
vendored
Normal file
120
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-icon-folder/styles.css
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
.iconize-inline-title-wrapper {
|
||||
width: var(--line-width);
|
||||
max-width: var(--max-width);
|
||||
margin-inline: var(--content-margin);
|
||||
}
|
||||
|
||||
.iconize-title-icon {
|
||||
max-width: var(--max-width);
|
||||
margin-right: var(--size-4-2);
|
||||
}
|
||||
|
||||
.iconize-icon-in-link {
|
||||
transform: translateY(20%);
|
||||
margin-right: var(--size-2-2);
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.iconize-icon {
|
||||
border: 1px solid transparent;
|
||||
margin: 0px 4px 0px 0px;
|
||||
display: flex;
|
||||
align-self: center;
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
.nav-folder-title,
|
||||
.nav-file-title {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.iconize-setting input[type='color'] {
|
||||
margin: 0 6px;
|
||||
}
|
||||
|
||||
.iconize-modal.prompt-results {
|
||||
margin: 0;
|
||||
overflow-y: auto;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||
}
|
||||
|
||||
.prompt .iconize-subheadline {
|
||||
margin-top: 12px;
|
||||
font-size: 12px;
|
||||
color: gray;
|
||||
grid-column-start: 1;
|
||||
grid-column-end: 6;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.iconize-modal.prompt-results {
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
}
|
||||
.prompt .iconize-subheadline {
|
||||
grid-column-end: 4;
|
||||
}
|
||||
}
|
||||
|
||||
.iconize-modal.prompt-results .suggestion-item {
|
||||
cursor: pointer;
|
||||
white-space: pre-wrap;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
flex-direction: column-reverse;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
color: var(--text-muted);
|
||||
padding: 16px 8px;
|
||||
line-break: auto;
|
||||
word-break: break-word;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.iconize-modal.prompt-results .suggestion-item.suggestion-item__center {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.iconize-icon-preview {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.iconize-icon-preview img {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.iconize-icon-preview svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
color: currentColor;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.iconize-dragover {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.iconize-dragover-el {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
color: var(--text-normal);
|
||||
background-color: var(--background-secondary-alt);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
/* Custom rule modal. */
|
||||
.iconize-custom-modal .modal-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.iconize-custom-modal .modal-content input {
|
||||
width: 100%;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
44
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-style-settings/data.json
vendored
Normal file
44
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-style-settings/data.json
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"Components@@CTA-BTN-enable": true,
|
||||
"Components@@file-names-untrim": true,
|
||||
"Components@@folder-font-bold": true,
|
||||
"Components@@colorful-folder": true,
|
||||
"Components@@file-icon-remove": false,
|
||||
"Components@@outline-enhanced": true,
|
||||
"Components@@new-tab-btn-select": "new-tab-btn-default",
|
||||
"Components@@immersive-canvas": true,
|
||||
"Components@@scrollbar-hide": true,
|
||||
"Mobile@@drawer-phone-full-width": true,
|
||||
"Mobile@@card-layout-pad-open": true,
|
||||
"Plugin@@colorful-checkbox": true,
|
||||
"Editor@@italic-color@@light": "#000000",
|
||||
"Editor@@text-highlight-bg@@light": "#000000",
|
||||
"Editor@@inline-code-normal@@light": "#000000",
|
||||
"Editor@@link-color@@light": "#000000",
|
||||
"Editor@@link-color-hover@@light": "#000000",
|
||||
"Editor@@h1-weight": 900,
|
||||
"Editor@@h2-weight": 850,
|
||||
"Editor@@h3-weight": 800,
|
||||
"Editor@@h4-weight": 750,
|
||||
"Editor@@h5-weight": 700,
|
||||
"Editor@@h6-weight": 650,
|
||||
"Editor@@h6-divider-on": false,
|
||||
"Editor@@h5-divider-on": false,
|
||||
"Editor@@h4-divider-on": false,
|
||||
"Editor@@h3-divider-on": false,
|
||||
"Editor@@h2-divider-on": false,
|
||||
"Editor@@h1-divider-on": false,
|
||||
"Editor@@collapse-icon-restore": false,
|
||||
"Editor@@inline-title-divider-remove": true,
|
||||
"Editor@@text-align-justify": false,
|
||||
"Editor@@bold-color@@dark": "#000000",
|
||||
"Editor@@bold-color@@light": "#000000",
|
||||
"Editor@@editor-grid-background-pattren": true,
|
||||
"Editor@@border-focus-mode": false,
|
||||
"Editor@@line-hover-indicator": true,
|
||||
"Appearance-light@@card-layout-open-light": true,
|
||||
"phycat-layout@@layout-style": "layout-cards",
|
||||
"phycat-colors@@light-color-scheme": "theme-light-sakura",
|
||||
"phycat-colors@@dark-color-scheme": "theme-dark-radiation",
|
||||
"phycat-layout@@rainbow-folders": true
|
||||
}
|
||||
165
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-style-settings/main.js
vendored
Normal file
165
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-style-settings/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
10
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-style-settings/manifest.json
vendored
Normal file
10
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-style-settings/manifest.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "obsidian-style-settings",
|
||||
"name": "Style Settings",
|
||||
"version": "1.0.9",
|
||||
"minAppVersion": "0.11.5",
|
||||
"description": "Offers controls for adjusting theme, plugin, and snippet CSS variables.",
|
||||
"author": "mgmeyers",
|
||||
"authorUrl": "https://github.com/mgmeyers/obsidian-style-settings",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
243
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-style-settings/styles.css
vendored
Normal file
243
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian-style-settings/styles.css
vendored
Normal file
File diff suppressed because one or more lines are too long
21
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian42-brat/data.json
vendored
Normal file
21
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian42-brat/data.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"pluginList": [],
|
||||
"pluginSubListFrozenVersion": [],
|
||||
"themesList": [
|
||||
{
|
||||
"repo": "sumruler/obsidian-theme-phycat",
|
||||
"lastUpdate": "38061840"
|
||||
}
|
||||
],
|
||||
"updateAtStartup": true,
|
||||
"updateThemesAtStartup": true,
|
||||
"enableAfterInstall": true,
|
||||
"loggingEnabled": false,
|
||||
"loggingPath": "BRAT-log",
|
||||
"loggingVerboseEnabled": false,
|
||||
"debuggingMode": false,
|
||||
"notificationsEnabled": true,
|
||||
"personalAccessToken": "",
|
||||
"selectLatestPluginVersionByDefault": false,
|
||||
"allowIncompatiblePlugins": false
|
||||
}
|
||||
45
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian42-brat/main.js
vendored
Normal file
45
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian42-brat/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
14
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian42-brat/manifest.json
vendored
Normal file
14
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian42-brat/manifest.json
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"id": "obsidian42-brat",
|
||||
"name": "BRAT",
|
||||
"version": "1.4.1",
|
||||
"minAppVersion": "1.7.2",
|
||||
"description": "Easily install a beta version of a plugin for testing.",
|
||||
"author": "TfTHacker",
|
||||
"authorUrl": "https://github.com/TfTHacker/obsidian42-brat",
|
||||
"helpUrl": "https://tfthacker.com/BRAT",
|
||||
"isDesktopOnly": false,
|
||||
"fundingUrl": {
|
||||
"Visit my site": "https://tfthacker.com"
|
||||
}
|
||||
}
|
||||
152
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian42-brat/styles.css
vendored
Normal file
152
mengyanote-backend/data/mengyanote/.obsidian/plugins/obsidian42-brat/styles.css
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
.brat-modal .modal-button-container {
|
||||
margin-top: 5px !important;
|
||||
}
|
||||
|
||||
.brat-modal .disabled-setting {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.brat-modal .disabled-setting:hover {
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
/* Input validation styles */
|
||||
.brat-settings .valid-input,
|
||||
.brat-modal .valid-repository {
|
||||
border-color: var(--color-green) !important;
|
||||
}
|
||||
.brat-settings .invalid-input,
|
||||
.brat-modal .invalid-repository {
|
||||
border-color: var(--color-red) !important;
|
||||
}
|
||||
.brat-settings .validation-error,
|
||||
.brat-modal .validation-error {
|
||||
border-color: var(--color-orange) !important;
|
||||
}
|
||||
|
||||
/* Version selector */
|
||||
.brat-version-selector {
|
||||
width: 100%;
|
||||
max-width: 400px;
|
||||
justify-content: left;
|
||||
}
|
||||
|
||||
.brat-token-input {
|
||||
min-width: 33%;
|
||||
}
|
||||
|
||||
/* Token info container styles */
|
||||
.brat-token-info {
|
||||
margin-top: 8px;
|
||||
font-size: 0.8em;
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
background-color: var(--background-secondary);
|
||||
}
|
||||
|
||||
/* Token status indicators */
|
||||
.brat-token-info.valid,
|
||||
.brat-token-status.valid {
|
||||
color: var(--color-green);
|
||||
}
|
||||
|
||||
.brat-token-info.invalid,
|
||||
.brat-token-status.invalid {
|
||||
color: var(--color-red);
|
||||
}
|
||||
|
||||
.brat-token-info.valid {
|
||||
border-left: 3px solid var(--color-green);
|
||||
}
|
||||
|
||||
.brat-token-info.invalid {
|
||||
border-left: 3px solid var(--color-red);
|
||||
}
|
||||
|
||||
/* Token details and status */
|
||||
.brat-token-status {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.brat-token-details {
|
||||
margin-top: 4px;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
/* Token warnings */
|
||||
.brat-token-warning {
|
||||
color: var(--color-orange);
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
/* Token additional info */
|
||||
.brat-token-scopes,
|
||||
.brat-token-rate {
|
||||
color: var(--text-muted);
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
/* Flex break utility */
|
||||
.brat-modal .break {
|
||||
flex-basis: 100%;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/* Validation status */
|
||||
.brat-modal .validation-status-error {
|
||||
color: var(--text-error);
|
||||
}
|
||||
|
||||
.brat-modal .validation-status {
|
||||
margin-top: 0.5em;
|
||||
margin-bottom: 0.5em;
|
||||
font-size: 0.8em;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.confirm-modal .ok-button {
|
||||
margin-right: 10px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
/* Hide filtered plugin items */
|
||||
.brat-plugin-item[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Hide filtered theme items */
|
||||
.brat-theme-item[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
/* Filter and button layout */
|
||||
.brat-filter-and-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
margin: 0.75em 0;
|
||||
}
|
||||
|
||||
.brat-filter-input {
|
||||
max-width: 300px;
|
||||
padding: 4px 8px;
|
||||
border: 1px solid var(--background-modifier-border);
|
||||
border-radius: 4px;
|
||||
background-color: var(--background-secondary);
|
||||
color: var(--text-normal);
|
||||
}
|
||||
|
||||
.brat-filter-input:focus {
|
||||
outline: none;
|
||||
border-color: var(--interactive-accent);
|
||||
}
|
||||
|
||||
.brat-filter-and-button .setting-item {
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.brat-filter-and-button .setting-item-control {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
1
mengyanote-backend/data/mengyanote/.obsidian/plugins/remotely-save/.gitignore
vendored
Normal file
1
mengyanote-backend/data/mengyanote/.obsidian/plugins/remotely-save/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
data.json
|
||||
235
mengyanote-backend/data/mengyanote/.obsidian/plugins/remotely-save/main.js
vendored
Normal file
235
mengyanote-backend/data/mengyanote/.obsidian/plugins/remotely-save/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
mengyanote-backend/data/mengyanote/.obsidian/plugins/remotely-save/manifest.json
vendored
Normal file
11
mengyanote-backend/data/mengyanote/.obsidian/plugins/remotely-save/manifest.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "remotely-save",
|
||||
"name": "Remotely Save",
|
||||
"version": "0.5.25",
|
||||
"minAppVersion": "0.13.21",
|
||||
"description": "Yet another unofficial plugin allowing users to synchronize notes between local device and the cloud service.",
|
||||
"author": "fyears",
|
||||
"authorUrl": "https://github.com/fyears",
|
||||
"isDesktopOnly": false,
|
||||
"fundingUrl": "https://remotelysave.com"
|
||||
}
|
||||
244
mengyanote-backend/data/mengyanote/.obsidian/plugins/remotely-save/styles.css
vendored
Normal file
244
mengyanote-backend/data/mengyanote/.obsidian/plugins/remotely-save/styles.css
vendored
Normal file
@@ -0,0 +1,244 @@
|
||||
/* set the styles */
|
||||
|
||||
.password-second-confirm {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.password-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.encryptionmethod-second-confirm {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.settings-auth-related {
|
||||
border-top: 1px solid var(--background-modifier-border);
|
||||
padding-top: 18px;
|
||||
}
|
||||
|
||||
.settings-percentage-custom-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.settings-encryption-method-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.s3-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
.s3-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dropbox-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
.dropbox-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dropbox-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dropbox-revoke-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.onedrive-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
.onedrive-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.onedrive-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.onedrive-revoke-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.onedrivefull-allow-to-use-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.onedrivefull-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
.onedrivefull-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.onedrivefull-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.onedrivefull-revoke-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.webdav-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
.webdav-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.webdav-customheaders-textarea {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.webdis-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
.webdis-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.googledrive-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
.googledrive-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.googledrive-allow-to-use-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.googledrive-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.googledrive-revoke-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.box-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
.box-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.box-allow-to-use-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.box-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.box-revoke-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pcloud-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
.pcloud-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pcloud-allow-to-use-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pcloud-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pcloud-revoke-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.yandexdisk-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
.yandexdisk-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.yandexdisk-allow-to-use-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.yandexdisk-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.yandexdisk-revoke-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.koofr-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
.koofr-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.koofr-allow-to-use-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.koofr-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.koofr-revoke-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.azureblobstorage-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
.azureblobstorage-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.azureblobstorage-allow-to-use-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.qrcode-img {
|
||||
width: 350px;
|
||||
height: 350px;
|
||||
}
|
||||
|
||||
.ignorepaths-textarea {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.onlyallowpaths-textarea {
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.logtohttpserver-warning {
|
||||
color: red;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.setting-need-wrapping .setting-item-control {
|
||||
/* flex-wrap: wrap; */
|
||||
display: grid;
|
||||
}
|
||||
|
||||
.pro-disclaimer {
|
||||
font-weight: bold;
|
||||
}
|
||||
.pro-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pro-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.pro-revoke-auth-button-hide {
|
||||
display: none;
|
||||
}
|
||||
47
mengyanote-backend/data/mengyanote/.obsidian/plugins/templater-obsidian/main.js
vendored
Normal file
47
mengyanote-backend/data/mengyanote/.obsidian/plugins/templater-obsidian/main.js
vendored
Normal file
File diff suppressed because one or more lines are too long
11
mengyanote-backend/data/mengyanote/.obsidian/plugins/templater-obsidian/manifest.json
vendored
Normal file
11
mengyanote-backend/data/mengyanote/.obsidian/plugins/templater-obsidian/manifest.json
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"id": "templater-obsidian",
|
||||
"name": "Templater",
|
||||
"version": "2.18.0",
|
||||
"description": "Create and use templates",
|
||||
"minAppVersion": "1.5.0",
|
||||
"author": "SilentVoid",
|
||||
"authorUrl": "https://github.com/SilentVoid13",
|
||||
"helpUrl": "https://silentvoid13.github.io/Templater/",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
226
mengyanote-backend/data/mengyanote/.obsidian/plugins/templater-obsidian/styles.css
vendored
Normal file
226
mengyanote-backend/data/mengyanote/.obsidian/plugins/templater-obsidian/styles.css
vendored
Normal file
@@ -0,0 +1,226 @@
|
||||
.templater_search {
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
|
||||
.templater_div {
|
||||
border-top: 1px solid var(--background-modifier-border);
|
||||
}
|
||||
|
||||
.templater_div > .setting-item {
|
||||
border-top: none !important;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.templater_div > .setting-item > .setting-item-control {
|
||||
justify-content: space-around;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.templater_div
|
||||
> .setting-item
|
||||
> .setting-item-control
|
||||
> .setting-editor-extra-setting-button {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.templater_donating {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.templater_title {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin-top: 5px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.templater_template {
|
||||
align-self: center;
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
.templater_cmd {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
font-size: 14px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.templater_div2 > .setting-item {
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.templater-prompt-div,
|
||||
.templater-multisuggester-div {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.templater-prompt-form {
|
||||
display: flex;
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.templater-prompt-input,
|
||||
.templater-multisuggester-input {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.templater-button-div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
textarea.templater-prompt-input {
|
||||
height: 10rem;
|
||||
}
|
||||
|
||||
textarea.templater-prompt-input:focus {
|
||||
border-color: var(--interactive-accent);
|
||||
}
|
||||
|
||||
.templater-multisuggester-list {
|
||||
margin: 1.5em 0;
|
||||
}
|
||||
|
||||
.cm-s-obsidian .templater-command-bg {
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
background-color: var(--background-primary-alt);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command {
|
||||
font-size: 0.85em;
|
||||
font-family: var(--font-monospace);
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.cm-s-obsidian .templater-inline .cm-templater-command {
|
||||
background-color: var(--background-primary-alt);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-templater-opening-tag {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-templater-closing-tag {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-templater-interpolation-tag {
|
||||
color: var(--code-property, #008bff);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-templater-execution-tag {
|
||||
color: var(--code-function, #c0d700);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-keyword {
|
||||
color: var(--code-keyword, #00a7aa);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-atom {
|
||||
color: var(--code-normal, #f39b35);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-value,
|
||||
.cm-s-obsidian .cm-templater-command.cm-number,
|
||||
.cm-s-obsidian .cm-templater-command.cm-type {
|
||||
color: var(--code-value, #a06fca);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-def,
|
||||
.cm-s-obsidian .cm-templater-command.cm-type.cm-def {
|
||||
color: var(--code-normal, var(--text-normal));
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-property,
|
||||
.cm-s-obsidian .cm-templater-command.cm-property.cm-def,
|
||||
.cm-s-obsidian .cm-templater-command.cm-attribute {
|
||||
color: var(--code-function, #98e342);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-variable,
|
||||
.cm-s-obsidian .cm-templater-command.cm-variable-2,
|
||||
.cm-s-obsidian .cm-templater-command.cm-variable-3,
|
||||
.cm-s-obsidian .cm-templater-command.cm-meta {
|
||||
color: var(--code-property, #d4d4d4);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-callee,
|
||||
.cm-s-obsidian .cm-templater-command.cm-operator,
|
||||
.cm-s-obsidian .cm-templater-command.cm-qualifier,
|
||||
.cm-s-obsidian .cm-templater-command.cm-builtin {
|
||||
color: var(--code-operator, #fc4384);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-tag {
|
||||
color: var(--code-tag, #fc4384);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-comment,
|
||||
.cm-s-obsidian .cm-templater-command.cm-comment.cm-tag,
|
||||
.cm-s-obsidian .cm-templater-command.cm-comment.cm-attribute {
|
||||
color: var(--code-comment, #696d70);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-string,
|
||||
.cm-s-obsidian .cm-templater-command.cm-string-2 {
|
||||
color: var(--code-string, #e6db74);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-header,
|
||||
.cm-s-obsidian .cm-templater-command.cm-hr {
|
||||
color: var(--code-keyword, #da7dae);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-link {
|
||||
color: var(--code-normal, #696d70);
|
||||
}
|
||||
|
||||
.cm-s-obsidian .cm-templater-command.cm-error {
|
||||
border-bottom: 1px solid #c42412;
|
||||
}
|
||||
|
||||
.CodeMirror-hints {
|
||||
position: absolute;
|
||||
z-index: 10;
|
||||
overflow: hidden;
|
||||
list-style: none;
|
||||
|
||||
margin: 0;
|
||||
padding: 2px;
|
||||
|
||||
-webkit-box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.2);
|
||||
-moz-box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.2);
|
||||
box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.2);
|
||||
border-radius: 3px;
|
||||
border: 1px solid silver;
|
||||
|
||||
background: white;
|
||||
font-size: 90%;
|
||||
font-family: monospace;
|
||||
|
||||
max-height: 20em;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.CodeMirror-hint {
|
||||
margin: 0;
|
||||
padding: 0 4px;
|
||||
border-radius: 2px;
|
||||
white-space: pre;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
li.CodeMirror-hint-active {
|
||||
background: #08f;
|
||||
color: white;
|
||||
}
|
||||
12
mengyanote-backend/data/mengyanote/.obsidian/plugins/tray/data.json
vendored
Normal file
12
mengyanote-backend/data/mengyanote/.obsidian/plugins/tray/data.json
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"launchOnStartup": true,
|
||||
"hideOnLaunch": false,
|
||||
"runInBackground": true,
|
||||
"hideTaskbarIcon": false,
|
||||
"createTrayIcon": true,
|
||||
"trayIconImage": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHZSURBVDhPlZKxTxRBFMa/XZcF7nIG7mjxjoRCwomJxgsFdhaASqzQxFDzB1AQKgstLGxIiBQGJBpiCCGx8h+wgYaGgAWNd0dyHofeEYVwt/PmOTMZV9aDIL/s5pvZvPfN9yaL/+HR3eXcypta0m4juFbP5GHuXc9IbunDFc9db/G81/ZzhDMN7g8td47mll4R5BfHwZN4LOaA+fHa259PbUmIYzWkt3e2NZNo3/V9v1vvU6kkstk+tLW3ItUVr/m+c3N8MlkwxYqmBFcbwUQQCNOcyVzDwEAWjuPi5DhAMV/tKOYPX5hCyz8Gz1zX5SmWjBvZfmTSaRBJkGAIoxJHv+pVW2yIGNxOJ8bUVNcFEWLxuG1ia6JercTbttwQTeDwPS0kCMXiXtgk/jQrFUw7ptYSMWApF40yo/ytjHq98fdk3ayVE+cn2CxMb6ruz9qAJKFUKoWza1VJSi/n0+ffgYHdWW2gHuxXymg0gjCB0sjpmiaDnkL3RzDyzLqBUKns2ztQqUR0fk2TwSrGSf1eczqF5vsPZRCQSSAFLk6gqctgQRkc6TWRQLV2YMYQki9OoNkqzFQ9r+WOGuW5CrJbOzyAlPKr6MSGLbkcDwbf35oY/jRkt6cAfgNwowruAMz9AgAAAABJRU5ErkJggg==",
|
||||
"trayIconTooltip": "{{vault}} | Obsidian",
|
||||
"toggleWindowFocusHotkey": "CmdOrCtrl+Shift+Tab",
|
||||
"quickNoteDateFormat": "YYYY-MM-DD",
|
||||
"quickNoteHotkey": "CmdOrCtrl+Shift+Q"
|
||||
}
|
||||
491
mengyanote-backend/data/mengyanote/.obsidian/plugins/tray/main.js
vendored
Normal file
491
mengyanote-backend/data/mengyanote/.obsidian/plugins/tray/main.js
vendored
Normal file
@@ -0,0 +1,491 @@
|
||||
/**
|
||||
* obsidian-tray v0.3.5
|
||||
* (c) 2023 dragonwocky <thedragonring.bod@gmail.com> (https://dragonwocky.me/)
|
||||
* (https://github.com/dragonwocky/obsidian-tray/) under the MIT license
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
const LOG_PREFIX = "obsidian-tray",
|
||||
LOG_LOADING = "loading",
|
||||
LOG_CLEANUP = "cleaning up",
|
||||
LOG_SHOWING_WINDOWS = "showing windows",
|
||||
LOG_HIDING_WINDOWS = "hiding windows",
|
||||
LOG_WINDOW_CLOSE = "intercepting window close",
|
||||
LOG_TRAY_ICON = "creating tray icon",
|
||||
LOG_REGISTER_HOTKEY = "registering hotkey",
|
||||
LOG_UNREGISTER_HOTKEY = "unregistering hotkey",
|
||||
ACTION_QUICK_NOTE = "Quick Note",
|
||||
ACTION_SHOW = "Show Vault",
|
||||
ACTION_HIDE = "Hide Vault",
|
||||
ACTION_RELAUNCH = "Relaunch Obsidian",
|
||||
ACTION_CLOSE = "Close Vault",
|
||||
DEFAULT_DATE_FORMAT = "YYYY-MM-DD",
|
||||
ACCELERATOR_FORMAT = `
|
||||
This hotkey is registered globally and will be detected even if Obsidian does
|
||||
not have keyboard focus. Format:
|
||||
<a href="https://www.electronjs.org/docs/latest/api/accelerator" target="_blank" rel="noopener">
|
||||
Electron accelerator</a>
|
||||
`,
|
||||
MOMENT_FORMAT = `
|
||||
Format:
|
||||
<a href="https://momentjs.com/docs/#/displaying/format/" target="_blank" rel="noopener">
|
||||
Moment.js format string</a>
|
||||
`,
|
||||
// 16x16 base64 obsidian icon: generated from obsidian.asar/icon.png
|
||||
OBSIDIAN_BASE64_ICON = `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHZSURBVDhPlZKxTxRBFMa/XZcF7nIG7mjxjoRCwomJxgsFdhaASqzQxFDzB1AQKgstLGxIiBQGJBpiCCGx8h+wgYaGgAWNd0dyHofeEYVwt/PmOTMZV9aDIL/s5pvZvPfN9yaL/+HR3eXcypta0m4juFbP5GHuXc9IbunDFc9db/G81/ZzhDMN7g8td47mll4R5BfHwZN4LOaA+fHa259PbUmIYzWkt3e2NZNo3/V9v1vvU6kkstk+tLW3ItUVr/m+c3N8MlkwxYqmBFcbwUQQCNOcyVzDwEAWjuPi5DhAMV/tKOYPX5hCyz8Gz1zX5SmWjBvZfmTSaRBJkGAIoxJHv+pVW2yIGNxOJ8bUVNcFEWLxuG1ia6JercTbttwQTeDwPS0kCMXiXtgk/jQrFUw7ptYSMWApF40yo/ytjHq98fdk3ayVE+cn2CxMb6ruz9qAJKFUKoWza1VJSi/n0+ffgYHdWW2gHuxXymg0gjCB0sjpmiaDnkL3RzDyzLqBUKns2ztQqUR0fk2TwSrGSf1eczqF5vsPZRCQSSAFLk6gqctgQRkc6TWRQLV2YMYQki9OoNkqzFQ9r+WOGuW5CrJbOzyAlPKr6MSGLbkcDwbf35oY/jRkt6cAfgNwowruAMz9AgAAAABJRU5ErkJggg==`,
|
||||
log = (message) => console.log(`${LOG_PREFIX}: ${message}`);
|
||||
|
||||
let tray, plugin;
|
||||
const obsidian = require("obsidian"),
|
||||
{ app, Tray, Menu } = require("electron").remote,
|
||||
{ nativeImage, BrowserWindow } = require("electron").remote,
|
||||
{ getCurrentWindow, globalShortcut } = require("electron").remote;
|
||||
|
||||
const vaultWindows = new Set(),
|
||||
maximizedWindows = new Set(),
|
||||
getWindows = () => [...vaultWindows],
|
||||
observeWindows = () => {
|
||||
const onWindowCreation = (win) => {
|
||||
vaultWindows.add(win);
|
||||
win.setSkipTaskbar(plugin.settings.hideTaskbarIcon);
|
||||
win.on("close", () => {
|
||||
if (win !== getCurrentWindow()) vaultWindows.delete(win);
|
||||
});
|
||||
// preserve maximised windows after minimisation
|
||||
if (win.isMaximized()) maximizedWindows.add(win);
|
||||
win.on("maximize", () => maximizedWindows.add(win));
|
||||
win.on("unmaximize", () => maximizedWindows.delete(win));
|
||||
};
|
||||
onWindowCreation(getCurrentWindow());
|
||||
getCurrentWindow().webContents.on("did-create-window", onWindowCreation);
|
||||
if (process.platform === "darwin") {
|
||||
// on macos, the "hide taskbar icon" option is implemented
|
||||
// via app.dock.hide(): thus, the app as a whole will be
|
||||
// hidden from the dock, including windows from other vaults.
|
||||
// when a vault is closed via the "close vault" button,
|
||||
// the cleanup process will call app.dock.show() to restore
|
||||
// access to any other open vaults w/out the tray enabled
|
||||
// => thus, this listener is required to re-hide the dock
|
||||
// if switching to another vault with the option enabled
|
||||
getCurrentWindow().on("focus", () => {
|
||||
if (plugin.settings.hideTaskbarIcon) hideTaskbarIcons();
|
||||
});
|
||||
}
|
||||
},
|
||||
showWindows = () => {
|
||||
log(LOG_SHOWING_WINDOWS);
|
||||
getWindows().forEach((win) => {
|
||||
if (maximizedWindows.has(win)) {
|
||||
win.maximize();
|
||||
win.focus();
|
||||
} else win.show();
|
||||
});
|
||||
},
|
||||
hideWindows = () => {
|
||||
log(LOG_HIDING_WINDOWS);
|
||||
getWindows().forEach((win) => [
|
||||
win.isFocused() && win.blur(),
|
||||
plugin.settings.runInBackground ? win.hide() : win.minimize(),
|
||||
]);
|
||||
},
|
||||
toggleWindows = (checkForFocus = true) => {
|
||||
const openWindows = getWindows().some((win) => {
|
||||
return (!checkForFocus || win.isFocused()) && win.isVisible();
|
||||
});
|
||||
if (openWindows) hideWindows();
|
||||
else showWindows();
|
||||
};
|
||||
|
||||
const onWindowClose = (event) => event.preventDefault(),
|
||||
onWindowUnload = (event) => {
|
||||
log(LOG_WINDOW_CLOSE);
|
||||
getCurrentWindow().hide();
|
||||
event.stopImmediatePropagation();
|
||||
// setting return value manually is more reliable than
|
||||
// via `return false` according to electron
|
||||
event.returnValue = false;
|
||||
},
|
||||
interceptWindowClose = () => {
|
||||
// intercept in renderer
|
||||
window.addEventListener("beforeunload", onWindowUnload, true);
|
||||
// intercept in main: is asynchronously executed when registered
|
||||
// from renderer, so won't prevent close by itself, but counteracts
|
||||
// the 3-second delayed window force close in obsidian.asar/main.js
|
||||
getCurrentWindow().on("close", onWindowClose);
|
||||
},
|
||||
allowWindowClose = () => {
|
||||
getCurrentWindow().removeListener("close", onWindowClose);
|
||||
window.removeEventListener("beforeunload", onWindowUnload, true);
|
||||
};
|
||||
|
||||
const hideTaskbarIcons = () => {
|
||||
getWindows().forEach((win) => win.setSkipTaskbar(true));
|
||||
if (process.platform === "darwin") app.dock.hide();
|
||||
},
|
||||
showTaskbarIcons = () => {
|
||||
getWindows().forEach((win) => win.setSkipTaskbar(false));
|
||||
if (process.platform === "darwin") app.dock.show();
|
||||
},
|
||||
setLaunchOnStartup = () => {
|
||||
const { launchOnStartup, runInBackground, hideOnLaunch } = plugin.settings;
|
||||
app.setLoginItemSettings({
|
||||
openAtLogin: launchOnStartup,
|
||||
openAsHidden: runInBackground && hideOnLaunch,
|
||||
});
|
||||
};
|
||||
|
||||
const cleanup = () => {
|
||||
log(LOG_CLEANUP);
|
||||
unregisterHotkeys();
|
||||
showTaskbarIcons();
|
||||
allowWindowClose();
|
||||
destroyTray();
|
||||
},
|
||||
relaunchApp = () => {
|
||||
app.relaunch();
|
||||
app.exit(0);
|
||||
},
|
||||
closeVault = () => {
|
||||
log(LOG_CLEANUP);
|
||||
cleanup();
|
||||
const vaultWindows = getWindows(),
|
||||
obsidianWindows = BrowserWindow.getAllWindows();
|
||||
if (obsidianWindows.length === vaultWindows.length) {
|
||||
// quit app directly if only remaining windows are in the
|
||||
// current vault - necessary for successful quit on macos
|
||||
app.quit();
|
||||
} else vaultWindows.forEach((win) => win.destroy());
|
||||
};
|
||||
|
||||
const addQuickNote = () => {
|
||||
const { quickNoteLocation, quickNoteDateFormat } = plugin.settings,
|
||||
pattern = quickNoteDateFormat || DEFAULT_DATE_FORMAT,
|
||||
date = obsidian.moment().format(pattern),
|
||||
name = obsidian
|
||||
.normalizePath(`${quickNoteLocation ?? ""}/${date}`)
|
||||
.replace(/\*|"|\\|<|>|:|\||\?/g, "-"),
|
||||
// manually create and open file instead of depending
|
||||
// on createAndOpenMarkdownFile to force file creation
|
||||
// relative to the root instead of the active file
|
||||
// (in case user has default location for new notes
|
||||
// set to "same folder as current file")
|
||||
leaf = plugin.app.workspace.getLeaf(),
|
||||
root = plugin.app.fileManager.getNewFileParent(""),
|
||||
openMode = { active: true, state: { mode: "source" } };
|
||||
plugin.app.fileManager
|
||||
.createNewMarkdownFile(root, name)
|
||||
.then((file) => leaf.openFile(file, openMode));
|
||||
showWindows();
|
||||
},
|
||||
replaceVaultName = (str) => {
|
||||
return str.replace(/{{vault}}/g, plugin.app.vault.getName());
|
||||
},
|
||||
destroyTray = () => {
|
||||
tray?.destroy();
|
||||
tray = undefined;
|
||||
},
|
||||
createTrayIcon = () => {
|
||||
destroyTray();
|
||||
if (!plugin.settings.createTrayIcon) return;
|
||||
log(LOG_TRAY_ICON);
|
||||
const obsidianIcon = nativeImage.createFromDataURL(
|
||||
plugin.settings.trayIconImage ?? OBSIDIAN_BASE64_ICON
|
||||
),
|
||||
contextMenu = Menu.buildFromTemplate([
|
||||
{
|
||||
type: "normal",
|
||||
label: ACTION_QUICK_NOTE,
|
||||
accelerator: plugin.settings.quickNoteHotkey,
|
||||
click: addQuickNote,
|
||||
},
|
||||
{
|
||||
type: "normal",
|
||||
label: ACTION_SHOW,
|
||||
accelerator: plugin.settings.toggleWindowFocusHotkey,
|
||||
click: showWindows,
|
||||
},
|
||||
{
|
||||
type: "normal",
|
||||
label: ACTION_HIDE,
|
||||
accelerator: plugin.settings.toggleWindowFocusHotkey,
|
||||
click: hideWindows,
|
||||
},
|
||||
{ type: "separator" },
|
||||
{ label: ACTION_RELAUNCH, click: relaunchApp },
|
||||
{ label: ACTION_CLOSE, click: closeVault },
|
||||
]);
|
||||
tray = new Tray(obsidianIcon);
|
||||
tray.setContextMenu(contextMenu);
|
||||
tray.setToolTip(replaceVaultName(plugin.settings.trayIconTooltip));
|
||||
tray.on("click", () => {
|
||||
if (process.platform === "darwin") {
|
||||
// macos does not register separate left/right click actions
|
||||
// for menu items, icon should open menu w/out causing toggle
|
||||
tray.popUpContextMenu();
|
||||
} else toggleWindows(false);
|
||||
});
|
||||
};
|
||||
|
||||
const registerHotkeys = () => {
|
||||
log(LOG_REGISTER_HOTKEY);
|
||||
try {
|
||||
const { toggleWindowFocusHotkey, quickNoteHotkey } = plugin.settings;
|
||||
if (toggleWindowFocusHotkey) {
|
||||
globalShortcut.register(toggleWindowFocusHotkey, toggleWindows);
|
||||
}
|
||||
if (quickNoteHotkey) {
|
||||
globalShortcut.register(quickNoteHotkey, addQuickNote);
|
||||
}
|
||||
} catch {}
|
||||
},
|
||||
unregisterHotkeys = () => {
|
||||
log(LOG_UNREGISTER_HOTKEY);
|
||||
try {
|
||||
globalShortcut.unregister(plugin.settings.toggleWindowFocusHotkey);
|
||||
globalShortcut.unregister(plugin.settings.quickNoteHotkey);
|
||||
} catch {}
|
||||
};
|
||||
|
||||
const OPTIONS = [
|
||||
"Window management",
|
||||
{
|
||||
key: "launchOnStartup",
|
||||
desc: "Open Obsidian automatically whenever you log into your computer.",
|
||||
type: "toggle",
|
||||
default: false,
|
||||
onChange: setLaunchOnStartup,
|
||||
},
|
||||
{
|
||||
key: "hideOnLaunch",
|
||||
desc: `
|
||||
Minimises Obsidian automatically whenever the app is launched. If the
|
||||
"Run in background" option is enabled, windows will be hidden to the system
|
||||
tray/menubar instead of minimised to the taskbar/dock.
|
||||
`,
|
||||
type: "toggle",
|
||||
default: false,
|
||||
},
|
||||
{
|
||||
key: "runInBackground",
|
||||
desc: `
|
||||
Hides the app and continues to run it in the background instead of quitting
|
||||
it when pressing the window close button or toggle focus hotkey.
|
||||
`,
|
||||
type: "toggle",
|
||||
default: false,
|
||||
onChange() {
|
||||
setLaunchOnStartup();
|
||||
if (plugin.settings.runInBackground) interceptWindowClose();
|
||||
else [allowWindowClose(), showWindows()];
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "hideTaskbarIcon",
|
||||
desc: `
|
||||
Hides the window's icon from from the dock/taskbar. Enabling the tray icon first
|
||||
is recommended if using this option. This may not work on Linux-based OSes.
|
||||
`,
|
||||
type: "toggle",
|
||||
default: false,
|
||||
onChange() {
|
||||
if (plugin.settings.hideTaskbarIcon) hideTaskbarIcons();
|
||||
else showTaskbarIcons();
|
||||
},
|
||||
},
|
||||
{
|
||||
key: "createTrayIcon",
|
||||
desc: `
|
||||
Adds an icon to your system tray/menubar to bring hidden Obsidian windows
|
||||
back into focus on click or force a full quit/relaunch of the app through
|
||||
the right-click menu.
|
||||
`,
|
||||
type: "toggle",
|
||||
default: true,
|
||||
onChange: createTrayIcon,
|
||||
},
|
||||
{
|
||||
key: "trayIconImage",
|
||||
desc: `
|
||||
Set the image used by the tray/menubar icon. Recommended size: 16x16
|
||||
<br>Preview: <img data-preview style="height: 16px; vertical-align: bottom;">
|
||||
`,
|
||||
type: "image",
|
||||
default: OBSIDIAN_BASE64_ICON,
|
||||
onChange: createTrayIcon,
|
||||
},
|
||||
{
|
||||
key: "trayIconTooltip",
|
||||
desc: `
|
||||
Set a title to identify the tray/menubar icon by. The
|
||||
<code>{{vault}}</code> placeholder will be replaced by the vault name.
|
||||
<br>Preview: <b class="u-pop" data-preview></b>
|
||||
`,
|
||||
type: "text",
|
||||
default: "{{vault}} | Obsidian",
|
||||
postprocessor: replaceVaultName,
|
||||
onChange: createTrayIcon,
|
||||
},
|
||||
{
|
||||
key: "toggleWindowFocusHotkey",
|
||||
desc: ACCELERATOR_FORMAT,
|
||||
type: "hotkey",
|
||||
default: "CmdOrCtrl+Shift+Tab",
|
||||
onBeforeChange: unregisterHotkeys,
|
||||
onChange: registerHotkeys,
|
||||
},
|
||||
"Quick notes",
|
||||
{
|
||||
key: "quickNoteLocation",
|
||||
desc: "New quick notes will be placed in this folder.",
|
||||
type: "text",
|
||||
placeholder: "Example: notes/quick",
|
||||
},
|
||||
{
|
||||
key: "quickNoteDateFormat",
|
||||
desc: `
|
||||
New quick notes will use a filename of this pattern. ${MOMENT_FORMAT}
|
||||
<br>Preview: <b class="u-pop" data-preview></b>
|
||||
`,
|
||||
type: "moment",
|
||||
default: DEFAULT_DATE_FORMAT,
|
||||
},
|
||||
{
|
||||
key: "quickNoteHotkey",
|
||||
desc: ACCELERATOR_FORMAT,
|
||||
type: "hotkey",
|
||||
default: "CmdOrCtrl+Shift+Q",
|
||||
onBeforeChange: unregisterHotkeys,
|
||||
onChange: registerHotkeys,
|
||||
},
|
||||
];
|
||||
|
||||
const keyToLabel = (key) =>
|
||||
key[0].toUpperCase() +
|
||||
key
|
||||
.slice(1)
|
||||
.split(/(?=[A-Z])/)
|
||||
.map((word) => word.toLowerCase())
|
||||
.join(" "),
|
||||
htmlToFragment = (html) =>
|
||||
document
|
||||
.createRange()
|
||||
.createContextualFragment((html ?? "").replace(/\s+/g, " "));
|
||||
|
||||
class SettingsTab extends obsidian.PluginSettingTab {
|
||||
display() {
|
||||
this.containerEl.empty();
|
||||
for (const opt of OPTIONS) {
|
||||
const setting = new obsidian.Setting(this.containerEl);
|
||||
if (typeof opt === "string") {
|
||||
setting.setName(opt);
|
||||
setting.setHeading();
|
||||
} else {
|
||||
if (opt.default) opt.placeholder ??= `Example: ${opt.default}`;
|
||||
setting.setName(keyToLabel(opt.key));
|
||||
setting.setDesc(htmlToFragment(opt.desc));
|
||||
const onChange = async (value) => {
|
||||
await opt.onBeforeChange?.();
|
||||
plugin.settings[opt.key] = value;
|
||||
await plugin.saveSettings();
|
||||
await opt.onChange?.();
|
||||
};
|
||||
|
||||
const value = plugin.settings[opt.key] ?? opt.default ?? "";
|
||||
if (opt.type === "toggle") {
|
||||
setting.addToggle((toggle) => {
|
||||
toggle.setValue(value).onChange(onChange);
|
||||
});
|
||||
} else if (opt.type === "image") {
|
||||
const previewImg = setting.descEl.querySelector("img[data-preview");
|
||||
if (previewImg) previewImg.src = value;
|
||||
const fileUpload = setting.descEl.createEl("input");
|
||||
fileUpload.style.visibility = "hidden";
|
||||
fileUpload.type = "file";
|
||||
fileUpload.onchange = (event) => {
|
||||
const file = event.target.files[0],
|
||||
reader = new FileReader();
|
||||
reader.onloadend = () => {
|
||||
onChange(reader.result);
|
||||
if (previewImg) previewImg.src = reader.result;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
};
|
||||
setting.addButton((button) => {
|
||||
button.setIcon("image").onClick(() => fileUpload.click());
|
||||
});
|
||||
} else if (opt.type === "moment") {
|
||||
setting.addMomentFormat((moment) => {
|
||||
const previewEl = setting.descEl.querySelector("[data-preview]");
|
||||
if (previewEl) moment.setSampleEl(previewEl);
|
||||
moment
|
||||
.setPlaceholder(opt.placeholder)
|
||||
.setDefaultFormat(opt.default ?? "")
|
||||
.setValue(value)
|
||||
.onChange(onChange);
|
||||
});
|
||||
} else {
|
||||
const previewEl = setting.descEl.querySelector("[data-preview]"),
|
||||
updatePreview = (value) => {
|
||||
if (!previewEl) return;
|
||||
previewEl.innerText = opt?.postprocessor(value) ?? value;
|
||||
};
|
||||
updatePreview(value);
|
||||
setting.addText((text) => {
|
||||
text
|
||||
.setPlaceholder(opt.placeholder)
|
||||
.setValue(value)
|
||||
.onChange((value) => [onChange(value), updatePreview(value)]);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class TrayPlugin extends obsidian.Plugin {
|
||||
async onload() {
|
||||
log(LOG_LOADING);
|
||||
await this.loadSettings();
|
||||
this.addSettingTab(new SettingsTab(this.app, this));
|
||||
const { settings } = this;
|
||||
|
||||
plugin = this;
|
||||
createTrayIcon();
|
||||
registerHotkeys();
|
||||
setLaunchOnStartup();
|
||||
observeWindows();
|
||||
if (settings.runInBackground) interceptWindowClose();
|
||||
if (settings.hideTaskbarIcon) hideTaskbarIcons();
|
||||
if (settings.hideOnLaunch) {
|
||||
this.registerEvent(this.app.workspace.onLayoutReady(hideWindows));
|
||||
}
|
||||
|
||||
// add as command: can be called from command palette
|
||||
// and can have non-global hotkey assigned via in-app menu
|
||||
this.addCommand({
|
||||
id: "relaunch-app",
|
||||
name: ACTION_RELAUNCH,
|
||||
callback: relaunchApp,
|
||||
});
|
||||
this.addCommand({
|
||||
id: "close-vault",
|
||||
name: ACTION_CLOSE,
|
||||
callback: closeVault,
|
||||
});
|
||||
}
|
||||
onunload() {
|
||||
cleanup();
|
||||
}
|
||||
|
||||
async loadSettings() {
|
||||
const DEFAULT_SETTINGS = OPTIONS.map((opt) => ({ [opt.key]: opt.default }));
|
||||
this.settings = Object.assign(...DEFAULT_SETTINGS, await this.loadData());
|
||||
}
|
||||
async saveSettings() {
|
||||
await this.saveData(this.settings);
|
||||
}
|
||||
}
|
||||
module.exports = TrayPlugin;
|
||||
|
||||
/* nosourcemap */
|
||||
10
mengyanote-backend/data/mengyanote/.obsidian/plugins/tray/manifest.json
vendored
Normal file
10
mengyanote-backend/data/mengyanote/.obsidian/plugins/tray/manifest.json
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "tray",
|
||||
"name": "Tray",
|
||||
"author": "dragonwocky",
|
||||
"authorUrl": "https://dragonwocky.me/",
|
||||
"description": "Run Obsidian from the system tray for customisable window management & global quick notes",
|
||||
"version": "0.3.5",
|
||||
"isDesktopOnly": true,
|
||||
"minAppVersion": "1.0.0"
|
||||
}
|
||||
7
mengyanote-backend/data/mengyanote/.obsidian/themes/Border/manifest.json
vendored
Normal file
7
mengyanote-backend/data/mengyanote/.obsidian/themes/Border/manifest.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "Border",
|
||||
"version": "1.12.20",
|
||||
"minAppVersion": "0.16.0",
|
||||
"author": "Akifyss",
|
||||
"authorUrl": "https://github.com/Akifyss"
|
||||
}
|
||||
9304
mengyanote-backend/data/mengyanote/.obsidian/themes/Border/theme.css
vendored
Normal file
9304
mengyanote-backend/data/mengyanote/.obsidian/themes/Border/theme.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
mengyanote-backend/data/mengyanote/.obsidian/themes/GitHub Theme/manifest.json
vendored
Normal file
7
mengyanote-backend/data/mengyanote/.obsidian/themes/GitHub Theme/manifest.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "GitHub Theme",
|
||||
"version": "1.1.6",
|
||||
"minAppVersion": "1.0.0",
|
||||
"author": "@krios2146",
|
||||
"authorUrl": "https://github.com/krios2146"
|
||||
}
|
||||
1245
mengyanote-backend/data/mengyanote/.obsidian/themes/GitHub Theme/theme.css
vendored
Normal file
1245
mengyanote-backend/data/mengyanote/.obsidian/themes/GitHub Theme/theme.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
8
mengyanote-backend/data/mengyanote/.obsidian/themes/Minimal/manifest.json
vendored
Normal file
8
mengyanote-backend/data/mengyanote/.obsidian/themes/Minimal/manifest.json
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "Minimal",
|
||||
"version": "8.0.4",
|
||||
"minAppVersion": "1.9.0",
|
||||
"author": "@kepano",
|
||||
"authorUrl": "https://twitter.com/kepano",
|
||||
"fundingUrl": "https://www.buymeacoffee.com/kepano"
|
||||
}
|
||||
2251
mengyanote-backend/data/mengyanote/.obsidian/themes/Minimal/theme.css
vendored
Normal file
2251
mengyanote-backend/data/mengyanote/.obsidian/themes/Minimal/theme.css
vendored
Normal file
File diff suppressed because one or more lines are too long
7
mengyanote-backend/data/mengyanote/.obsidian/themes/Phycat/manifest.json
vendored
Normal file
7
mengyanote-backend/data/mengyanote/.obsidian/themes/Phycat/manifest.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"name": "Phycat",
|
||||
"version": "0.2.9",
|
||||
"minAppVersion": "1.9.0",
|
||||
"author": "Xujilong",
|
||||
"authorUrl": "https://github.com/sumruler"
|
||||
}
|
||||
484
mengyanote-backend/data/mengyanote/.obsidian/themes/Phycat/theme.css
vendored
Normal file
484
mengyanote-backend/data/mengyanote/.obsidian/themes/Phycat/theme.css
vendored
Normal file
File diff suppressed because one or more lines are too long
217
mengyanote-backend/data/mengyanote/.obsidian/workspace.json
vendored
Normal file
217
mengyanote-backend/data/mengyanote/.obsidian/workspace.json
vendored
Normal file
@@ -0,0 +1,217 @@
|
||||
{
|
||||
"main": {
|
||||
"id": "0d497f6739ef6df9",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "f6c05057a0ef99fa",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "b2b8008d42f651c2",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "AI/Codex常用命令.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "Codex常用命令"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "1bf536b33f2e3608",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "markdown",
|
||||
"state": {
|
||||
"file": "AI/控制台agent工具安装教程.md",
|
||||
"mode": "source",
|
||||
"source": false
|
||||
},
|
||||
"icon": "lucide-file",
|
||||
"title": "控制台agent工具安装教程"
|
||||
}
|
||||
}
|
||||
],
|
||||
"currentTab": 1
|
||||
}
|
||||
],
|
||||
"direction": "vertical"
|
||||
},
|
||||
"left": {
|
||||
"id": "dd92142da425da5d",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "18712eeca302c86a",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "f1c17e2d203acce4",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "file-explorer",
|
||||
"state": {
|
||||
"sortOrder": "alphabetical",
|
||||
"autoReveal": false
|
||||
},
|
||||
"icon": "lucide-folder-closed",
|
||||
"title": "文件列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "0d80743f19037256",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "search",
|
||||
"state": {
|
||||
"query": "",
|
||||
"matchingCase": false,
|
||||
"explainSearch": false,
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabeticalReverse"
|
||||
},
|
||||
"icon": "lucide-search",
|
||||
"title": "搜索"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "29759c335a3c0889",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "bookmarks",
|
||||
"state": {},
|
||||
"icon": "lucide-bookmark",
|
||||
"title": "书签"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 300
|
||||
},
|
||||
"right": {
|
||||
"id": "a00fc03fc4170f30",
|
||||
"type": "split",
|
||||
"children": [
|
||||
{
|
||||
"id": "553118af57cf253c",
|
||||
"type": "tabs",
|
||||
"children": [
|
||||
{
|
||||
"id": "330eb3c82c280cae",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "backlink",
|
||||
"state": {
|
||||
"file": "Linux/树萌芽のLinux折腾/Linux一些奇奇怪怪的命令.md",
|
||||
"collapseAll": false,
|
||||
"extraContext": false,
|
||||
"sortOrder": "alphabetical",
|
||||
"showSearch": false,
|
||||
"searchQuery": "",
|
||||
"backlinkCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-coming-in",
|
||||
"title": "Linux一些奇奇怪怪的命令 的反向链接列表"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "a11bb24aba14d458",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "outgoing-link",
|
||||
"state": {
|
||||
"linksCollapsed": false,
|
||||
"unlinkedCollapsed": true
|
||||
},
|
||||
"icon": "links-going-out",
|
||||
"title": "出链"
|
||||
}
|
||||
},
|
||||
{
|
||||
"id": "66a43be089eb76fa",
|
||||
"type": "leaf",
|
||||
"state": {
|
||||
"type": "tag",
|
||||
"state": {
|
||||
"sortOrder": "frequency",
|
||||
"useHierarchy": true,
|
||||
"showSearch": false,
|
||||
"searchQuery": ""
|
||||
},
|
||||
"icon": "lucide-tags",
|
||||
"title": "标签"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"direction": "horizontal",
|
||||
"width": 300,
|
||||
"collapsed": true
|
||||
},
|
||||
"left-ribbon": {
|
||||
"hiddenItems": {
|
||||
"switcher:打开快速切换": false,
|
||||
"command-palette:打开命令面板": false,
|
||||
"remotely-save:Remotely Save": false,
|
||||
"obsidian42-brat:BRAT": false
|
||||
}
|
||||
},
|
||||
"active": "1bf536b33f2e3608",
|
||||
"lastOpenFiles": [
|
||||
"AI/AI账号/Qwen账号.md",
|
||||
"CloudFlare/Cloudflare Tunnel使用限制.md",
|
||||
"AI/大模型系统提示词教程.md",
|
||||
"刷新浏览器缓存.md",
|
||||
"AI/Codex常用命令.md",
|
||||
"AI/Gemini Cli常用命令.md",
|
||||
"Git/Git使用SSH提交下载方法总结.md",
|
||||
"Linux/Linux常用关机命令.md",
|
||||
"README.md",
|
||||
"数据库/小萌芽数据库状态检测_2026-03-04.md",
|
||||
"Docker/优秀好用的Docker镜像/Postgres-数据库.md",
|
||||
"临时/灵创盘底部说明.md",
|
||||
"AI/Claude Code常用命令.md",
|
||||
"AI/AI大模型应用实现方式拆解.md",
|
||||
"AI/控制台agent工具安装教程.md",
|
||||
"AI/大模型上下文记忆功能的实现.md",
|
||||
"AI/大模型驱动应用功能的实现.md",
|
||||
"AI/AI提示词工程/AI绘画提示词.md",
|
||||
"AI/阿里云百炼平台模型API调用示例.md",
|
||||
"AI/AI提示词工程/开发前后端分离网站提示词.md",
|
||||
"AI/AI账号/豆包账号.md",
|
||||
"AI/AI账号/GLM账号.md",
|
||||
"AI/AI账号/DeepSeek账号.md",
|
||||
"编程语言/前端/隐藏网页滚动条.md",
|
||||
"编程语言/前端/前端html导入css和js方法.md",
|
||||
"Vercel 项目添加自定义域名完整指南.md",
|
||||
"博客文章",
|
||||
"Linux/LXC",
|
||||
"数据库/SQL Server",
|
||||
"树萌芽の收藏夹",
|
||||
"树萌芽の奇思妙想",
|
||||
"树萌芽の喃喃自语",
|
||||
"树萌芽の小本本",
|
||||
"MarkDown",
|
||||
"内网穿透/VPN",
|
||||
"VPN",
|
||||
"Minecraft/基岩版服务器/NukkitLearn/images/5-04.png",
|
||||
"Minecraft/基岩版服务器/NukkitLearn/images/5-03.png",
|
||||
"Minecraft/基岩版服务器/NukkitLearn/images/5-02.png",
|
||||
"Minecraft/基岩版服务器/NukkitLearn/images/5-01.png",
|
||||
"Minecraft/基岩版服务器/NukkitLearn/images/2-01.png",
|
||||
"Minecraft/基岩版服务器/NukkitLearn/images/1-10.png",
|
||||
"Minecraft/基岩版服务器/NukkitLearn/images/1-09.png",
|
||||
"Minecraft/基岩版服务器/NukkitLearn/images/1-08.png",
|
||||
"Minecraft/基岩版服务器/NukkitLearn/images/1-07.png",
|
||||
"Minecraft/基岩版服务器/NukkitLearn/images/1-06.png"
|
||||
]
|
||||
}
|
||||
10
mengyanote-backend/data/mengyanote/AI/AI大模型应用实现方式拆解.md
Normal file
10
mengyanote-backend/data/mengyanote/AI/AI大模型应用实现方式拆解.md
Normal file
@@ -0,0 +1,10 @@
|
||||
> 此笔记记录一些AI工具的应用原理,给自己制作此类工具提供一点思路
|
||||
|
||||
**AI老师阅卷批改:**
|
||||
OCR文字识别->大语言模型文本处理
|
||||
|
||||
**AI视频总结(bilinote):**
|
||||
下载视频->提取音频->音频转文字->大语言模型文本处理
|
||||
|
||||
**AI一键解读医学报告:**
|
||||
OCR文字识别->大语言模型文本处理
|
||||
7
mengyanote-backend/data/mengyanote/AI/AI提示词工程/AI绘画提示词.md
Normal file
7
mengyanote-backend/data/mengyanote/AI/AI提示词工程/AI绘画提示词.md
Normal file
@@ -0,0 +1,7 @@
|
||||
*by 树萌芽*
|
||||
|
||||
图片风格为2D像素像素化风格,比例 「1:1」 画一个游戏道具,背景是纯黑色,纯黑色 不带任何文字,没有任何文字,现在我要你画 一个闪闪发光的金黄色金币卡
|
||||
|
||||
图片风格为2D像素风格,比例 「1:1」 画一个游戏元素,风格为2.5D 就是上帝视角,就是正交斜视角那种有立体感,背景是纯黑色,纯黑色 不带任何文字,现在我要你画一个一丛茂密的灌木丛 记住一定要3d立体感 只要 灌木丛 只要 灌木丛!
|
||||
|
||||
比例 「1:1」图片风格为2D像素风格, 画一个游戏装饰元素,风格为2.5D 就是上帝视角,就是正交斜视角那种有立体感,背景是纯黑色,纯黑色 不带任何文字,现在我要你画一个 占卜测运算命台 相关的装饰可以多一点 记住一定要3d立体感
|
||||
@@ -0,0 +1,3 @@
|
||||
1.取消CORS跨域限制,允许任何链接
|
||||
2.前端使用React框架,后端使用python的Flask框架
|
||||
3.前端修改在frontend文件夹,后端修改在backend文件夹
|
||||
19
mengyanote-backend/data/mengyanote/AI/AI账号/DeepSeek账号.md
Normal file
19
mengyanote-backend/data/mengyanote/AI/AI账号/DeepSeek账号.md
Normal file
@@ -0,0 +1,19 @@
|
||||
15228246485
|
||||
tyh@19900420
|
||||
|
||||
19161268223
|
||||
smy@1234567890
|
||||
|
||||
shumengya666@gmail.com
|
||||
27m0%o#W#uii;AO|
|
||||
|
||||
shumengya666@outlook.com
|
||||
qwertyuiop
|
||||
|
||||
shumengya520@outlook.com
|
||||
0IZ_hmJ^Z}ae}Bd:
|
||||
|
||||
shumengya888@foxmail.com
|
||||
shumengya4756
|
||||
|
||||
|
||||
2
mengyanote-backend/data/mengyanote/AI/AI账号/GLM账号.md
Normal file
2
mengyanote-backend/data/mengyanote/AI/AI账号/GLM账号.md
Normal file
@@ -0,0 +1,2 @@
|
||||
15228246485
|
||||
tyh@19900420
|
||||
11
mengyanote-backend/data/mengyanote/AI/AI账号/Qwen账号.md
Normal file
11
mengyanote-backend/data/mengyanote/AI/AI账号/Qwen账号.md
Normal file
@@ -0,0 +1,11 @@
|
||||
3205788256@qq.com
|
||||
smy@0123456789
|
||||
|
||||
shumengya666@outlook.com
|
||||
smy@0123456789
|
||||
|
||||
shumengya520@outlook.com
|
||||
smy@0123456789
|
||||
|
||||
shumengya888@outlook.com
|
||||
smy@0123456789
|
||||
3
mengyanote-backend/data/mengyanote/AI/AI账号/豆包账号.md
Normal file
3
mengyanote-backend/data/mengyanote/AI/AI账号/豆包账号.md
Normal file
@@ -0,0 +1,3 @@
|
||||
15228246485
|
||||
tyh@19900420
|
||||
|
||||
65
mengyanote-backend/data/mengyanote/AI/Claude Code常用命令.md
Normal file
65
mengyanote-backend/data/mengyanote/AI/Claude Code常用命令.md
Normal file
@@ -0,0 +1,65 @@
|
||||
|
||||
Claude Code 的命令主要分为三类:
|
||||
1. **终端启动/CLI 命令**(在 shell 中直接运行 `claude` + 参数)
|
||||
2. **常用全局 Flags**(几乎所有模式都支持)
|
||||
3. **交互模式内的 Slash 命令**(进入 `claude` 后输入 `/` 触发的指令)
|
||||
|
||||
### 1. 终端 CLI 命令(claude [flags])
|
||||
|
||||
| 命令示例 | 主要作用 | 典型用法示例 | 备注 |
|
||||
|--------------------------------|--------------------------------------------|---------------------------------------------------|-----------------------|
|
||||
| `claude` | 启动交互式 REPL / TUI 会话 | `claude` | 最常用入口 |
|
||||
| `claude "你的任务描述"` | 带初始提示启动交互会话 | `claude "写单元测试并运行它们"` | 直接开始工作 |
|
||||
| `claude -p "查询"` | 非交互式单次查询(pipe 友好,执行后退出) | `cat error.log \| claude -p "分析日志"` | 脚本 / CI 常用 |
|
||||
| `claude -c` | 继续当前目录下最近的会话 | `claude -c` | 恢复上次工作 |
|
||||
| `claude -c -p "继续任务"` | 继续上次会话 + 单次查询后退出 | `claude -c -p "修复剩余 bug"` | 快速迭代 |
|
||||
| `claude -r <session-id>` | 按 ID 恢复特定历史会话 | `claude -r abc123 "继续优化"` | 指定会话 |
|
||||
| `claude update` | 更新到最新版本 | `claude update` | 保持最新 |
|
||||
| `claude auth login` | 登录 Anthropic 账号 | `claude auth login --email xxx@xx.com` | 首次或切换账号 |
|
||||
| `claude auth logout` | 退出登录 | `claude auth logout` | — |
|
||||
| `claude doctor` | 诊断环境、健康检查 | `claude doctor` | 排查问题 |
|
||||
|
||||
### 2. 常用全局 Flags(可加在 claude 命令后)
|
||||
|
||||
| Flag | 缩写 | 作用 | 示例 |
|
||||
|--------------------------------|------|-----------------------------------------------|------------------------------------------------|
|
||||
| `--model <model>` | -m | 指定模型(sonnet / opus / haiku 或完整名称) | `--model claude-sonnet-4-6` |
|
||||
| `--continue` / `--resume` | -c | 加载当前目录最近会话 | `claude -c` |
|
||||
| `--resume <id>` | -r | 按 ID 恢复会话 | `claude -r abc123` |
|
||||
| `--pipe` / `-p` | -p | 非交互单次查询(常与 pipe 一起用) | `claude -p "总结"` |
|
||||
| `--tools <list>` | — | 只允许特定工具(逗号分隔) | `--tools "Bash,Edit,Read"` |
|
||||
| `--disallowedTools <list>` | — | 禁用特定工具 | `--disallowedTools "Bash(rm *)"` |
|
||||
| `--dangerously-skip-permissions` | — | 跳过所有权限确认(极度危险,仅调试用) | `--dangerously-skip-permissions` |
|
||||
| `--debug` | — | 开启详细调试日志 | `claude --debug` |
|
||||
| `--no-color` | — | 禁用彩色输出 | `--no-color` |
|
||||
|
||||
### 3. 交互模式内 Slash 命令(输入 / 后出现,可搜索过滤)
|
||||
|
||||
| Slash 命令 | 主要作用 | 常用场景 / 备注 |
|
||||
|-------------------------|-----------------------------------------------|----------------------------------------------|
|
||||
| `/help` | 显示所有可用 slash 命令(含自定义) | 必备,随时查看 |
|
||||
| `/model` | 切换模型(Sonnet / Opus / Haiku 等) | 性能 vs 速度权衡 |
|
||||
| `/init` | 扫描项目,自动生成 CLAUDE.md 项目记忆文件 | 新项目强烈推荐先跑一次 |
|
||||
| `/compact` | 压缩当前对话历史,节省上下文 token | 会话太长时使用 |
|
||||
| `/clear` | 清空当前对话,从零开始 | 换新任务时 |
|
||||
| `/memory` / `/edit-memory` | 编辑 CLAUDE.md 或其他记忆文件 | 持久化项目知识 |
|
||||
| `/cost` | 显示当前会话 token 消耗 & 估算费用 | 监控大模型使用 |
|
||||
| `/rewind` | 撤销上一步变更(类似 git revert) | 改坏了快速回退 |
|
||||
| `/theme` | 切换界面主题(深色/浅色/自定义) | 改善夜间阅读 |
|
||||
| `/insights` | 生成使用习惯分析报告(HTML) | 每月跑一次,优化 workflow |
|
||||
| `/plugin` | 安装/管理插件、市场扩展 | 扩展功能(如 github 集成) |
|
||||
| `/install-github-app` | 安装 Claude 的 GitHub App(PR 自动 review) | 团队协作神器 |
|
||||
|
||||
**补充说明**(2026 年 3 月最新情况):
|
||||
- 官方最权威文档始终是:https://code.claude.com/docs/en/cli-reference
|
||||
- 交互界面按 `/` 后直接打字可模糊搜索命令(超级方便)
|
||||
- 很多高级用法依赖 **CLAUDE.md**(项目记忆文件) + **自定义 slash commands**(放在 `.claude/commands/` 目录下写 markdown 即可)
|
||||
- 工具权限(Edit/Bash/Read 等)默认会逐个确认,熟练后可用 `--dangerously-skip-permissions` 或 hooks 自动化
|
||||
|
||||
运行下面命令可快速查看本地最新帮助:
|
||||
```bash
|
||||
claude --help
|
||||
# 或进入交互模式后
|
||||
/help
|
||||
```
|
||||
|
||||
67
mengyanote-backend/data/mengyanote/AI/Codex常用命令.md
Normal file
67
mengyanote-backend/data/mengyanote/AI/Codex常用命令.md
Normal file
@@ -0,0 +1,67 @@
|
||||
|
||||
1. **终端命令**(运行 `codex` 时使用的命令行参数 / 子命令)
|
||||
2. **Slash 命令**(在交互式 TUI 界面中输入 `/` 后出现的内置指令)
|
||||
|
||||
### 1. 终端命令行选项与子命令(codex [subcommand] [flags])
|
||||
|
||||
| 命令 / 子命令 | 常用缩写 | 主要作用 | 典型用法示例 | 成熟度 |
|
||||
|-------------------------|----------|---------------------------------------|--------------------------------------------|------------|
|
||||
| `codex` | — | 启动交互式 TUI(最常用) | `codex` 或 `codex "修复这个 bug"` | Stable |
|
||||
| `codex exec` | `codex e`| 非交互式执行一次任务,输出到 stdout | `codex exec "写一个 REST API"` | Stable |
|
||||
| `codex exec resume` | — | 恢复之前的 exec 会话 | `codex exec resume --last "继续优化"` | Stable |
|
||||
| `codex resume` | — | 恢复之前的交互式会话 | `codex resume --last` | Stable |
|
||||
| `codex fork` | — | 从已有会话 fork 新分支 | `codex fork --last` | Stable |
|
||||
| `codex login` | — | 登录(ChatGPT / API key) | `codex login` | Stable |
|
||||
| `codex logout` | — | 退出登录 | `codex logout` | Stable |
|
||||
| `codex features` | — | 管理功能开关(list/enable/disable) | `codex features list` | Stable |
|
||||
| `codex completion` | — | 生成 shell 自动补全脚本 | `codex completion zsh` | Stable |
|
||||
| `codex apply` | `codex a`| 应用 Cloud 任务生成的 diff | `codex apply task_abc123` | Stable |
|
||||
| `codex cloud` | — | 操作 Codex Cloud 任务(实验性) | `codex cloud "总结 bug"` | Experimental |
|
||||
| `codex app` | — | 启动桌面应用(仅 macOS) | `codex app` | Stable |
|
||||
|
||||
**常用全局 Flags**(几乎所有命令都支持)
|
||||
|
||||
| Flag | 缩写 | 作用 | 示例 |
|
||||
|-------------------------|------|-------------------------------------------|--------------------------------------|
|
||||
| `--model` | `-m` | 指定模型 | `--model gpt-5.4` |
|
||||
| `--image` | `-i` | 附加图片 | `-i error.png "解释这个报错"` |
|
||||
| `--cd` | `-C` | 指定工作目录 | `--cd ./backend` |
|
||||
| `--add-dir` | — | 额外授权读写目录(可多次) | `--add-dir ../shared` |
|
||||
| `--sandbox` | `-s` | 沙箱策略(read-only / workspace-write / danger-full-access) | `-s workspace-write` |
|
||||
| `--ask-for-approval` | `-a` | 审批策略(untrusted / on-request / never)| `-a never` |
|
||||
| `--full-auto` | — | 低摩擦自动模式(相当于 -a on-request + workspace-write) | `--full-auto` |
|
||||
| `--config` / `-c` | `-c` | 覆盖配置(key=value) | `-c web_search=live` |
|
||||
| `--search` | — | 强制使用实时联网搜索 | `--search` |
|
||||
| `--dangerously-bypass-approvals-and-sandbox` | `--yolo` | 完全关闭审批和沙箱(极度危险) | `--yolo` |
|
||||
| `--oss` | — | 使用本地开源模型(需 Ollama) | `--oss` |
|
||||
|
||||
### 2. 交互界面内的 Slash 命令(输入 / 后选择)
|
||||
|
||||
| Slash 命令 | 主要作用 | 常用场景 |
|
||||
|---------------------|---------------------------------------|--------------------------------------------|
|
||||
| `/model` | 切换模型 + 推理强度 | 想用更强的模型或更快的模型时 |
|
||||
| `/sandbox-add-read-dir` | 临时增加沙箱可读目录(Windows 常用) | 需要访问系统目录时 |
|
||||
| `/agent` | 切换 / 查看子 agent 线程 | 多线程并行工作时 |
|
||||
| `/clear` | 清屏 + 新建对话 | 想从干净状态重新开始 |
|
||||
| `/compact` | 压缩历史对话,节省 token | 会话很长、快超上下文时 |
|
||||
| `/diff` | 显示当前所有代码变更(含 untracked) | 提交前 review 改动 |
|
||||
| `/exit` / `/quit` | 退出 Codex CLI | 工作完成 |
|
||||
| `/experimental` | 切换实验性功能开关 | 想试用新特性 |
|
||||
| `/init` | 在项目中生成 AGENTS.md 模板 | 给仓库添加持久化指令 |
|
||||
| `/mention` | 手动添加文件/文件夹到上下文 | 想让 Codex 特别关注某个文件 |
|
||||
| `/plan` | 切换到只规划不执行模式 | 先要完整方案再动手 |
|
||||
| `/personality` | 切换回答风格(friendly / pragmatic / none) | 想要更友好或更直接的语气 |
|
||||
| `/review` | 让 Codex review 当前工作区代码 | 改完代码想让它再检查一遍 |
|
||||
| `/status` | 显示当前会话配置、token 使用情况 | 排查问题 / 查看剩余上下文 |
|
||||
| `/fork` | 当前对话 fork 新分支 | 想尝试不同方案但保留原路线 |
|
||||
| `/resume` | 恢复历史会话 | 继续昨天的工作 |
|
||||
| `/new` | 在当前 CLI 内新建一个对话 | 不退出程序,但换个新话题 |
|
||||
|
||||
这些是目前(2026 年 3 月)官方文档中最新的主要命令集合。实际可用命令和 flag 可能因你的版本略有差异,建议运行以下命令查看本地最新帮助:
|
||||
|
||||
```bash
|
||||
codex --help
|
||||
codex exec --help
|
||||
codex features list # 查看可开关实验功能
|
||||
```
|
||||
|
||||
62
mengyanote-backend/data/mengyanote/AI/Gemini Cli常用命令.md
Normal file
62
mengyanote-backend/data/mengyanote/AI/Gemini Cli常用命令.md
Normal file
@@ -0,0 +1,62 @@
|
||||
|
||||
Gemini CLI 的命令主要分为三类:
|
||||
1. **终端启动/CLI 参数**(shell 中直接运行 `gemini` + flags)
|
||||
2. **常用全局 Flags**(适用于大多数模式)
|
||||
3. **交互模式内的 Slash 命令**(进入 `gemini` 后输入 `/` 触发的内置指令)
|
||||
|
||||
### 1. 终端 CLI 命令与 Flags(gemini [flags])
|
||||
|
||||
| 命令示例 | 主要作用 | 典型用法示例 | 备注 |
|
||||
|--------------------------------|--------------------------------------------|---------------------------------------------------|-----------------------|
|
||||
| `gemini` | 启动交互式会话(TUI / REPL) | `gemini` | 最常用入口 |
|
||||
| `gemini "你的任务"` | 带初始提示启动交互会话 | `gemini "分析这个项目架构"` | 快速开始 |
|
||||
| `gemini -p "查询"` | 非交互式单次查询(pipe 友好,执行后退出) | `cat log.txt \| gemini -p "总结错误"` | 脚本/CI 常用 |
|
||||
| `gemini -m gemini-3-pro` | 指定模型启动 | `gemini -m gemini-3-pro` | 支持 gemini-3 等 |
|
||||
| `gemini --help` | 显示完整帮助 | `gemini --help` | 查看所有 flags |
|
||||
| `gemini update` / `npm update` | 更新到最新版本 | `npm install -g @google/gemini-cli@latest` | 保持最新特性 |
|
||||
|
||||
**常用全局 Flags**(可加在 gemini 后)
|
||||
|
||||
| Flag | 缩写 | 作用 | 示例 |
|
||||
|--------------------------------|------|-----------------------------------------------|------------------------------------------------|
|
||||
| `--model <model>` | -m | 指定模型(gemini-3-pro / gemini-2.5-flash 等) | `-m gemini-3-pro` |
|
||||
| `--prompt <text>` | -p | 非交互模式,直接给出提示 | `-p "写 README"` |
|
||||
| `--output-format json` | — | 输出 JSON 格式(脚本友好) | `--output-format json` |
|
||||
| `--include-directories <dirs>` | — | 额外包含目录到上下文 | `--include-directories ../shared` |
|
||||
| `--yolo` | — | 启用 Yolo 模式(自动批准所有工具调用,危险) | `--yolo` |
|
||||
| `--preview-features` | — | 开启预览功能(Gemini 3 等) | 通过 /settings 切换更方便 |
|
||||
|
||||
### 2. 交互模式内 Slash 命令(输入 / 后出现,可模糊搜索)
|
||||
|
||||
| Slash 命令 | 主要作用 | 常用场景 / 备注 |
|
||||
|-------------------------|-----------------------------------------------|----------------------------------------------|
|
||||
| `/help` | 显示所有 slash 命令 + 快捷键 | 随时查看帮助,必备 |
|
||||
| `/model` | 切换模型(Auto / gemini-3-pro / flash 等) | 切换性能/速度/成本 |
|
||||
| `/settings` | 打开设置界面(主题、预览功能、工具等) | 启用 Preview features 获取 Gemini 3 |
|
||||
| `/memory` | 管理记忆(add / list / clear / edit) | 添加项目持久知识(类似 CLAUDE.md) |
|
||||
| `/clear` | 清空当前对话 + 上下文,从零开始 | 切换新任务时 |
|
||||
| `/stats` / `/cost` | 显示 token 使用、费用估算、会话统计 | 监控大上下文消耗 |
|
||||
| `/tools` | 列出当前可用工具(shell、file read/write 等) | 查看/调试 agent 能力 |
|
||||
| `/mcp` | 管理 MCP(Model Context Protocol)服务器 | 高级:连接外部知识源 |
|
||||
| `/commands` | 管理自定义 slash 命令(reload / list) | 自定义命令后 reload |
|
||||
| `/chat` | 会话管理(save / resume / list / branch) | 保存/恢复/分支对话历史 |
|
||||
| `/setup-github` | 一键设置 GitHub Actions + Gemini 集成 | 仓库自动 review/PR triage |
|
||||
| `/bug` | 直接从 CLI 提交 bug 到 Gemini CLI GitHub | 报告问题 |
|
||||
| `/extensions` | 管理扩展(explore / install / list) | 安装社区扩展(如 Dynatrace、Shopify 等) |
|
||||
| `/rewind` | 撤销上一步(类似 git revert) | 改坏了快速回滚 |
|
||||
| `/compact` | 压缩对话历史,节省 token | 长会话优化 |
|
||||
|
||||
**补充说明**(2026 年 3 月最新动态):
|
||||
- 官方最权威文档:https://geminicli.com/docs/reference/commands (slash 命令完整列表)
|
||||
- 自定义 slash 命令:放在 `~/.gemini/commands/` 或项目 `.gemini/commands/` 目录下,用 .toml 文件定义(超级强大,可复用提示词)
|
||||
- 工具权限:默认会逐个确认(file edit / shell exec 等),熟练后可用 `--yolo` 或配置自动批准
|
||||
- Gemini 3 Pro/Flash 支持:通过 `/settings` 开启 Preview features,或 `-m gemini-3-pro`
|
||||
- 安装/更新:`npm install -g @google/gemini-cli@latest`(Node.js 环境)
|
||||
|
||||
快速查看本地帮助:
|
||||
```bash
|
||||
gemini --help # 终端 flags
|
||||
# 进入交互后
|
||||
/help # slash 命令列表
|
||||
```
|
||||
|
||||
66
mengyanote-backend/data/mengyanote/AI/Iflow常用命令.md
Normal file
66
mengyanote-backend/data/mengyanote/AI/Iflow常用命令.md
Normal file
@@ -0,0 +1,66 @@
|
||||
|
||||
1. **终端 CLI 命令**(shell 中运行 `iflow` + 子命令 / flags)
|
||||
2. **常用全局 Flags**(适用于启动时)
|
||||
3. **交互 TUI 内 Slash 命令**(进入 `iflow` 后输入 `/` 触发,可模糊搜索)
|
||||
|
||||
### 1. 终端 CLI 命令(iflow [flags] 或 iflow [prompt])
|
||||
|
||||
| 命令示例 | 主要作用 | 典型用法示例 | 备注 |
|
||||
|--------------------------------|--------------------------------------------|---------------------------------------------------|-----------------------|
|
||||
| `iflow` | 启动交互式 TUI / REPL 会话 | `iflow` 或 `iflow "帮我写个 REST API"` | 最常用入口 |
|
||||
| `iflow "你的任务"` | 带初始提示启动交互会话 | `iflow "分析这个项目结构"` | 快速开始 |
|
||||
| `iflow --help` / `iflow -h` | 显示完整帮助与所有 flags | `iflow --help` | 查看子命令与选项 |
|
||||
| `iflow -v` / `iflow --version` | 查看当前版本 | `iflow -v` | 检查更新 |
|
||||
| `iflow update` | 检查并更新到最新版 | `iflow update` | 自动升级 |
|
||||
|
||||
**常用全局 Flags**(加在 `iflow` 后)
|
||||
|
||||
| Flag | 缩写 | 作用 | 示例 |
|
||||
|--------------------------------|------|-----------------------------------------------|------------------------------------------------|
|
||||
| `--model <model>` | -m | 指定模型(qwen3-coder / kimi-k2 / deepseek-v3 等) | `-m qwen3-coder` |
|
||||
| `--yolo` | — | 启用 YOLO 模式(全自动、无需逐个确认,危险) | `--yolo` 或 shift+tab 切换 |
|
||||
| `--debug` | -d | 开启调试日志 | `--debug` |
|
||||
| `--port <number>` | — | 指定 headless 服务器端口(用于 ACP/MCP) | `--port 8090` |
|
||||
| `--experimental-acp` | — | 开启实验性 Agent Communication Protocol | 用于 SDK 集成 |
|
||||
|
||||
### 2. 交互模式内 Slash 命令(输入 / 后出现,可上下箭头浏览 / 搜索)
|
||||
|
||||
| Slash 命令 | 主要作用 | 常用场景 / 备注 |
|
||||
|-------------------------|-----------------------------------------------|----------------------------------------------|
|
||||
| `/help` | 显示所有 slash 命令 + 快捷键 | 随时查看,必备 |
|
||||
| `/init` | 扫描当前项目,分析结构/依赖/架构,生成记忆 | 新项目必跑,类似 /init in Claude Code |
|
||||
| `/clear` | 清空当前对话历史 + 上下文,从零开始 | 切换新任务 |
|
||||
| `/exit` / `/quit` | 退出 iFlow CLI | 结束会话 |
|
||||
| `/model` / `/models` | 切换或查看当前模型 | 切换 Qwen / Kimi / DeepSeek 等 |
|
||||
| `/language` | 切换界面语言(zh-CN / en-US) | 中英文切换 |
|
||||
| `/update` | 检查并更新 CLI 到最新版本 | 在 TUI 内升级 |
|
||||
| `/undo` / `/redo` | 撤销/重做上一步文件变更 | 安全回滚 |
|
||||
| `/cost` / `/stats` | 显示 token 消耗、费用估算(虽免费但显示使用) | 监控上下文长度 |
|
||||
| `/compact` | 压缩对话历史,节省 token | 长会话优化 |
|
||||
| `/agent` / `$agent-name`| 切换 / 调用 SubAgent($explore-agent 等) | 多角色协作(如 explorer / coder / reviewer) |
|
||||
| `/mcp` | 管理 MCP 服务器(添加/查看/切换) | ctrl+t 查看,连接外部工具/知识源 |
|
||||
| `/commands` | 查看/重载自定义 slash 命令 | 自定义后 reload |
|
||||
| `/tools` | 查看/配置工具权限(shell / edit / read 等) | 调试 agent 能力 |
|
||||
| `/share` | 生成会话分享链接 | 分享给团队或调试 |
|
||||
| `!命令` | 直接执行系统 shell 命令(如 !ls -la) | 混合使用系统命令 |
|
||||
|
||||
**补充说明**(2026 年 3 月最新情况):
|
||||
- 官方最权威文档:https://platform.iflow.cn/cli/quickstart + https://platform.iflow.cn/cli/examples/slash-commands(斜杠命令详解)
|
||||
- 安装方式(macOS/Linux 推荐一键):
|
||||
```bash
|
||||
bash -c "$(curl -fsSL https://cloud.iflow.cn/iflow-cli/install.sh)"
|
||||
# 或 npm 全局安装
|
||||
npm install -g @iflow-ai/iflow-cli@latest
|
||||
```
|
||||
- 首次运行会引导登录/选模型(支持免费国内大模型,无需 API key 烦恼)
|
||||
- YOLO 模式(全自动)默认开启,shift + tab 切换;ctrl + y 禁用确认
|
||||
- 自定义 slash 命令:放在项目 `.iflow/commands/` 或全局目录,支持 Markdown 定义
|
||||
- VS Code 插件:搜索 "iFlow CLI" 安装,可在侧边栏直接呼出
|
||||
- GitHub Actions 集成:用 iflow-ai/iflow-cli-action@v2 在 PR/issue 中自动化
|
||||
|
||||
快速查看本地帮助:
|
||||
```bash
|
||||
iflow --help # CLI flags
|
||||
# 进入交互后
|
||||
/help # slash 命令列表
|
||||
```
|
||||
75
mengyanote-backend/data/mengyanote/AI/OpenClaw常用命令.md
Normal file
75
mengyanote-backend/data/mengyanote/AI/OpenClaw常用命令.md
Normal file
@@ -0,0 +1,75 @@
|
||||
|
||||
命令主要分为三类:
|
||||
1. **终端 CLI 命令**(shell 中运行 `openclaw` + 子命令)
|
||||
2. **常用全局 Flags**(适用于大多数命令)
|
||||
3. **交互/聊天模式内 Slash 命令**(在 Telegram/WhatsApp 等通道中输入 `/` 触发的指令,或 TUI/CLI agent 模式)
|
||||
|
||||
### 1. 终端 CLI 命令(openclaw [subcommand] [flags])
|
||||
|
||||
| 子命令 / 用法示例 | 主要作用 | 典型示例 | 备注 / 常用度 |
|
||||
|------------------------------------|-----------------------------------------------|----------------------------------------------------|--------------------|
|
||||
| `openclaw` | 显示帮助 / 顶级命令列表 | `openclaw` 或 `openclaw --help` | 入口查看帮助 |
|
||||
| `openclaw onboard` | 首次引导设置(wizard,最推荐) | `openclaw onboard --install-daemon` | 新用户必跑 |
|
||||
| `openclaw configure` / `openclaw config` | 交互式配置向导(模型、通道、默认 agent 等) | `openclaw configure --section model` | 配置首选 |
|
||||
| `openclaw gateway start` | 启动 Gateway(核心服务,24/7 运行) | `openclaw gateway start` | 后台运行常用 |
|
||||
| `openclaw gateway restart` | 重启 Gateway | `openclaw gateway restart` | 更新/卡住时用 |
|
||||
| `openclaw gateway stop` | 停止 Gateway | `openclaw gateway stop` | 维护时 |
|
||||
| `openclaw gateway status` | 查看 Gateway 状态 | `openclaw gateway status --all` | 监控首选 ★★★★★ |
|
||||
| `openclaw doctor` | 诊断配置、健康检查、常见问题 | `openclaw doctor` | 排查问题 ★★★★★ |
|
||||
| `openclaw status` | 简易状态概览(Gateway + channels) | `openclaw status` | 快速检查 |
|
||||
| `openclaw channels list` | 列出已连接通道(Telegram/Slack 等) | `openclaw channels list --json` | 查看连接 |
|
||||
| `openclaw channels add` / `login` | 添加/登录新通道 | `openclaw channels login telegram` | 扩展聊天入口 |
|
||||
| `openclaw models list` | 列出可用模型 | `openclaw models list --all` | 查看/切换模型 |
|
||||
| `openclaw models set <provider/model>` | 设置默认模型 | `openclaw models set claude/sonnet-4` | 常用切换 |
|
||||
| `openclaw agents list` | 列出 agents / workspaces | `openclaw agents list` | 多 agent 管理 |
|
||||
| `openclaw agents add <name>` | 添加新 agent / workspace | `openclaw agents add work --workspace ~/workspace-work` | 多角色并行 |
|
||||
| `openclaw cron list` | 列出 cron 任务(heartbeat / 定时) | `openclaw cron list` | 自动化监控 ★★★★ |
|
||||
| `openclaw logs --follow` | 实时查看日志 | `openclaw logs -f` | 调试首选 ★★★★★ |
|
||||
| `openclaw update` / `npm update -g openclaw` | 更新到最新版 | `npm install -g openclaw@latest` | 保持最新 |
|
||||
| `openclaw reset --scope full` | 核重置(配置 + workspace) | `openclaw reset --scope full` | 问题严重时用 |
|
||||
|
||||
**常用全局 Flags**(加在 openclaw 后)
|
||||
|
||||
| Flag | 作用 | 示例 |
|
||||
|--------------------------------|-----------------------------------------------|------------------------------------------------|
|
||||
| `--dev` | 开发模式(更多日志、热重载) | `--dev` |
|
||||
| `--profile <name>` | 使用指定配置文件(多环境) | `--profile work` |
|
||||
| `--json` | JSON 输出(脚本友好) | `openclaw status --json` |
|
||||
| `--help` / `-h` | 显示子命令帮助 | `openclaw gateway --help` |
|
||||
|
||||
### 2. 交互/聊天模式内 Slash 命令(在 Telegram/WhatsApp/Slack 等通道中输入 `/`)
|
||||
|
||||
| Slash 命令 | 主要作用 | 常用场景 / 备注 |
|
||||
|-------------------------|-----------------------------------------------|----------------------------------------------|
|
||||
| `/help` | 显示所有可用 slash 命令 + 快捷键 | 随时查看,必备 |
|
||||
| `/model` | 切换当前会话模型(支持 fallback) | 切换 Claude / Gemini / Qwen 等 |
|
||||
| `/new` | 开始新对话 / 清空上下文 | 换新任务 |
|
||||
| `/clear` | 清空记忆 / 上下文 | 重置会话 |
|
||||
| `/memory` / `/edit-memory` | 查看/编辑长期记忆(SOUL.md / AGENTS.md 等) | 持久化人格/规则 |
|
||||
| `/skills` / `/skills list` | 查看/管理技能(install / add) | 扩展功能(如 coding、email、browser) |
|
||||
| `/status` | 显示当前 agent 状态、模型、token 使用 | 快速自查 |
|
||||
| `/cost` / `/stats` | token 消耗估算 | 监控大模型费用 |
|
||||
| `/undo` | 撤销上一步动作(文件/命令) | 安全回滚 |
|
||||
| `/agent` / `@agent-name`| 切换/调用特定 agent | 多 agent 协作 |
|
||||
| `/channels` | 查看/管理通道连接 | 检查 WhatsApp 等在线状态 |
|
||||
|
||||
**补充说明**(2026 年 3 月最新情况):
|
||||
- 官方最权威文档:https://docs.openclaw.ai/cli (CLI 参考树) + https://docs.openclaw.ai/concepts (模型/技能/内存)
|
||||
- 安装方式(一键推荐):
|
||||
```bash
|
||||
npm install -g openclaw@latest
|
||||
openclaw onboard --install-daemon # 首次运行引导 + 安装 daemon
|
||||
```
|
||||
- OpenClaw 核心是 Gateway(WebSocket 服务),CLI 主要用于管理它;实际交互多在聊天 app 中进行。
|
||||
- 安全提示:默认允许工具(如 shell、文件编辑),生产环境建议用 sandbox / 审批,或自定义技能白名单。
|
||||
- 社区资源:ClawHub(技能市场)、GitHub issues、YouTube 教程(搜索 "OpenClaw tutorial")。
|
||||
- 与其他工具对比:不像 Codex/Claude Code/OpenCode 专注编码,OpenClaw 更偏向“个人/团队数字员工”(邮件、日历、自动化、跨通道)。
|
||||
|
||||
快速查看本地帮助:
|
||||
```bash
|
||||
openclaw --help # 顶级命令
|
||||
openclaw gateway --help # 子命令示例
|
||||
# 在聊天中
|
||||
/help
|
||||
```
|
||||
|
||||
70
mengyanote-backend/data/mengyanote/AI/OpenCode常用命令.md
Normal file
70
mengyanote-backend/data/mengyanote/AI/OpenCode常用命令.md
Normal file
@@ -0,0 +1,70 @@
|
||||
|
||||
命令主要分为三类:
|
||||
1. **终端 CLI 命令**(shell 中直接运行 `opencode` + 子命令)
|
||||
2. **常用全局 Flags**(适用于大多数模式)
|
||||
3. **交互 TUI 内 Slash 命令**(运行 `opencode` 进入界面后输入 `/` 触发)
|
||||
|
||||
### 1. 终端 CLI 命令(opencode [subcommand] [flags])
|
||||
|
||||
| 子命令 / 用法 | 主要作用 | 典型示例 | 备注 / 成熟度 |
|
||||
|--------------------------------|-----------------------------------------------|----------------------------------------------------|--------------------|
|
||||
| `opencode` | 启动交互式 TUI(最常用) | `opencode` 或 `opencode "修复这个 bug"` | 默认入口 |
|
||||
| `opencode run "prompt"` | 非交互式单次执行(pipe 友好,执行后退出) | `opencode run "写一个 REST API 示例"` | 脚本/CI 常用 |
|
||||
| `opencode tui` | 显式启动 TUI(等同无参数) | `opencode tui` | — |
|
||||
| `opencode upgrade` | 更新到最新版本 | `opencode upgrade` | 保持最新 |
|
||||
| `opencode upgrade vX.Y.Z` | 更新到指定版本 | `opencode upgrade v1.2.3` | — |
|
||||
| `opencode auth list` | 列出已配置的凭证/提供商 | `opencode auth list` | 管理 API key |
|
||||
| `opencode auth logout` | 退出特定提供商登录 | `opencode auth logout` | — |
|
||||
| `opencode models` | 列出所有可用模型(跨提供商) | `opencode models` | 刷新缓存后查看 |
|
||||
| `opencode agent create` | 创建自定义 agent | `opencode agent create` | 交互式向导 |
|
||||
| `opencode agent list` | 列出所有 agent | `opencode agent list` | — |
|
||||
| `opencode github install` | 在当前 GitHub 仓库安装 OpenCode Actions 集成 | `opencode github install` | PR 自动 review |
|
||||
| `opencode serve` | 启动 headless 服务器(API 访问) | `opencode serve` | 远程/网络使用 |
|
||||
| `opencode web` | 启动带 Web 界面的服务器 | `opencode web` | 可视化访问 |
|
||||
| `opencode attach` | 连接到运行中的后台服务器 | `opencode attach` | 远程 TUI |
|
||||
|
||||
**常用全局 Flags**(可加在 opencode 后)
|
||||
|
||||
| Flag | 缩写 | 作用 | 示例 |
|
||||
|-----------------------|------|-----------------------------------------------|-------------------------------------------|
|
||||
| `--prompt <text>` | -p | 非交互模式,直接给出提示 | `-p "总结变更"` |
|
||||
| `--model <provider/model>` | -m | 指定模型 | `-m claude/sonnet-4` 或 `-m ollama/llama3` |
|
||||
| `--agent <name>` | — | 指定启动的 agent | `--agent explorer` |
|
||||
| `--cwd <dir>` | -c | 设置工作目录 | `--cwd ./backend` |
|
||||
| `--debug` | -d | 开启调试日志 | `--debug` |
|
||||
| `--force` / `--yolo` | -f | 跳过确认提示(危险,全自动) | `--yolo` |
|
||||
| `--help` | -h | 显示帮助 | `opencode --help` |
|
||||
|
||||
### 2. 交互 TUI 内 Slash 命令(输入 / 后模糊搜索)
|
||||
|
||||
| Slash 命令 | 主要作用 | 常用场景 / 备注 |
|
||||
|-----------------------|-----------------------------------------------|----------------------------------------------|
|
||||
| `/help` | 显示所有 slash 命令 + 快捷键 | 随时查看,必备 |
|
||||
| `/connect` | 添加/登录 LLM 提供商(Claude、OpenAI 等) | 首次使用或切换账号 |
|
||||
| `/models` | 切换当前模型 | 性能/速度/成本权衡 |
|
||||
| `/init` | 扫描项目,生成/更新 AGENTS.md 项目记忆文件 | 新项目强烈推荐先跑 |
|
||||
| `/undo` / `/redo` | 撤销/重做上一步(包括文件变更) | 安全迭代核心 |
|
||||
| `/clear` | 清空当前对话 + 上下文,从零开始 | 切换新任务 |
|
||||
| `/share` | 生成会话分享链接 | 分享给团队或调试 |
|
||||
| `/agent` | 切换/管理 agent(@提及方式调用) | 多角色并行工作 |
|
||||
| `/commands` | 管理/重载自定义命令 | 自定义后 reload |
|
||||
| `/tools` | 查看/配置工具权限(shell/edit/read 等) | 调试 agent 能力 |
|
||||
| `/cost` / `/stats` | 显示 token 消耗、费用估算 | 监控大上下文 |
|
||||
| `/compact` | 压缩对话历史,节省 token | 长会话优化 |
|
||||
| `/memory` | 编辑项目记忆(AGENTS.md 等) | 持久化项目知识 |
|
||||
|
||||
**补充说明**(2026 年 3 月最新情况):
|
||||
- 官方最权威文档:https://opencode.ai/docs/cli + https://opencode.ai/docs/commands + https://opencode.ai/docs/tui
|
||||
- 自定义 slash 命令:放在项目 `.opencode/commands/` 或全局 `~/.config/opencode/commands/` 目录下,用 Markdown 文件定义(支持占位符,非常强大)
|
||||
- 工具权限:默认全开(可编辑 shell、文件等),生产环境建议配置审批或用 `--yolo` 自动化
|
||||
- 支持本地模型:Ollama / LM Studio 等,通过 `/connect` 添加
|
||||
- GitHub 集成:`opencode github install` 后可在 PR 评论中用 `/opencode` 或 `/oc` 触发 agent
|
||||
|
||||
快速查看本地帮助:
|
||||
```bash
|
||||
opencode --help # CLI flags 和子命令
|
||||
opencode models # 可用模型
|
||||
# 进入 TUI 后
|
||||
/help # slash 命令列表
|
||||
```
|
||||
|
||||
51
mengyanote-backend/data/mengyanote/AI/大模型上下文记忆功能的实现.md
Normal file
51
mengyanote-backend/data/mengyanote/AI/大模型上下文记忆功能的实现.md
Normal file
@@ -0,0 +1,51 @@
|
||||
|
||||
**大模型本身不具备记忆功能,并且是无状态的。我们感受到的“记忆”和“上下文”能力,是由使用大模型的应用程序(或框架)提供的。**
|
||||
|
||||
### 1. 大模型本身:一个“无状态”的函数
|
||||
|
||||
你可以把一个大模型(比如 GPT-4)想象成一个极其复杂、聪明的**数学函数**。
|
||||
|
||||
- **无状态:** 这个函数本身不存储任何关于上一次被调用(即上一次对话)的信息。就像你计算 `f(x) = x + 2` 这个函数,你输入 `3`,它输出 `5`。你再次输入 `3`,它还是会输出 `5`。它不会“记得”你上一次输入了什么。大模型在每次被调用时,都只基于**当前这一次的输入**进行计算,然后产生输出。计算完成后,它内部不保存任何这次对话的“状态”。
|
||||
- **核心输入:** 大模型最核心的输入就是一个**文本序列**,也就是一个由词汇(Token)组成的字符串。它在这个序列的范围内进行模式识别和文本生成。
|
||||
|
||||
### 2. “记忆”从何而来?—— 上下文窗口
|
||||
|
||||
既然模型本身无记忆,我们感受到的连贯对话是怎么来的呢?答案是 **“上下文窗口”**。
|
||||
|
||||
- **什么是上下文窗口?** 这是模型**单次处理**所能接受的最大文本长度(例如 128K Tokens)。这个窗口不仅包含你**刚刚提出的新问题**,还包含了应用程序**特意塞进去的、之前所有的对话历史**。
|
||||
- **工作流程是这样的:**
|
||||
1. 你第一次说:“你好,我叫小明。”
|
||||
2. 应用程序(比如ChatGPT界面)会收到这条消息。它不会只把“你好,我叫小明。”发给模型,而是会组装一个完整的“提示”。这个提示可能看起来像这样(高度简化):
|
||||
`[系统指令:你是一个友好的助手...] 用户:你好,我叫小明。 助手:`
|
||||
3. 模型收到这个提示,生成回答:“你好小明!很高兴认识你。”
|
||||
4. **关键一步:** 当你接着问第二个问题:“你还记得我叫什么吗?”时,应用程序会把**迄今为止所有的对话**都组装成一个新的、更长的提示,发给模型:
|
||||
`[系统指令:你是一个友好的助手...] 用户:你好,我叫小明。 助手:你好小明!很高兴认识你。 用户:你还记得我叫什么吗? 助手:`
|
||||
5. 模型看到这个包含了全部历史的提示,它就能“看到”之前你提到了名字叫“小明”,从而生成正确的回答:“当然记得,你叫小明!”
|
||||
|
||||
所以,**模型的“记忆”本质上是“回顾”**。它并没有真正记住,而是每次都被给予了一份完整的“剧本”以供参考。这个剧本就是**上下文窗口**。
|
||||
|
||||
### 3. 应用程序的角色:有状态的“对话管理者”
|
||||
|
||||
真正“有状态”的,是和你交互的**应用程序或服务**。
|
||||
|
||||
- **它负责维护对话历史:** 这个应用(比如ChatGPT网页、API后端服务)有一个数据库或缓存,用来存储你整个会话的所有消息。
|
||||
- **它负责组装和修剪提示:** 每次你发送新消息,它都会从存储中取出历史记录,拼接到新消息前面,形成一个完整的提示,再发送给无状态的大模型。当对话很长,超过了模型的上下文窗口限制时,它还需要智能地修剪或总结早期的对话内容,以腾出空间。
|
||||
- **它可能管理长期记忆:** 一些更高级的应用(如GPTs、某些AI聊天机器人)可能会提供“长期记忆”或“核心记忆”功能。这通常是应用程序将你认为重要的信息提取出来,存储在独立的向量数据库里。在后续对话中,它会动态地从数据库中检索相关的“记忆”,并将其作为上下文的一部分塞给模型。
|
||||
|
||||
### 总结与类比
|
||||
|
||||
为了让你更好地理解,我们可以做一个类比:
|
||||
|
||||
- **大模型本身:** 像一个**世界顶级的、但患有短期失忆症的厨师**。他厨艺精湛,能根据你给他的所有食材(输入提示)做出一道完美的菜(输出回答)。但做完之后,他就把这次烹饪忘得一干二净。
|
||||
- **应用程序:** 像这个厨师的**助手和服务员**。他负责记录每一位顾客(用户)点过的所有菜(对话历史)。当顾客要点新菜时,服务员会把顾客过去的点单记录和新的要求一起交给厨师,这样厨师就能做出符合顾客口味和需求的菜。
|
||||
|
||||
**所以,回到你的问题:**
|
||||
|
||||
1. **你觉得这个记忆的功能是大模型提供的能力吗?**
|
||||
- 不完全是。**基础能力**(在给定上下文中理解关联信息)是模型提供的,但**实现记忆的机制**(存储、组装、传递上下文)是由应用程序提供的。两者缺一不可。
|
||||
|
||||
2. **大模型是有状态的吗?**
|
||||
- **大模型本身是无状态的。** 它是一个纯粹的函数。
|
||||
- **但以大模型为核心构建的AI应用或服务是“有状态”的。** 这个状态就是它维护的对话历史、用户偏好等数据。
|
||||
|
||||
这种“无状态模型 + 有状态应用”的设计,既保证了模型本身的纯粹和可扩展性(可以同时服务海量用户而状态不冲突),又通过应用程序赋予了它进行连贯、个性化对话的强大能力。
|
||||
83
mengyanote-backend/data/mengyanote/AI/大模型系统提示词教程.md
Normal file
83
mengyanote-backend/data/mengyanote/AI/大模型系统提示词教程.md
Normal file
@@ -0,0 +1,83 @@
|
||||
|
||||
### 1. **Cursor(Code)** —— 最推荐的规则系统(Rules)
|
||||
Cursor 把系统提示叫 **Rules**,支持项目级 + 全局 + 团队级。
|
||||
|
||||
**项目级(推荐)**:
|
||||
1. 在项目根目录创建文件夹 `.cursor/rules`(隐藏文件夹也没问题)。
|
||||
2. 里面新建 `.md` 或 `.mdc` 文件(推荐带 frontmatter)。
|
||||
示例文件 `my-rules.mdc`:
|
||||
```
|
||||
---
|
||||
description: 我的专属编码风格
|
||||
---
|
||||
你是我的高级全栈工程师。
|
||||
- 始终用 TypeScript + Tailwind
|
||||
- 优先写注释和测试
|
||||
- 所有新功能必须先规划再实现
|
||||
```
|
||||
3. 聊天里输入 `/create-rule` 让 AI 自动帮你生成更聪明。
|
||||
|
||||
**全局设置**:
|
||||
- Cursor 设置(Cmd/Ctrl + ,)→ Rules → + Add Rule(全局生效所有项目)。
|
||||
|
||||
**小技巧**:规则文件支持脚本、占位符,效果最强。
|
||||
|
||||
### 2. **Claude Code** —— 最主流的 CLAUDE.md
|
||||
Claude Code 官方推荐用 **CLAUDE.md** 作为持久系统记忆。
|
||||
|
||||
**项目级(最常用)**:
|
||||
1. 项目根目录新建 `CLAUDE.md` 文件。
|
||||
2. 直接写你的指令(AI 会自动读取并追加到 system prompt)。
|
||||
|
||||
**一键生成模板**(最省事):
|
||||
- 启动 Claude Code 后输入 `/init`
|
||||
- AI 会自动分析项目并创建 `CLAUDE.md`,你再修改即可。
|
||||
|
||||
**全局版**:
|
||||
- `~/.claude/CLAUDE.md`(所有项目生效)
|
||||
|
||||
**额外**:项目级还可以用 `.claude/settings.local.json` 微调工具权限,但系统提示主要靠 CLAUDE.md。
|
||||
|
||||
### 3. **Codex CLI** —— 用 AGENTS.md
|
||||
Codex 的对应文件是 **AGENTS.md**(类似 CLAUDE.md 的角色)。
|
||||
|
||||
**项目级**:
|
||||
1. 项目根目录新建 `AGENTS.md`。
|
||||
2. 写入你的系统指令。
|
||||
|
||||
**一键初始化**:
|
||||
- 输入 `/init` 让 Codex 自动生成 AGENTS.md(支持中文)。
|
||||
|
||||
**全局版**:
|
||||
- `~/.codex/AGENTS.md` 或 `~/.codex/prompts/` 目录下放自定义 .md(可做 slash commands)。
|
||||
|
||||
**配置文件补充**:
|
||||
- 编辑 `~/.codex/config.toml` 可加 `developer_instructions` 等。
|
||||
|
||||
### 4. **OpenCode**(开源版 Claude Code) —— SYSTEM.md + modes
|
||||
OpenCode 最灵活,支持 **SYSTEM.md** 直接替换/追加系统提示。
|
||||
|
||||
**项目级**:
|
||||
1. 项目根目录新建 `SYSTEM.md`(或 `.opencode/SYSTEM.md`)。
|
||||
2. 写入提示词即可(会覆盖或追加默认 system prompt)。
|
||||
|
||||
**更高级方式**(推荐):
|
||||
- 编辑 `opencode.json`(项目或全局 `~/.config/opencode/opencode.json`):
|
||||
```json
|
||||
{
|
||||
"modes": {
|
||||
"build": {
|
||||
"prompt": "path/to/my-system-prompt.md"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
- 或者在 `~/.config/opencode/commands/` 放自定义 .md(如 `prime-context.md`),通过 `/命令名` 调用。
|
||||
|
||||
**一键启动**:安装后直接 `opencode`,输入 `ultrawork:` 就能用自定义提示触发。
|
||||
|
||||
### 通用小贴士(所有工具都适用)
|
||||
- **让 AI 自己写提示词**:最快方法!直接输入「帮我创建一个完美的系统提示词,风格是...」让工具生成 CLAUDE.md / AGENTS.md / SYSTEM.md。
|
||||
- **跨工具复用**:Skills 标准已统一,把 `.claude/skills/` 里的文件复制到对应文件夹(.codex/skills、.opencode/skills)就能通用。
|
||||
- **压缩提示词**:太长会限速,用工具内置的 `/compact` 或手动总结。
|
||||
- **测试效果**:改完文件后重启会话(或输入 `/reload`),立刻问个复杂任务看是否听话。
|
||||
83
mengyanote-backend/data/mengyanote/AI/大模型驱动应用功能的实现.md
Normal file
83
mengyanote-backend/data/mengyanote/AI/大模型驱动应用功能的实现.md
Normal file
@@ -0,0 +1,83 @@
|
||||
|
||||
**大模型本身不能直接执行任何任务。它像一个超级大脑,但缺少手和脚。它通过生成“指令”或“代码”,然后由一个“执行环境”来真正驱动任务。**
|
||||
|
||||
让我们来分解这个过程:
|
||||
|
||||
### 核心原理:工具使用与函数调用
|
||||
|
||||
大模型驱动任务的核心能力被称为 **“工具使用”** 或 **“函数调用”** 。你可以把这个过程想象成一个聪明的分析师和一个高效的执行秘书之间的配合:
|
||||
|
||||
- **大模型(分析师):** 负责理解你的自然语言指令、分析意图、制定计划,并决定下一步该调用哪个“工具”(函数)。
|
||||
- **执行环境/应用程序(秘书):** 它拥有真正的“手和脚”。它准备好了各种工具(API、函数),并严格按照分析师的指令去执行。
|
||||
|
||||
### 具体工作流程(以“订机票”为例)
|
||||
|
||||
假设你对一个集成了大模型的AI助手说:“帮我订一张明天从北京到上海的最便宜的机票。”
|
||||
|
||||
这个过程并不是大模型直接去登录航空公司的系统,而是如下步骤:
|
||||
|
||||
1. **意图理解与规划:**
|
||||
- 大模型解析你的指令,识别出关键信息:
|
||||
- **意图:** 订机票
|
||||
- **出发地:** 北京
|
||||
- **目的地:** 上海
|
||||
- **时间:** 明天
|
||||
- **偏好:** 最便宜
|
||||
- 它在内部规划出一个步骤序列:`查询航班 -> 比较价格 -> 填写订单 -> 完成支付`。
|
||||
|
||||
2. **识别可用工具:**
|
||||
- 应用程序(AI助手)已经向大模型“注册”了它可以调用的各种工具函数,比如:
|
||||
- `search_flights(departure, destination, date)`
|
||||
- `compare_prices(flight_list)`
|
||||
- `book_flight(flight_id, passenger_info)`
|
||||
- `process_payment(booking_id, payment_details)`
|
||||
|
||||
3. **生成函数调用:**
|
||||
- 大模型意识到第一步需要查询航班。于是,它不会用自然语言回复你,而是会生成一个**结构化的函数调用请求**,格式通常是JSON:
|
||||
```json
|
||||
{
|
||||
"function": "search_flights",
|
||||
"arguments": {
|
||||
"departure": "北京",
|
||||
"destination": "上海",
|
||||
"date": "2024-06-02"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
4. **执行函数:**
|
||||
- 应用程序接收到这个请求后,**在自己的安全环境内**,调用真正的 `search_flights` 函数。这个函数可能连接着航司的API、携程的接口,或者一个内部的航班数据库。
|
||||
- **关键点:** 执行代码、访问网络、操作数据库等危险或实际的操作,都是由应用程序完成的,而不是大模型本身。
|
||||
|
||||
5. **获取结果并继续:**
|
||||
- `search_flights` 函数返回一个结构化的航班列表给应用程序。
|
||||
- 应用程序把这个结果(数据)再次作为上下文提供给大模型。
|
||||
- 大模型看到查询结果后,进行下一步分析,比如调用 `compare_prices` 来筛选出最便宜的选项。
|
||||
- 然后,它可能会生成下一个函数调用,比如 `book_flight`,并提示你提供乘机人信息。
|
||||
|
||||
6. **循环直至完成:**
|
||||
- 这个“模型分析 -> 生成调用 -> 环境执行 -> 返回结果”的循环会一直持续,直到任务完成(比如订单确认号生成)。
|
||||
|
||||
### “打开网页”是如何工作的?
|
||||
|
||||
这个例子更直观:
|
||||
|
||||
1. 你说:“打开百度首页。”
|
||||
2. 大模型识别出你的意图是“打开网页”,并且目标网址是“百度首页”。
|
||||
3. 它生成一个函数调用,比如 `open_browser(url="https://www.baidu.com")`。
|
||||
4. 应用程序(比如你的操作系统 shell 或一个自动化脚本)执行这个函数,启动你的默认浏览器并导航到该网址。
|
||||
5. 大模型回复你:“已为您打开百度首页。”
|
||||
|
||||
### 为什么大模型“能够”做这些事?它的能力来源是什么?
|
||||
|
||||
1. **代码理解与生成能力:** 大模型在训练时学习了海量的公开代码(如GitHub),因此它非常理解编程逻辑和API的调用方式。它知道 `search_flights` 这个函数需要哪些参数,以及返回的数据大概是什么样子。
|
||||
2. **逻辑推理与规划能力:** 它将复杂的用户请求(“订最便宜的机票”)分解成一系列可执行的、有序的步骤。
|
||||
3. **自然语言到结构化数据的转换能力:** 这是最关键的一步。它能将你模糊的、非结构化的口语指令(“帮我找个便宜的航班”),精确地转换成计算机可以理解的结构化参数(`{“max_price": 500, "sort_by": "price"}`)。
|
||||
|
||||
### 总结
|
||||
|
||||
- **大模型是“策略大脑”,不是“执行手脚”。** 它通过**工具使用(函数调用)** 来驱动任务。
|
||||
- **真正的执行者是外部的应用程序或系统**,它提供了安全的执行环境和真实的工具。
|
||||
- 大模型的价值在于充当了一个**极其强大的“自然语言到代码/指令”的翻译器和规划器**,让人类可以用最自然的方式与复杂的计算机系统交互。
|
||||
|
||||
所以,当你看到一个大模型能“订机票”或“打开网页”时,背后其实是一个精心设计的系统,在这个系统中,大模型扮演着指挥中心的角色,而具体的脏活累活则由它指挥的其他专业模块来完成。
|
||||
174
mengyanote-backend/data/mengyanote/AI/控制台agent工具安装教程.md
Normal file
174
mengyanote-backend/data/mengyanote/AI/控制台agent工具安装教程.md
Normal file
@@ -0,0 +1,174 @@
|
||||
|
||||
### opencode
|
||||
```bash
|
||||
# 安装(推荐一键脚本,Linux/macOS)
|
||||
curl -fsSL https://opencode.ai/install | bash
|
||||
|
||||
# 其他方式
|
||||
npm install -g opencode-ai
|
||||
brew install anomalyco/tap/opencode
|
||||
|
||||
# 官方更新(推荐)
|
||||
opencode upgrade # 内置更新到最新版
|
||||
# 指定方法(如果需要)
|
||||
opencode upgrade --method curl # 或 npm/brew 等
|
||||
```
|
||||
|
||||
|
||||
### Claude Code(Anthropic)
|
||||
```bash
|
||||
# 安装(推荐原生一键,自动后台更新)
|
||||
curl -fsSL https://claude.ai/install.sh | bash # Linux/macOS
|
||||
|
||||
# Windows 用 PowerShell
|
||||
# (从 claude.ai 官网复制对应命令,通常是 Invoke-RestMethod ...)
|
||||
|
||||
# 其他方式(不推荐长期使用)
|
||||
npm install -g @anthropic-ai/claude-code
|
||||
|
||||
# 官方更新(推荐)
|
||||
claude update # 内置自动更新
|
||||
# 或者
|
||||
npm install -g @anthropic-ai/claude-code@latest
|
||||
|
||||
# 迁移建议
|
||||
# npm 方式即将弃用,建议运行 claude install 迁移到原生版
|
||||
```
|
||||
|
||||
### Codex(OpenAI 旧版风格)
|
||||
```bash
|
||||
# 安装 / 更新(官方唯一推荐方式)
|
||||
npm i -g @openai/codex@latest
|
||||
```
|
||||
|
||||
### iflow
|
||||
```bash
|
||||
# 一键安装(推荐,会自动处理全部依赖)
|
||||
bash -c "$(curl -fsSL https://gitee.com/iflow-ai/iflow-cli/raw/main/install.sh)"
|
||||
|
||||
# 已安装 Node.js 22+
|
||||
npm i -g @iflow-ai/iflow-cli@latest
|
||||
|
||||
# 官方更新
|
||||
# 启动时自动检测并升级(推荐)
|
||||
# 手动强制更新
|
||||
npm i -g @iflow-ai/iflow-cli@latest
|
||||
```
|
||||
|
||||
### GitHub Copilot CLI
|
||||
```bash
|
||||
# 安装(推荐一键脚本,Linux/macOS)
|
||||
curl -fsSL https://gh.io/copilot-install | bash
|
||||
|
||||
# 其他方式
|
||||
npm install -g @github/copilot
|
||||
# 或通过 GitHub CLI
|
||||
gh extension install github/gh-copilot # 新方式(2026年后推荐)
|
||||
|
||||
# 官方更新(最推荐)
|
||||
copilot update # 内置更新命令
|
||||
# 手动方式
|
||||
npm install -g @github/copilot@latest
|
||||
# brew 方式:brew upgrade copilot-cli
|
||||
|
||||
# 查看版本 & 检查更新
|
||||
copilot version
|
||||
```
|
||||
|
||||
### Gemini CLI(Google)
|
||||
```bash
|
||||
# 安装(推荐)
|
||||
npm install -g @google/gemini-cli
|
||||
# 或 Homebrew
|
||||
brew install gemini-cli
|
||||
|
||||
# 临时运行(无需永久安装)
|
||||
npx @google/gemini-cli
|
||||
|
||||
# 更新
|
||||
npm install -g @google/gemini-cli@latest
|
||||
```
|
||||
|
||||
### Qwen Code CLI(阿里通义千问)
|
||||
```bash
|
||||
# 安装(推荐一键脚本,Linux/macOS)
|
||||
curl -fsSL https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.sh | bash
|
||||
|
||||
# Windows(管理员 PowerShell / CMD)
|
||||
curl -fsSL -o %TEMP%\install-qwen.bat https://qwen-code-assets.oss-cn-hangzhou.aliyuncs.com/installation/install-qwen.bat && %TEMP%\install-qwen.bat
|
||||
|
||||
# 其他方式(Node.js ≥20)
|
||||
npm install -g @qwen-code/qwen-code@latest
|
||||
# Homebrew
|
||||
brew install qwen-code
|
||||
|
||||
# 启动
|
||||
qwen
|
||||
|
||||
# 官方更新(推荐)
|
||||
npm install -g @qwen-code/qwen-code@latest
|
||||
# 或重新运行一键安装脚本(覆盖更新)
|
||||
# 内置命令:启动后可用 /upgrade 或检查 /version
|
||||
```
|
||||
|
||||
### Kimi Code CLI(Moonshot AI)
|
||||
```bash
|
||||
# 安装(推荐一键脚本,会自动装 uv + Python 3.13 + 依赖)
|
||||
# Linux/macOS
|
||||
curl -LsSf https://code.kimi.com/install.sh | bash
|
||||
|
||||
# Windows(PowerShell)
|
||||
Invoke-RestMethod https://code.kimi.com/install.ps1 | Invoke-Expression
|
||||
|
||||
# 已安装 uv 的方式
|
||||
uv tool install --python 3.13 kimi-cli
|
||||
|
||||
# 启动
|
||||
kimi
|
||||
|
||||
# 官方更新(推荐)
|
||||
uv tool upgrade kimi-cli --no-cache # 最干净方式
|
||||
# 或重新运行一键安装脚本
|
||||
```
|
||||
|
||||
### OpenClaw
|
||||
```bash
|
||||
# 安装(强烈推荐一键脚本,自动检测 Node、安装全局 CLI 并启动 onboarding wizard)
|
||||
# macOS / Linux / WSL2
|
||||
curl -fsSL https://openclaw.ai/install.sh | bash
|
||||
|
||||
# Windows(PowerShell)
|
||||
iwr -useb https://openclaw.ai/install.ps1 | iex
|
||||
|
||||
# 其他方式(Node.js ≥22 环境)
|
||||
npm install -g openclaw@latest
|
||||
# 或 pnpm
|
||||
pnpm add -g openclaw@latest
|
||||
# Homebrew(macOS / Linux)
|
||||
brew install openclaw-cli # 以前叫 clawdbot-cli
|
||||
|
||||
# 启动(首次运行 wizard 会引导配置模型 API key、daemon、集成等)
|
||||
openclaw
|
||||
# 或直接进入 TUI 聊天模式
|
||||
openclaw tui chat
|
||||
# 启动后台 gateway(daemon 模式,推荐 24/7 运行)
|
||||
openclaw gateway start
|
||||
|
||||
# 官方更新(推荐)
|
||||
openclaw update # 内置安全更新命令(处理 git/source、npm 全局、channel 切换等)
|
||||
# 常见选项
|
||||
openclaw update status # 查看当前状态
|
||||
openclaw update wizard # 重新运行 wizard
|
||||
openclaw update --channel beta # 切换到 beta/dev/stable 通道
|
||||
openclaw update --dry-run # 模拟更新
|
||||
openclaw update --no-restart # 更新后不自动重启 gateway
|
||||
# 或者手动 npm 方式(如果全局安装)
|
||||
npm install -g openclaw@latest
|
||||
# 重新运行一键脚本也会安全升级(推荐新手)
|
||||
curl -fsSL https://openclaw.ai/install.sh | bash
|
||||
|
||||
# 检查版本 / 诊断
|
||||
openclaw --version
|
||||
openclaw doctor # 运行诊断,修复常见问题
|
||||
```
|
||||
|
||||
@@ -0,0 +1,243 @@
|
||||
|
||||
---
|
||||
|
||||
## ⭐ 概览
|
||||
|
||||
目标:在 Debian 12 上搭建可以 **本地编译 Android 原生 APK** 的环境,包含:
|
||||
|
||||
- ✅ OpenJDK (推荐 17)
|
||||
|
||||
- ✅ Android SDK 命令行工具(cmdline-tools)
|
||||
|
||||
- ✅ Platform tools(adb)与 build-tools、platforms
|
||||
|
||||
- ✅ 可选:NDK / CMake(用于原生 C/C++)
|
||||
|
||||
- ✅ Gradle(用于构建)
|
||||
|
||||
|
||||
适用场景:CI、无 GUI 的服务器、或仅需命令行编译的开发环境。
|
||||
|
||||
---
|
||||
|
||||
## 🧾 前置条件
|
||||
|
||||
- 一台运行 **Debian 12** 的机器(有 sudo 权限)
|
||||
|
||||
- 稳定的网络(用于下载 SDK 与工具)
|
||||
|
||||
- 建议至少 10GB 可用磁盘空间(SDK + 系统镜像可能占用)
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 1️⃣ 安装基础工具
|
||||
|
||||
先更新并安装基础依赖:
|
||||
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt install -y git unzip wget curl zip build-essential
|
||||
```
|
||||
|
||||
这些工具用于下载、解压、构建等。
|
||||
|
||||
---
|
||||
|
||||
## 2️⃣ 安装 JDK(推荐:OpenJDK 17)
|
||||
|
||||
Android Gradle Plugin(AGP)对 JDK 有版本要求,JDK 17 是安全选择:
|
||||
|
||||
```bash
|
||||
sudo apt install -y openjdk-17-jdk
|
||||
```
|
||||
|
||||
检查版本:
|
||||
|
||||
```bash
|
||||
java -version
|
||||
# 期望输出类似:openjdk version "17.x"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3️⃣ 下载并安装 Android SDK 命令行工具
|
||||
|
||||
去 Google 官方下载 `commandlinetools` 压缩包,或者用 wget(示例):
|
||||
|
||||
```bash
|
||||
mkdir -p $HOME/Android/cmdline-tools
|
||||
cd $HOME/Android/cmdline-tools
|
||||
wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O cmdline-tools.zip
|
||||
unzip cmdline-tools.zip
|
||||
# 有时解压出来的目录名是 cmdline-tools,移动或重命名为 latest:
|
||||
mv cmdline-tools latest
|
||||
```
|
||||
|
||||
> 🔔 注意:实际下载链接和版本会随时间变化,请按需到 Android 官方网站获取最新版。
|
||||
|
||||
---
|
||||
|
||||
## 4️⃣ 配置环境变量(推荐写入 `~/.bashrc` 或 `~/.zshrc`)
|
||||
|
||||
将 SDK 路径加入环境变量,保证 `sdkmanager`、`adb` 等工具可用:
|
||||
|
||||
```bash
|
||||
# 在 ~/.bashrc 或 ~/.zshrc 添加:
|
||||
export ANDROID_HOME=$HOME/Android
|
||||
export ANDROID_SDK_ROOT=$ANDROID_HOME
|
||||
export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH
|
||||
|
||||
# 使之生效:
|
||||
source ~/.bashrc
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 5️⃣ 使用 sdkmanager 安装常用组件
|
||||
|
||||
通过 `sdkmanager` 安装 `platform-tools`、指定 Android 平台与 build-tools:
|
||||
|
||||
```bash
|
||||
sdkmanager --sdk_root=$ANDROID_HOME "platform-tools" "platforms;android-34" "build-tools;34.0.0"
|
||||
```
|
||||
|
||||
可选安装(若需要 NDK / CMake 编译原生代码):
|
||||
|
||||
```bash
|
||||
sdkmanager "ndk;26.1.10909125" "cmake;3.22.1"
|
||||
```
|
||||
|
||||
如果是自动接受许可,可以使用:
|
||||
|
||||
```bash
|
||||
yes | sdkmanager --licenses
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 6️⃣ 安装 Gradle(可选:系统级)
|
||||
|
||||
Android 项目通常随 Gradle Wrapper(`gradlew`)一起提供,能自动下载合适版本。但若想系统安装:
|
||||
|
||||
```bash
|
||||
wget https://services.gradle.org/distributions/gradle-8.7-bin.zip -P /tmp
|
||||
sudo unzip -d /opt/gradle /tmp/gradle-8.7-bin.zip
|
||||
# 添加到 PATH(写入 ~/.bashrc):
|
||||
export PATH=/opt/gradle/gradle-8.7/bin:$PATH
|
||||
```
|
||||
|
||||
检查:
|
||||
|
||||
```bash
|
||||
gradle -v
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 7️⃣ 创建或获取一个示例 Android 项目并编译
|
||||
|
||||
如果你已经有一个项目,进入项目目录并使用 Gradle Wrapper:
|
||||
|
||||
```bash
|
||||
# 如果项目有 gradlew:
|
||||
./gradlew assembleDebug
|
||||
|
||||
# 编译成功后 APK 通常位于:
|
||||
app/build/outputs/apk/debug/app-debug.apk
|
||||
```
|
||||
|
||||
如果想新建一个空项目,可先使用 Android Studio 在本地创建(GUI 更方便),或直接从 GitHub 上的模板克隆一个样例工程。
|
||||
|
||||
---
|
||||
|
||||
## 8️⃣ 将 APK 部署到设备或模拟器(可选)
|
||||
|
||||
- 真机(需开启 USB 调试):
|
||||
|
||||
|
||||
```bash
|
||||
adb install -r app/build/outputs/apk/debug/app-debug.apk
|
||||
```
|
||||
|
||||
- 模拟器:需要安装 emulator 与系统镜像(`system-images`),并创建 AVD。命令行使用 `avdmanager` / `emulator`。
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 9️⃣ 常见问题 & 排查建议 ❗
|
||||
|
||||
- `sdkmanager` 找不到:确认 PATH 是否包含 `$ANDROID_HOME/cmdline-tools/latest/bin`。
|
||||
|
||||
- `java` 版本不对:Gradle/AGP 可能需要特定 JDK 版本,查看项目 `gradle.properties` / `build.gradle` 推荐的版本。
|
||||
|
||||
- 下载慢或失败:考虑使用代理或镜像(国内网络环境常见)。
|
||||
|
||||
- 权限问题:若在 `/opt` 等系统目录解压安装,需 `sudo`。
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 🔁 推荐一键脚本(示例)
|
||||
|
||||
下面给出一个**示例脚本**的框架(**请先审阅再运行**,并根据需要改版本号):
|
||||
|
||||
```bash
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# 安装基础工具
|
||||
sudo apt update
|
||||
sudo apt install -y git unzip wget curl zip build-essential openjdk-17-jdk
|
||||
|
||||
# 目录
|
||||
SDK_ROOT=$HOME/Android
|
||||
mkdir -p $SDK_ROOT/cmdline-tools
|
||||
cd $SDK_ROOT/cmdline-tools
|
||||
|
||||
# 下载命令行工具(请确认链接是否过期)
|
||||
wget https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip -O cmdline-tools.zip
|
||||
unzip -o cmdline-tools.zip
|
||||
mv cmdline-tools latest || true
|
||||
|
||||
# 环境变量(仅本次会话)
|
||||
export ANDROID_HOME=$SDK_ROOT
|
||||
export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH
|
||||
|
||||
# 安装 SDK 组件
|
||||
yes | sdkmanager --sdk_root=$ANDROID_HOME "platform-tools" "platforms;android-34" "build-tools;34.0.0"
|
||||
|
||||
echo "安装完成,请将下列行加入你的 ~/.bashrc 或 ~/.zshrc:"
|
||||
echo "export ANDROID_HOME=\$HOME/Android"
|
||||
echo "export PATH=\$ANDROID_HOME/cmdline-tools/latest/bin:\$ANDROID_HOME/platform-tools:\$PATH"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔗 参考 & 延伸阅读
|
||||
|
||||
- Android 官方开发者网站(SDK / command line tools)
|
||||
|
||||
- Gradle 官方文档
|
||||
|
||||
- Android NDK 文档(若使用原生 C/C++)
|
||||
|
||||
|
||||
> 上面链接建议直接在浏览器打开 Android 官方站点获取最新版工具和镜像。
|
||||
|
||||
---
|
||||
|
||||
## ✅ 小结
|
||||
|
||||
在 Debian 12 上搭建 Android 原生构建环境的要点:
|
||||
|
||||
- 安装合适的 **JDK(推荐 17)**
|
||||
|
||||
- 下载并配置 **Android SDK command-line tools**,并通过 `sdkmanager` 安装 `platform-tools`、`platforms` 与 `build-tools`
|
||||
|
||||
- 使用项目自带的 **Gradle Wrapper (`gradlew`)** 进行构建,必要时可系统安装 Gradle
|
||||
|
||||
- 如需本地编译原生代码,记得安装 **NDK / CMake**
|
||||
|
||||
|
||||
---
|
||||
109
mengyanote-backend/data/mengyanote/Android/安卓Gradle构建常用命令总结.md
Normal file
109
mengyanote-backend/data/mengyanote/Android/安卓Gradle构建常用命令总结.md
Normal file
@@ -0,0 +1,109 @@
|
||||
|
||||
|
||||
##### **基础**
|
||||
|
||||
- `./gradlew tasks`
|
||||
列出可用的 Gradle 任务(查看当前项目能跑什么任务)。
|
||||
|
||||
- `./gradlew dependencies`
|
||||
列出项目依赖树(排查依赖冲突很有用)。
|
||||
|
||||
- `./gradlew clean`
|
||||
清理构建产物(删除 `build/` 目录)。
|
||||
|
||||
|
||||
##### **构建 APK / AAB**
|
||||
|
||||
- `./gradlew assembleDebug`
|
||||
构建 debug APK(输出:`app/build/outputs/apk/debug/*.apk`)。
|
||||
|
||||
- `./gradlew assembleRelease`
|
||||
构建 release APK(需签名配置,否则生成 unsigned apk)。
|
||||
|
||||
- `./gradlew bundleRelease`
|
||||
生成 AAB(Android App Bundle),输出:`app/build/outputs/bundle/release/*.aab`。
|
||||
|
||||
- `./gradlew bundleDebug`
|
||||
生成 debug bundle(少用,通常用于测试)。
|
||||
|
||||
|
||||
##### **按 module / productFlavor / buildType 构建**
|
||||
|
||||
- `./gradlew :moduleName:assembleRelease`
|
||||
构建指定 module(多模块项目时用)。
|
||||
|
||||
- `./gradlew assembleFlavorNameRelease`
|
||||
构建指定 flavor + buildType(例如 `assemblePaidRelease`)。
|
||||
|
||||
|
||||
##### **安装与卸载**
|
||||
|
||||
- `./gradlew installDebug`
|
||||
将 debug APK 安装到连接的设备/模拟器(需要 adb 可用)。
|
||||
|
||||
- `./gradlew uninstallDebug`
|
||||
从设备卸载 debug 包。
|
||||
|
||||
- 如果用生成的 APK 手动安装:`adb install -r app/build/outputs/apk/debug/app-debug.apk`
|
||||
|
||||
|
||||
##### **测试**
|
||||
|
||||
- 单元测试(JVM):`./gradlew test` 或 `./gradlew testDebugUnitTest`
|
||||
|
||||
- 仪器/设备测试(connected devices):`./gradlew connectedAndroidTest` 或 `./gradlew connectedCheck`
|
||||
|
||||
|
||||
##### **静态检查 / 报表**
|
||||
|
||||
- `./gradlew lint` 或 `./gradlew lintDebug`
|
||||
运行 Android Lint。
|
||||
|
||||
- `./gradlew signingReport`
|
||||
输出签名信息(SHA1/SHA256),常用于配置 API key(Google/Firebase)。
|
||||
|
||||
|
||||
##### **调试构建问题的常用参数**
|
||||
|
||||
- `--stacktrace` / `--full-stacktrace`:打印堆栈跟踪(排错用)
|
||||
|
||||
- `--info` / `--debug`:更详细的日志级别
|
||||
|
||||
- `--scan`:生成构建扫描(需要网络,便于深入分析)
|
||||
|
||||
- `--no-daemon`:不使用 Gradle daemon(CI 时有时会用)
|
||||
|
||||
- `--parallel`:并行构建模块(能加速多模块项目)
|
||||
|
||||
- `-x test`:跳过测试(例如 `./gradlew assembleRelease -x test`)
|
||||
|
||||
- `--offline`:离线构建(只用缓存依赖)
|
||||
|
||||
- `--refresh-dependencies`:刷新依赖缓存
|
||||
|
||||
|
||||
##### **性能 / CI 常用组合示例**
|
||||
|
||||
- 本地快速一把:`./gradlew clean assembleDebug --parallel --info`
|
||||
|
||||
- CI (不使用 daemon,输出详细):`./gradlew clean assembleRelease --no-daemon --stacktrace -x test`
|
||||
|
||||
- 只构建 moduleA 的 release:`./gradlew :moduleA:assembleRelease`
|
||||
|
||||
|
||||
##### **常见路径**
|
||||
|
||||
- APK:`app/build/outputs/apk/<buildType|flavor>/...`
|
||||
|
||||
- AAB:`app/build/outputs/bundle/<buildType>/...`
|
||||
|
||||
- 临时构建缓存:`~/.gradle/caches/`
|
||||
|
||||
|
||||
##### **小贴士**
|
||||
|
||||
- 始终用项目里的 Gradle Wrapper(`./gradlew`),保证 Gradle 版本一致。
|
||||
|
||||
- Release 构建需要正确的 `signingConfig`(通常放在 `gradle.properties` + `build.gradle`),也可以在 CI 用 `-P` 传参数(注意不要把敏感信息放在日志里)。
|
||||
|
||||
- 出问题先加 `--stacktrace --info` 看详情,再定位是依赖、ProGuard/R8、签名还是资源冲突。
|
||||
@@ -0,0 +1,26 @@
|
||||
|
||||
### Cloudflare Pages(静态网站/前端项目)
|
||||
- **最多可创建 100 个 Projects(项目/站点)**
|
||||
这是一个 **软限制(soft limit)**,目的是防止滥用。如果你真的需要更多,可以通过官方的 Limit Increase Request Form 联系支持申请提高(免费账户通常不会轻易批太多)。
|
||||
官方文档原文:"Cloudflare Pages has a soft limit of 100 projects within your account in order to prevent abuse."
|
||||
|
||||
- 其他免费计划主要限制(供参考):
|
||||
- 每个项目最多 20,000 个文件
|
||||
- 单个文件最大 25 MiB
|
||||
- 每月最多 500 次 Build(构建/部署)
|
||||
- 自定义域名:每个项目最多 100 个
|
||||
|
||||
### Cloudflare Workers(Serverless 函数/后端)
|
||||
- **最多可创建 100 个 Workers(Worker 脚本)**
|
||||
这是 **硬限制**,每个账户最多 100 个 Worker。
|
||||
官方文档明确列出:"Workers per account | 100"(Free Plan)。
|
||||
|
||||
- 其他免费计划主要限制(供参考):
|
||||
- 全账号每天 **10 万次请求**(所有 Worker 共享,UTC 零点重置,超限会 429 报错)
|
||||
- 每个请求 CPU 时间最多 10 ms
|
||||
- 每个 Worker 压缩后大小最多 3 MB
|
||||
- Cron Triggers(定时任务)最多 5 个
|
||||
|
||||
**总结**:
|
||||
免费账户 **Pages 最多 100 个**、**Workers 最多 100 个**。
|
||||
这两个限制都是官方文档里明确写的(Pages 是 soft limit,Workers 是硬 limit)。如果你的项目很多,建议直接升级到 Workers Paid(起价 $5/月)或 Pro/Business 计划,就能解除大部分限制。
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
|
||||
| 维度 | **Workers KV** (键值存储) | **D1** (轻量级 SQL 数据库) | **R2** (对象/Blob 存储) |
|
||||
|---------------|---------------------------|-----------------------------|-------------------------|
|
||||
| **数据模型** | 简单 Key-Value 对(字符串或二进制) | 关系型(SQLite 语法,表、行、列、JOIN) | 非结构化对象(文件、图片、视频等,S3 兼容) |
|
||||
| **适用场景** | 配置数据、会话、A/B 测试、路由元数据、高频读的简单缓存 | 用户资料、订单、产品列表、关系型业务数据、需要复杂查询的场景 | 图片/视频/大文件、ML 数据集、日志、用户上传文件、静态资源 |
|
||||
| **查询能力** | 只支持按 Key 获取、按前缀 List(无复杂查询) | **完整 SQL**(SELECT、JOIN、事务、聚合等) | 按 Key/metadata 访问,无原生内容查询(可配合 R2 SQL 做分析) |
|
||||
| **一致性** | **最终一致性**(eventually consistent) | **强一致性**(strongly consistent,支持事务) | **强一致性**(每个对象) |
|
||||
| **性能特点** | 极低延迟(热 Key <10ms,全球边缘缓存)<br>适合**读重**场景(千级 RPS) | 同数据中心零延迟绑定 + 读复制全球加速<br>适合读重轻量应用 | 适合大对象,延迟比 KV/D1 高,但吞吐强 |
|
||||
| **大小限制** | 单个 Value ≤25 MiB<br>免费 1GB,付费无限 | **单库**免费 500MB / 付费 10GB<br>账号总存储免费 5GB / 付费 1TB<br>最多 50,000 个库(付费) | **单个对象** ≤5 TiB<br>存储完全无限,桶最多 100 万个 |
|
||||
| **写限制** | 同 Key 每秒最多 1 次写 | 行写入有配额(免费 10万行/天) | 同 Key 每秒最多 1 次并发写 |
|
||||
| **定价(付费计划)** | 存储:$0.50/GB-月<br>读:$0.50/百万次<br>写/删/列:$5/百万次 | 存储:$0.75/GB-月(前 5GB 包含)<br>行读:$0.001/百万行<br>行写:$1/百万行<br>**无出口费** | 存储:$0.015/GB-月(超便宜!)<br>Class A 操作:$4.50/百万<br>Class B 操作:$0.36/百万<br>**完全免费出口费** |
|
||||
| **免费额度** | 读 10万/天,写 1000/天,1GB | 读 500万行/天,写 10万行/天,5GB | 10GB 存储 + 110万操作/月 + 无限出口 |
|
||||
| **出口(Egress)** | 不涉及下载场景 | **完全免费** | **完全免费**(最大卖点) |
|
||||
|
||||
### 快速选择指南
|
||||
- **选 KV**:需要全球超快读取的简单数据(如配置、计数器、session),不想写 SQL。
|
||||
- **选 D1**:有结构化关系数据,需要 JOIN、过滤、事务(类似小 Postgres/MySQL,但 serverless)。
|
||||
- **选 R2**:存大文件、图片、备份、用户上传内容(比 S3 便宜太多,还不收出口费)。
|
||||
- **三者混用最常见**:D1 存用户/订单数据 + R2 存用户上传的图片/文件 + KV 存 session/缓存。
|
||||
|
||||
### 总结一句话
|
||||
- **KV** = 全球最快的“查字典”
|
||||
- **D1** = 轻量级“关系型 Excel + SQL”
|
||||
- **R2** = 超级便宜又不收出口费的“无限云盘/S3”
|
||||
@@ -0,0 +1,49 @@
|
||||
|
||||
### 1. 速度 / 带宽
|
||||
- **无官方硬性限制**:没有固定 Mbps cap,你理论上可以跑满你服务器的上传带宽(几十到几百 Mbps 甚至更高都行)。
|
||||
- **实际表现**:
|
||||
- 免费计划流量**优先级较低**(deprioritized),高峰期或拥塞时速度会明显变慢。
|
||||
- 很多用户实测能接近本地直连速度,但也有不少人反馈下载只有 3-5 Mbps(尤其用来跑视频流时)。
|
||||
- 影响因素:你的 cloudflared 服务器带宽、地理位置、Cloudflare 路由优化(Argo Smart Routing 在免费版效果有限)。
|
||||
|
||||
**结论**:速度**不是硬限**,但免费版不适合需要稳定高带宽的场景。
|
||||
|
||||
### 2. 流量 / 数据量上限
|
||||
- **完全无上限**:没有每月 GB/TB 限制,也没有按流量计费。
|
||||
- Cloudflare 免费版对正常网页、API、私有访问等**无限流量**。
|
||||
|
||||
### 3. 数量和技术限制(官方硬限)
|
||||
来自官方《Account limits》页面:
|
||||
| 项目 | 免费/普通账号限制 | 备注 |
|
||||
|-----------------------------|-------------------|------|
|
||||
| 隧道(tunnels)数量 | 1,000 个 | 可在 Enterprise 提升 |
|
||||
| 每个隧道活跃 cloudflared 副本 | 25 个 | 可提升 |
|
||||
| 路由(域名 + CIDR) | 1,000 个 | 可提升 |
|
||||
| WARP Connector | 10 个 | - |
|
||||
| 虚拟网络(Virtual Networks)| 1,000 个 | - |
|
||||
|
||||
- **Quick Tunnel(trycloudflare.com 临时隧道)**:额外有限制,最多 **200 个并发请求**,超了返回 429。
|
||||
- **单机吞吐限制**:取决于你服务器的端口数(推荐分配 50,000 个端口,可支持约 8000 用户),不是 Cloudflare 侧限制。
|
||||
|
||||
### 4. 最重要的是 TOS / 公平使用政策(容易被封的关键)
|
||||
Cloudflare **Application Services 服务特定条款**明确写着:
|
||||
|
||||
> 除非你是 Enterprise 用户,否则**禁止**使用免费 CDN/Tunnel 服务视频、大量图片/音频或其他大文件(disproportionate percentage of non-HTML content)。Cloudflare 有权**禁用、限速或限制访问**,并会尽量提前通知。
|
||||
|
||||
- **什么情况容易被限**:
|
||||
- 把 Tunnel 当 NAS 媒体服务器用,持续传视频(720p/1080p 流媒体最常见被投诉)。
|
||||
- 大文件下载站点、种子服务器、备份同步等高带宽非网页用途。
|
||||
- **什么情况相对安全**:
|
||||
- 普通网站、API、内网穿透(SSH、RDP、游戏服务器等)。
|
||||
- **偶尔**传几个大文件(几 GB),且开启 Cache Bypass(绕过缓存)通常没事。
|
||||
- 建议:如果要做视频/大文件,推荐用 Cloudflare Stream(付费)或直接走原生端口。
|
||||
|
||||
### 5. 其他注意事项
|
||||
- **单个文件大小**:一般没硬限,但大文件(>100MB)持续传输容易触发监控。
|
||||
- **国内使用**:延迟普遍较高(走 Cloudflare 全球网络),速度波动大,不如自建 WireGuard/FRP 稳定。
|
||||
- **Zero Trust 免费版额外限制**:用户数/策略数有限制,但和纯 Tunnel 带宽无关。
|
||||
|
||||
### 总结建议
|
||||
- **适合**:个人网站、内网穿透、轻度使用 → 完全免费、无流量担心。
|
||||
- **不适合**:视频网站、文件分享站、高流量生产环境 → 建议升级 Pro/Business 或用其他方案。
|
||||
- 如果你主要是自用内网穿透(SSH、Web 管理面板等),基本可以放心用,无需担心流量/速度上限。
|
||||
@@ -0,0 +1,135 @@
|
||||
|
||||
## 一、适用场景
|
||||
|
||||
- 静态网站(HTML / CSS / JS)
|
||||
- 已构建完成的前端产物(如 Next.js `export` 后的目录)
|
||||
- 文件数量 **超过 1000**(网页直接上传会失败)
|
||||
- 目录中包含 `index.html`
|
||||
---
|
||||
|
||||
## 二、为什么要用 Wrangler CLI?
|
||||
|
||||
|方式|文件上限|是否推荐|
|
||||
|---|---|---|
|
||||
|网页直接上传|1000|❌ 不适合大型项目|
|
||||
|Wrangler CLI|**20,000**|✅ 官方推荐|
|
||||
|Git 自动部署|不限|✅ 生产推荐|
|
||||
|
||||
---
|
||||
|
||||
## 三、环境准备
|
||||
|
||||
### 1️⃣ 安装 Node.js
|
||||
|
||||
确保 Node.js ≥ 16
|
||||
```bash
|
||||
node -v
|
||||
npm -v
|
||||
```
|
||||
---
|
||||
|
||||
### 2️⃣ 安装 Wrangler CLI
|
||||
|
||||
```bash
|
||||
npm install -g wrangler
|
||||
```
|
||||
|
||||
验证安装:
|
||||
```bash
|
||||
wrangler -v
|
||||
```
|
||||
---
|
||||
|
||||
### 3️⃣ 登录 Cloudflare
|
||||
|
||||
```bash
|
||||
wrangler login
|
||||
```
|
||||
浏览器会自动打开,登录你的 Cloudflare 账号即可。
|
||||
|
||||
---
|
||||
|
||||
## 四、项目目录要求(非常重要)
|
||||
|
||||
你的**部署目录**必须满足:
|
||||
- ✅ 包含 `index.html`
|
||||
- ✅ 是**最终静态文件目录**
|
||||
- ❌ 不是源码目录(不是 src / pages / app)
|
||||
|
||||
示例结构:
|
||||
|
||||
```
|
||||
project-root/
|
||||
├─ index.html
|
||||
├─ 404.html
|
||||
├─ _next/
|
||||
├─ images/
|
||||
├─ fonts/
|
||||
├─ sw.js
|
||||
└─ …
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 五、部署到 Cloudflare Pages
|
||||
|
||||
### ✅ 最简单、推荐的方式(一次性可用)
|
||||
|
||||
进入静态站点根目录,执行:
|
||||
```bash
|
||||
wrangler pages deploy dist
|
||||
wrangler pages deploy dist
|
||||
```
|
||||
|
||||
> `.` 表示部署“当前目录”,**不能省略**
|
||||
|
||||
---
|
||||
|
||||
### 📌 首次部署时会发生什么?
|
||||
|
||||
Wrangler 会提示你:
|
||||
- 创建 Pages 项目
|
||||
- 输入项目名(如 `pdfcraft`)
|
||||
- 选择是否绑定已有项目
|
||||
|
||||
👉 **一路回车即可**
|
||||
|
||||
---
|
||||
|
||||
## 六、指定项目名(可选)
|
||||
如果你不想每次输入项目名:
|
||||
|
||||
```bash
|
||||
wrangler pages deploy . --project-name pdfcraft
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 七、长期推荐配置(wrangler.toml)
|
||||
在项目根目录创建 `wrangler.toml`:
|
||||
|
||||
```toml
|
||||
name = "pdfcraft"
|
||||
pages_build_output_dir = "."
|
||||
```
|
||||
|
||||
之后直接运行即可:
|
||||
|
||||
```bash
|
||||
wrangler pages deploy
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 八、部署成功后的结果
|
||||
部署完成后你会得到类似输出:
|
||||
|
||||
```
|
||||
✨ Deployment complete!
|
||||
🌍 https://pdfcraft.pages.dev
|
||||
```
|
||||
|
||||
- `*.pages.dev` 是默认访问域名
|
||||
- 可在 Cloudflare 控制台绑定自定义域名
|
||||
|
||||
---
|
||||
@@ -0,0 +1,185 @@
|
||||
|
||||
---
|
||||
|
||||
## 一、准备工作
|
||||
|
||||
在开始之前,请确保你已经具备以下条件:
|
||||
|
||||
### 1️⃣ Cloudflare 账号
|
||||
- 注册地址:https://dash.cloudflare.com/
|
||||
- 登录后能进入 **Dashboard**
|
||||
|
||||
### 2️⃣ Node.js 环境
|
||||
- **推荐版本:Node.js ≥ 18**
|
||||
- 检查是否已安装:
|
||||
|
||||
```bash
|
||||
node -v
|
||||
npm -v
|
||||
```
|
||||
|
||||
未安装可前往:https://nodejs.org/
|
||||
|
||||
---
|
||||
|
||||
## 二、安装 Wrangler CLI
|
||||
|
||||
Wrangler 是 Cloudflare 官方提供的 Worker 开发与部署工具。
|
||||
|
||||
### 全局安装(推荐)
|
||||
|
||||
```bash
|
||||
npm install -g wrangler
|
||||
```
|
||||
|
||||
安装完成后检查版本:
|
||||
|
||||
```bash
|
||||
wrangler --version
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 三、登录 Cloudflare
|
||||
|
||||
使用 Wrangler 登录你的 Cloudflare 账号:
|
||||
|
||||
```bash
|
||||
wrangler login
|
||||
```
|
||||
|
||||
- 浏览器会自动打开授权页面
|
||||
- 授权成功后,CLI 会显示登录完成
|
||||
|
||||
> 💡 登录信息会保存在本地,无需每次重复登录
|
||||
|
||||
---
|
||||
|
||||
## 四、创建 Worker 项目
|
||||
|
||||
### 方式一:使用官方模板(推荐)
|
||||
|
||||
```bash
|
||||
wrangler init my-worker
|
||||
```
|
||||
|
||||
执行后会:
|
||||
- 创建项目目录
|
||||
- 生成 `wrangler.toml`
|
||||
- 初始化示例 Worker
|
||||
|
||||
进入项目目录:
|
||||
|
||||
```bash
|
||||
cd my-worker
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 五、项目结构说明
|
||||
|
||||
典型 Worker 项目结构如下:
|
||||
|
||||
```text
|
||||
my-worker/
|
||||
├─ src/
|
||||
│ └─ index.ts # Worker 入口文件
|
||||
├─ wrangler.toml # Wrangler 配置文件
|
||||
├─ package.json
|
||||
└─ tsconfig.json
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 六、编写第一个 Worker
|
||||
|
||||
编辑 `src/index.ts`:
|
||||
|
||||
```ts
|
||||
export default {
|
||||
async fetch(request: Request): Promise<Response> {
|
||||
return new Response("Hello Cloudflare Workers! 🚀", {
|
||||
headers: { "content-type": "text/plain" },
|
||||
})
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 七、本地开发与调试
|
||||
|
||||
Wrangler 提供本地开发服务器:
|
||||
|
||||
```bash
|
||||
wrangler dev
|
||||
```
|
||||
|
||||
- 默认监听 http://localhost:8787
|
||||
- 修改代码后自动热更新
|
||||
|
||||
---
|
||||
|
||||
## 八、部署到 Cloudflare
|
||||
|
||||
一行命令即可部署:
|
||||
|
||||
```bash
|
||||
wrangler deploy
|
||||
```
|
||||
|
||||
部署成功后你会看到类似输出:
|
||||
|
||||
```text
|
||||
Uploaded my-worker
|
||||
Deployed my-worker
|
||||
https://my-worker.your-name.workers.dev
|
||||
```
|
||||
|
||||
🎉 打开该 URL 即可访问你的 Worker!
|
||||
|
||||
---
|
||||
|
||||
## 九、wrangler.toml 核心配置说明
|
||||
|
||||
示例:
|
||||
|
||||
```toml
|
||||
name = "my-worker"
|
||||
main = "src/index.ts"
|
||||
compatibility_date = "2024-01-01"
|
||||
```
|
||||
|
||||
常用字段说明:
|
||||
|
||||
| 字段 | 说明 |
|
||||
|----|----|
|
||||
| name | Worker 名称 |
|
||||
| main | 入口文件 |
|
||||
| compatibility_date | Worker 运行兼容日期 |
|
||||
| workers_dev | 是否启用 *.workers.dev |
|
||||
|
||||
---
|
||||
|
||||
## 十、常见问题
|
||||
|
||||
### ❓ deploy 失败 / 没权限
|
||||
- 确认已执行 `wrangler login`
|
||||
- 确认当前账号下有 Worker 权限
|
||||
|
||||
### ❓ 端口被占用
|
||||
|
||||
```bash
|
||||
wrangler dev --port 3000
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 十一、进阶方向
|
||||
|
||||
- 绑定 KV / D1 / R2
|
||||
- 使用环境变量(`[vars]`)
|
||||
- 多环境部署(dev / prod)
|
||||
- 使用 Durable Objects
|
||||
|
||||
|
||||
67
mengyanote-backend/data/mengyanote/Docker/Docker 镜像相关.md
Normal file
67
mengyanote-backend/data/mengyanote/Docker/Docker 镜像相关.md
Normal file
@@ -0,0 +1,67 @@
|
||||
|
||||
**QQ机器人框架NapCat**
|
||||
```shell
|
||||
#安装
|
||||
docker run -d \
|
||||
-e NAPCAT_GID=$(id -g) \
|
||||
-e NAPCAT_UID=$(id -u) \
|
||||
-p 4080:3000 \
|
||||
-p 4070:3001 \
|
||||
-p 4060:6099 \
|
||||
--name napcat \
|
||||
--restart=always \
|
||||
mlikiowa/napcat-docker:latest
|
||||
|
||||
#固化以下路径,方便掉线时快速重新登录
|
||||
#QQ 持久化数据路径:/app/.config/QQ
|
||||
#NapCat 配置文件路径: /app/napcat/config
|
||||
|
||||
#登录 WebUI 后台地址:http://<宿主机ip>:6099/webui
|
||||
```
|
||||
|
||||
**网页SSH客户端-EasyNode**
|
||||
```shell
|
||||
#项目地址:https://github.com/chaos-zhu/easynode
|
||||
|
||||
# 1. 创建easynode目录
|
||||
mkdir -p /root/easynode && cd /root/easynode
|
||||
|
||||
# 2. 下载docker-compose.yml文件
|
||||
wget https://git.221022.xyz/https://raw.githubusercontent.com/chaos-zhu/easynode/main/docker-compose.yml
|
||||
|
||||
# 3. 启动服务
|
||||
docker-compose up -d
|
||||
|
||||
docker run -d -p 8082:8082 --restart=always -v /root/easynode/db:/easynode/app/db chaoszhu/easynode
|
||||
|
||||
### 监控服务
|
||||
#安装
|
||||
# 使用默认端口22022安装
|
||||
curl -o- https://git.221022.xyz/https://raw.githubusercontent.com/chaos-zhu/easynode/main/client/easynode-client-install.sh | bash
|
||||
|
||||
# 使用自定义端口安装, 例如54321
|
||||
curl -o- https://git.221022.xyz/https://raw.githubusercontent.com/chaos-zhu/easynode/main/client/easynode-client-install.sh | bash -s -- 54321
|
||||
|
||||
#卸载
|
||||
curl -o- https://git.221022.xyz/https://raw.githubusercontent.com/chaos-zhu/easynode/main/client/easynode-client-uninstall.sh | bash
|
||||
|
||||
#查看监控服务状态:systemctl status easynode-client
|
||||
#查看监控服务日志: journalctl --follow -u easynode-client
|
||||
#查看详细日志:journalctl -xe
|
||||
```
|
||||
|
||||
**docker加速地址**
|
||||
|
||||
![[Screenshot_20250717_225309.jpg]]
|
||||
|
||||
|
||||
docker.1ms.run/
|
||||
|
||||
docker run -d -p 4050:80 --restart=always -v /shumengya/tu:/var/www/html docker.1ms.run/oaooa/pichome
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
182
mengyanote-backend/data/mengyanote/Docker/Docker常用命令总结.md
Normal file
182
mengyanote-backend/data/mengyanote/Docker/Docker常用命令总结.md
Normal file
@@ -0,0 +1,182 @@
|
||||
# Docker 常用命令总结
|
||||
|
||||
## 🐳 容器生命周期管理
|
||||
|
||||
### 容器操作
|
||||
```bash
|
||||
# 运行容器
|
||||
docker run [选项] 镜像名 [命令]
|
||||
docker run -d --name myapp -p 8080:80 nginx # 后台运行并命名
|
||||
docker run -it ubuntu bash # 交互式运行
|
||||
|
||||
# 启动/停止/重启容器
|
||||
docker start 容器名/ID
|
||||
docker stop 容器名/ID
|
||||
docker restart 容器名/ID
|
||||
|
||||
# 暂停/恢复容器
|
||||
docker pause 容器名/ID
|
||||
docker unpause 容器名/ID
|
||||
|
||||
# 删除容器
|
||||
docker rm 容器名/ID
|
||||
docker rm -f 容器名/ID # 强制删除运行中的容器
|
||||
docker container prune # 删除所有停止的容器
|
||||
|
||||
# 查看容器
|
||||
docker ps # 查看运行中的容器
|
||||
docker ps -a # 查看所有容器
|
||||
docker ps -aq # 查看所有容器ID
|
||||
```
|
||||
|
||||
### 容器信息
|
||||
```bash
|
||||
# 查看日志
|
||||
docker logs 容器名/ID
|
||||
docker logs -f 容器名/ID # 实时跟踪日志
|
||||
docker logs --tail 100 容器名/ID # 查看最后100行
|
||||
|
||||
# 查看容器信息
|
||||
docker inspect 容器名/ID
|
||||
docker stats # 查看资源使用情况
|
||||
docker top 容器名/ID # 查看容器进程
|
||||
```
|
||||
|
||||
## 📦 镜像管理
|
||||
|
||||
```bash
|
||||
# 搜索镜像
|
||||
docker search 镜像名
|
||||
|
||||
# 拉取镜像
|
||||
docker pull 镜像名:标签
|
||||
docker pull nginx:latest
|
||||
|
||||
# 查看镜像
|
||||
docker images
|
||||
docker image ls
|
||||
|
||||
# 删除镜像
|
||||
docker rmi 镜像名/ID
|
||||
docker rmi -f 镜像名/ID # 强制删除
|
||||
docker image prune # 删除悬空镜像
|
||||
docker image prune -a # 删除所有未使用镜像
|
||||
|
||||
# 构建镜像
|
||||
docker build -t 镜像名:标签 .
|
||||
docker build -f Dockerfile.dev -t myapp:dev .
|
||||
|
||||
# 保存/加载镜像
|
||||
docker save -o 文件名.tar 镜像名
|
||||
docker load -i 文件名.tar
|
||||
|
||||
# 导出/导入容器
|
||||
docker export 容器名 > 容器名.tar
|
||||
docker import 容器名.tar 镜像名:标签
|
||||
```
|
||||
|
||||
## 🔄 容器与主机交互
|
||||
|
||||
```bash
|
||||
# 进入容器
|
||||
docker exec -it 容器名/ID bash
|
||||
docker exec -it 容器名/ID sh
|
||||
|
||||
# 复制文件
|
||||
docker cp 主机文件路径 容器名:容器内路径
|
||||
docker cp 容器名:容器内路径 主机文件路径
|
||||
|
||||
# 端口映射查看
|
||||
docker port 容器名/ID
|
||||
```
|
||||
|
||||
## 🌐 网络管理
|
||||
|
||||
```bash
|
||||
# 网络操作
|
||||
docker network ls
|
||||
docker network create 网络名
|
||||
docker network inspect 网络名
|
||||
docker network connect 网络名 容器名
|
||||
docker network disconnect 网络名 容器名
|
||||
docker network prune # 删除未使用的网络
|
||||
|
||||
# 运行容器指定网络
|
||||
docker run --network=网络名 镜像名
|
||||
docker run --network=host 镜像名 # 使用主机网络
|
||||
```
|
||||
|
||||
## 💾 数据卷管理
|
||||
|
||||
```bash
|
||||
# 数据卷操作
|
||||
docker volume ls
|
||||
docker volume create 卷名
|
||||
docker volume inspect 卷名
|
||||
docker volume rm 卷名
|
||||
docker volume prune # 删除未使用的卷
|
||||
|
||||
# 使用数据卷
|
||||
docker run -v 卷名:容器内路径 镜像名
|
||||
docker run -v 主机路径:容器内路径 镜像名
|
||||
docker run --mount type=bind,source=主机路径,target=容器内路径 镜像名
|
||||
```
|
||||
|
||||
## 🏷️ 标签与清理
|
||||
|
||||
```bash
|
||||
# 标签操作
|
||||
docker tag 源镜像名:标签 新镜像名:标签
|
||||
|
||||
# 系统清理
|
||||
docker system df # 查看磁盘使用
|
||||
docker system prune # 清理所有未使用资源
|
||||
docker system prune -a # 更彻底清理(包括未使用的镜像)
|
||||
```
|
||||
|
||||
## 🛠️ 实用组合命令
|
||||
|
||||
```bash
|
||||
# 批量停止所有容器
|
||||
docker stop $(docker ps -aq)
|
||||
|
||||
# 批量删除所有容器
|
||||
docker rm $(docker ps -aq)
|
||||
|
||||
# 批量删除所有镜像
|
||||
docker rmi $(docker images -q)
|
||||
|
||||
# 清理所有未使用资源
|
||||
docker system prune -a -f
|
||||
|
||||
# 查看容器IP地址
|
||||
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 容器名
|
||||
|
||||
# 一键进入最新创建的容器
|
||||
docker exec -it $(docker ps -lq) bash
|
||||
```
|
||||
|
||||
## ⚙️ 常用选项说明
|
||||
|
||||
| 选项 | 说明 |
|
||||
|------|------|
|
||||
| `-d` | 后台运行(守护进程模式) |
|
||||
| `-it` | 交互式终端 |
|
||||
| `-p` | 端口映射 `主机端口:容器端口` |
|
||||
| `-v` | 卷挂载 `主机路径:容器路径` |
|
||||
| `-e` | 设置环境变量 |
|
||||
| `--name` | 为容器指定名称 |
|
||||
| `--rm` | 容器退出时自动删除 |
|
||||
| `--network` | 指定网络 |
|
||||
| `--restart` | 重启策略(always, on-failure等) |
|
||||
|
||||
## 📝 使用建议
|
||||
|
||||
1. **命名容器**:总是使用 `--name` 为容器命名,便于管理
|
||||
2. **使用数据卷**:重要数据应保存在数据卷中,而不是容器内
|
||||
3. **标签管理**:为镜像打上有意义的标签
|
||||
4. **清理策略**:定期使用 `prune` 命令清理未使用资源
|
||||
5. **日志查看**:使用 `docker logs` 调试容器问题
|
||||
6. **组合命令**:将常用命令写入脚本或使用 docker-compose
|
||||
|
||||
记住这些命令可以帮助你高效地使用 Docker 进行容器化管理!
|
||||
49
mengyanote-backend/data/mengyanote/Docker/Docker镜像快速迁移.md
Normal file
49
mengyanote-backend/data/mengyanote/Docker/Docker镜像快速迁移.md
Normal file
@@ -0,0 +1,49 @@
|
||||
|
||||
---
|
||||
|
||||
## ✅ 方法一:直接导出容器(container → tar)
|
||||
|
||||
如果你运行的是一个 **容器**(而不是镜像),可以直接打包它:
|
||||
|
||||
```bash
|
||||
# 导出容器
|
||||
docker export <容器ID或名字> -o container.tar
|
||||
|
||||
# 在另一台Linux机器上导入
|
||||
docker import container.tar new-image:latest
|
||||
```
|
||||
|
||||
特点:
|
||||
|
||||
- 容器的运行时文件系统会被打包(包含你安装的软件和修改),**但不会包含容器的历史层和环境变量**。
|
||||
|
||||
- 类似于“快照”迁移。
|
||||
|
||||
|
||||
---
|
||||
|
||||
## ✅ 方法二:保存镜像(image → tar)
|
||||
|
||||
如果你已经把容器做成了一个镜像,建议用 **save/load**:
|
||||
|
||||
```bash
|
||||
# 在源主机上保存镜像
|
||||
docker save -o myimage.tar myimage:latest
|
||||
docker save -o frpc-1panel.tar snowdreamtech/frpc:0.63.0
|
||||
|
||||
# 拷贝到目标主机(比如用 scp)
|
||||
scp myimage.tar user@remote:/path/
|
||||
|
||||
# 在目标主机导入
|
||||
docker load -i myimage.tar
|
||||
```
|
||||
|
||||
特点:
|
||||
|
||||
- 保留镜像层和构建历史。
|
||||
|
||||
- 推荐这种方式。
|
||||
|
||||
|
||||
---
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
```yaml
|
||||
|
||||
#60s api后端
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
60s:
|
||||
image: vikiboss/60s:latest
|
||||
container_name: 60sAPI
|
||||
ports:
|
||||
- "4343:4399"
|
||||
restart: always
|
||||
|
||||
|
||||
```
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name filecodebox \
|
||||
--restart=always \
|
||||
-p 12345:12345 \
|
||||
-v /shumengya/docker/storage/filecodebox:/app/data \
|
||||
lanol/filecodebox:beta
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
#典型的非关系型数据库(json)
|
||||
docker pull lanol/filecodebox:beta
|
||||
```
|
||||
|
||||
```
|
||||
docker stop lanol/filecodebox:beta
|
||||
docker rm lanol/filecodebox:beta
|
||||
```
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
```bash
|
||||
#github/gitlab的本地轻量化部署代替-gitea
|
||||
docker run -d \
|
||||
--name gitea \
|
||||
-p 8989:3000 \
|
||||
-p 8022:22 \
|
||||
-e USER_UID=1000 \
|
||||
-e USER_GID=1000 \
|
||||
-v /shumengya/docker/gitea:/data \
|
||||
--restart=always \
|
||||
gitea/gitea:latest
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
docker pull gitea/gitea:latest
|
||||
```
|
||||
|
||||
```
|
||||
docker stop gitea/gitea:latest
|
||||
docker rm gitea/gitea:latest
|
||||
```
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
```bash
|
||||
#MongoDB数据库
|
||||
docker run -d --name mongodb \
|
||||
-e MONGO_INITDB_ROOT_USERNAME=shumengya \
|
||||
-e MONGO_INITDB_ROOT_PASSWORD=shumengya520 \
|
||||
-v /shumengya/docker/storage/mongodb:/data/db \
|
||||
-p 27017:27017 \
|
||||
mongo
|
||||
```
|
||||
|
||||
```bash
|
||||
#典型的非关系型数据库(json)
|
||||
docker pull mongo
|
||||
```
|
||||
@@ -0,0 +1,24 @@
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name mysql_latest \
|
||||
-p 3306:3306 \
|
||||
-v /shumengya/docker/storage/mysql:/var/lib/mysql \
|
||||
-e MYSQL_ROOT_PASSWORD=shumengya520 \
|
||||
--memory=4g \
|
||||
--cpus=4 \
|
||||
mysql:latest
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
#典型的非关系型数据库(json)
|
||||
docker pull mysql:latest
|
||||
```
|
||||
|
||||
```
|
||||
docker stop mysql
|
||||
docker rm mysql
|
||||
```
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name filecodebox \
|
||||
--restart=always \
|
||||
-p 12345:12345 \
|
||||
-v /shumengya/docker/storage/filecodebox:/app/data \
|
||||
lanol/filecodebox:beta
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
#典型的非关系型数据库(json)
|
||||
docker pull lanol/filecodebox:beta
|
||||
```
|
||||
|
||||
```
|
||||
docker stop lanol/filecodebox:beta
|
||||
docker rm lanol/filecodebox:beta
|
||||
```
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
--name ntfy \
|
||||
--restart=always \
|
||||
-e TZ="Asia/Shanghai" \
|
||||
-e NTFY_BASE_URL="https://ntfy.shumengya.top" \
|
||||
-e NTFY_CACHE_FILE="/var/cache/ntfy/cache.db" \
|
||||
-e NTFY_AUTH_FILE="/var/lib/ntfy/auth.db" \
|
||||
-e NTFY_AUTH_DEFAULT_ACCESS="deny-all" \
|
||||
-e NTFY_BEHIND_PROXY="true" \
|
||||
-e NTFY_ATTACHMENT_CACHE_DIR="/var/lib/ntfy/attachments" \
|
||||
-e NTFY_ENABLE_LOGIN="true" \
|
||||
-v /shumengya/docker/storage/ntfy/cache:/var/cache/ntfy \
|
||||
-v /shumengya/docker/storage/ntfy/etc:/etc/ntfy \
|
||||
-v /shumengya/docker/storage/ntfy/lib:/var/lib/ntfy \
|
||||
-p 82:80 \
|
||||
binwiederhier/ntfy:latest \
|
||||
serve
|
||||
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
#典型的非关系型数据库(json)
|
||||
docker pull binwiederhier/ntfy:latest
|
||||
```
|
||||
|
||||
```
|
||||
docker stop binwiederhier/ntfy:latest
|
||||
docker rm binwiederhier/ntfy:latest
|
||||
```
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
```bash
|
||||
#postgres数据库
|
||||
docker run -d \
|
||||
--name postgres \
|
||||
-e POSTGRES_PASSWORD=shumengya520 \
|
||||
-e POSTGRES_USER=shumengya \
|
||||
-e POSTGRES_DB=shumengyadb \
|
||||
-v /shumengya/docker/storage/postgres:/data \
|
||||
-e PGDATA=/data/pgdata \
|
||||
-p 5432:5432 \
|
||||
--restart=always \
|
||||
postgres:latest
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
#典型的非关系型数据库(json)
|
||||
docker pull postgres:latest
|
||||
```
|
||||
|
||||
```
|
||||
docker stop postgres:latest
|
||||
docker rm postgres:latest
|
||||
```
|
||||
@@ -0,0 +1,20 @@
|
||||
|
||||
```bash
|
||||
#Redis数据库
|
||||
docker run -d --name redis-server \
|
||||
-p 6379:6379 \
|
||||
-v /shumengya/docker/storage/redis:/data \
|
||||
redis:latest \
|
||||
redis-server --requirepass "shumengya520" --appendonly yes
|
||||
|
||||
docker run -d --name redis-server \
|
||||
-p 6379:6379 \
|
||||
-v /shumengya/docker/storage/redis:/data \
|
||||
redis:latest \
|
||||
redis-server --requirepass "shumengya520" --appendonly yes --save 900 1 --save 300 10 --save 60 10000
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
docker pull redis
|
||||
```
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
```bash
|
||||
docker run -d \
|
||||
-p 1991:1991 \
|
||||
--memory=4g \
|
||||
--cpus=4 \
|
||||
surveyking/surveyking
|
||||
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
@@ -0,0 +1,32 @@
|
||||
|
||||
```bash
|
||||
#启动最新版frp客户端
|
||||
docker run -d \
|
||||
--name frpc \
|
||||
--restart=always \
|
||||
--network host \
|
||||
-v /shumengya/docker/storage/frpc:/etc/frp \
|
||||
-e TZ=Asia/Shanghai \
|
||||
natfrp/frpc:latest \
|
||||
-c /etc/frp/frpc.toml
|
||||
|
||||
#启动最新版frp服务端
|
||||
docker run -d \
|
||||
--name frps \
|
||||
--restart=always \
|
||||
--network host \
|
||||
-e TZ=Asia/Tokyo \
|
||||
-v /shumengya/docker/storage/frps:/etc/frp \
|
||||
snowdreamtech/frps:latest \
|
||||
-c /etc/frp/frps.toml
|
||||
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
@@ -0,0 +1,19 @@
|
||||
|
||||
```bash
|
||||
|
||||
docker run -d \
|
||||
--name kkfileview \
|
||||
-p 8289:8012 \
|
||||
--restart unless-stopped \
|
||||
keking/kkfileview:latest
|
||||
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
@@ -0,0 +1,216 @@
|
||||
|
||||
```yaml
|
||||
|
||||
version: '3.8'
|
||||
services:
|
||||
registry-server:
|
||||
image: registry:2.8.2
|
||||
container_name: registry-server
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "5000:5000"
|
||||
environment:
|
||||
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /var/lib/registry
|
||||
REGISTRY_STORAGE_DELETE_ENABLED: 'true'
|
||||
volumes:
|
||||
- /shumengya/docker/docker-registry/registry-data:/var/lib/registry
|
||||
networks:
|
||||
- registry-network
|
||||
|
||||
registry-ui:
|
||||
image: joxit/docker-registry-ui:main
|
||||
container_name: registry-ui
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "9191:80"
|
||||
environment:
|
||||
- SINGLE_REGISTRY=true
|
||||
- REGISTRY_TITLE=Docker Registry UI
|
||||
- DELETE_IMAGES=true
|
||||
- SHOW_CONTENT_DIGEST=true
|
||||
- NGINX_PROXY_PASS_URL=http://registry-server:5000
|
||||
- REGISTRY_SECURED=false
|
||||
depends_on:
|
||||
- registry-server
|
||||
networks:
|
||||
- registry-network
|
||||
|
||||
networks:
|
||||
registry-network:
|
||||
driver: bridge
|
||||
|
||||
```
|
||||
|
||||
# Docker Registry 常用管理命令
|
||||
|
||||
### 1. 基本镜像操作
|
||||
```bash
|
||||
# 查看所有镜像仓库
|
||||
curl http://localhost:5000/v2/_catalog
|
||||
|
||||
# 查看特定镜像的所有标签
|
||||
curl http://localhost:5000/v2/<image-name>/tags/list
|
||||
|
||||
# 查看镜像manifest
|
||||
curl -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||
http://localhost:5000/v2/<image-name>/manifests/<tag>
|
||||
|
||||
# 查看镜像layer信息
|
||||
curl http://localhost:5000/v2/<image-name>/manifests/<tag> | jq .
|
||||
```
|
||||
|
||||
### 2. 推送/拉取镜像
|
||||
```bash
|
||||
# 标记镜像
|
||||
docker tag <source-image> localhost:5000/<image-name>:<tag>
|
||||
|
||||
# 推送镜像到私有Registry
|
||||
docker push localhost:5000/<image-name>:<tag>
|
||||
|
||||
# 从私有Registry拉取镜像
|
||||
docker pull localhost:5000/<image-name>:<tag>
|
||||
|
||||
# 批量推送镜像
|
||||
docker images | grep localhost:5000 | awk '{print $1":"$2}' | xargs -I {} docker push {}
|
||||
|
||||
# 批量拉取镜像
|
||||
docker pull localhost:5000/alpine:latest
|
||||
docker pull localhost:5000/nginx:latest
|
||||
docker pull localhost:5000/ubuntu:latest
|
||||
```
|
||||
|
||||
## 三、镜像删除命令
|
||||
|
||||
### 1. 启用删除功能
|
||||
```bash
|
||||
# 在docker-compose.yml中添加
|
||||
environment:
|
||||
REGISTRY_STORAGE_DELETE_ENABLED: 'true'
|
||||
```
|
||||
|
||||
### 2. 删除镜像步骤
|
||||
```bash
|
||||
# 1. 获取镜像digest
|
||||
curl -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
|
||||
-I http://localhost:5000/v2/<image-name>/manifests/<tag>
|
||||
|
||||
# 返回结果中包含:Docker-Content-Digest: sha256:xxxx
|
||||
|
||||
# 2. 删除manifest
|
||||
curl -X DELETE http://localhost:5000/v2/<image-name>/manifests/sha256:xxxx
|
||||
|
||||
# 3. 执行垃圾回收释放存储空间
|
||||
docker-compose exec registry-server bin/registry garbage-collect /etc/docker/registry/config.yml
|
||||
|
||||
# 强制垃圾回收(dry-run先测试)
|
||||
docker-compose exec registry-server bin/registry garbage-collect --dry-run /etc/docker/registry/config.yml
|
||||
```
|
||||
|
||||
|
||||
## 四、存储管理命令
|
||||
|
||||
### 1. 查看存储使用情况
|
||||
```bash
|
||||
# 查看数据目录大小
|
||||
du -sh /shumengya/docker/docker-registry/registry-data/
|
||||
|
||||
# 查看详细存储使用
|
||||
du -h --max-depth=2 /shumengya/docker/docker-registry/registry-data/
|
||||
|
||||
# 查看文件数量
|
||||
find /shumengya/docker/docker-registry/registry-data/ -type f | wc -l
|
||||
|
||||
# 查看Registry存储统计
|
||||
docker-compose exec registry-server registry garbage-collect --dry-run /etc/docker/registry/config.yml | grep "blobs eligible for deletion"
|
||||
```
|
||||
|
||||
### 2. 清理存储
|
||||
```bash
|
||||
# 执行垃圾回收(清理已删除的blobs)
|
||||
docker-compose exec registry-server bin/registry garbage-collect /etc/docker/registry/config.yml
|
||||
|
||||
# 清理未使用的层
|
||||
docker system prune -af
|
||||
|
||||
# 清理所有未使用的Docker对象
|
||||
docker system prune -a --volumes
|
||||
```
|
||||
|
||||
## 五、备份与恢复命令
|
||||
|
||||
### 1. 备份Registry数据
|
||||
```bash
|
||||
# 备份整个数据目录
|
||||
tar -czf registry-backup-$(date +%Y%m%d_%H%M%S).tar.gz -C /shumengya/docker/docker-registry registry-data/
|
||||
|
||||
# 增量备份(如果支持)
|
||||
rsync -avz /shumengya/docker/docker-registry/registry-data/ /backup/registry-data/
|
||||
|
||||
# 导出所有镜像
|
||||
docker-compose down
|
||||
tar -czf registry-full-backup.tar.gz /shumengya/docker/docker-registry/
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
### 2. 恢复Registry数据
|
||||
```bash
|
||||
# 停止服务
|
||||
docker-compose down
|
||||
|
||||
# 恢复备份
|
||||
tar -xzf registry-backup-20231201.tar.gz -C /shumengya/docker/docker-registry/
|
||||
|
||||
# 启动服务
|
||||
docker-compose up -d
|
||||
|
||||
# 验证恢复
|
||||
curl http://localhost:5000/v2/_catalog
|
||||
```
|
||||
|
||||
## 六、配置管理命令
|
||||
|
||||
### 1. 查看配置
|
||||
```bash
|
||||
# 查看容器内配置文件
|
||||
docker-compose exec registry-server cat /etc/docker/registry/config.yml
|
||||
|
||||
# 查看环境变量
|
||||
docker-compose exec registry-server env
|
||||
|
||||
# 查看Registry版本
|
||||
docker-compose exec registry-server registry --version
|
||||
```
|
||||
|
||||
### 2. 修改配置
|
||||
```bash
|
||||
# 1. 修改docker-compose.yml
|
||||
vim docker-compose.yml
|
||||
|
||||
# 2. 重新部署
|
||||
docker-compose down
|
||||
docker-compose up -d
|
||||
|
||||
# 或者热重载
|
||||
docker-compose restart
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## 常用命令速查表
|
||||
|
||||
| 功能 | 命令 |
|
||||
|------|------|
|
||||
| 启动服务 | `docker-compose up -d` |
|
||||
| 停止服务 | `docker-compose down` |
|
||||
| 查看日志 | `docker-compose logs -f` |
|
||||
| 查看镜像列表 | `curl http://localhost:5000/v2/_catalog` |
|
||||
| 推送镜像 | `docker push localhost:5000/镜像:标签` |
|
||||
| 拉取镜像 | `docker pull localhost:5000/镜像:标签` |
|
||||
| 删除镜像 | `curl -X DELETE http://localhost:5000/v2/镜像/manifests/sha256:xxx` |
|
||||
| 垃圾回收 | `docker-compose exec registry-server registry garbage-collect /path/to/config.yml` |
|
||||
| 查看存储 | `du -sh /shumengya/docker/docker-registry/registry-data/` |
|
||||
| 备份数据 | `tar -czf backup.tar.gz /shumengya/docker/docker-registry/registry-data/` |
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
```bash
|
||||
|
||||
|
||||
|
||||
```
|
||||
|
||||
```bash
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
94
mengyanote-backend/data/mengyanote/Git/Github仓库公共API总结.md
Normal file
94
mengyanote-backend/data/mengyanote/Git/Github仓库公共API总结.md
Normal file
@@ -0,0 +1,94 @@
|
||||
|
||||
---
|
||||
|
||||
## Releases(发行版本)相关接口
|
||||
|
||||
- **获取最新发布版本(Latest Release)**
|
||||
`GET /repos/{owner}/{repo}/releases/latest`
|
||||
返回最新非预发布、非草稿版的发布详情,包括版本号、发布时间、说明等。([GitHub Docs](https://docs.github.com/en/rest/releases?utm_source=chatgpt.com "REST API endpoints for releases and release assets"))
|
||||
|
||||
- **列出所有发布版本(List Releases)**
|
||||
`GET /repos/{owner}/{repo}/releases`
|
||||
返回该仓库所有发布版本的列表,不包含未关联发布的普通 Git 标签。([GitHub Docs](https://docs.github.com/en/rest/releases/releases?utm_source=chatgpt.com "REST API endpoints for releases"))
|
||||
|
||||
- **通过 Tag 获取指定发布版本(Get a Release by Tag)**
|
||||
`GET /repos/{owner}/{repo}/releases/tags/{tag}`
|
||||
根据具体 tag 名称获取对应发布版本的信息。([GitHub Docs](https://docs.github.com/en/rest/releases?utm_source=chatgpt.com "REST API endpoints for releases and release assets"))
|
||||
|
||||
- **创建、更新、删除发布版本(Create / Update / Delete Release)**
|
||||
|
||||
- `POST /repos/{owner}/{repo}/releases` — 创建新的发布版本
|
||||
|
||||
- `PATCH /repos/{owner}/{repo}/releases/{release_id}` — 更新发布版本
|
||||
|
||||
- `DELETE /repos/{owner}/{repo}/releases/{release_id}` — 删除发布版本
|
||||
(这些操作通常需要认证权限。)([GitHub Docs](https://docs.github.com/en/rest/releases?utm_source=chatgpt.com "REST API endpoints for releases and release assets"))
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Git Tags(标签)相关接口
|
||||
|
||||
- **列出仓库的 Git 标签**
|
||||
`GET /repos/{owner}/{repo}/tags`
|
||||
返回该仓库所有标签(包括 lightweight 和 annotated)。([Stack Overflow](https://stackoverflow.com/questions/18384873/how-to-list-the-releases-of-a-repository?utm_source=chatgpt.com "github - How to list the releases of a repository?"), [GitHub Docs](https://docs.github.com/en/rest/repos/tags?utm_source=chatgpt.com "REST API endpoints for repository tags"))
|
||||
|
||||
- **获取标签引用(Tag Reference)**
|
||||
`GET /repos/{owner}/{repo}/git/refs/tags/{tag_name}`
|
||||
可获取该标签所对应的对象(TAG_SHA),用于进一步查询。([Stack Overflow](https://stackoverflow.com/questions/72429056/how-to-get-single-tag-information-using-github-api?utm_source=chatgpt.com "How to get Single tag Information using GitHub Api?"))
|
||||
|
||||
- **获取 Annotated Tag 对象详情**
|
||||
`GET /repos/{owner}/{repo}/git/tags/{tag_sha}`
|
||||
获取标签对象的完整信息,包括 `object.sha` 即对应的 commit SHA、tagger、message 等。([Stack Overflow](https://stackoverflow.com/questions/72429056/how-to-get-single-tag-information-using-github-api?utm_source=chatgpt.com "How to get Single tag Information using GitHub Api?"))
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Commits(提交)相关接口
|
||||
|
||||
- **列出提交记录(List Commits)**
|
||||
`GET /repos/{owner}/{repo}/commits`
|
||||
返回最新的提交列表,第一个通常为最新提交。响应中包含 SHA、作者、提交信息、签名验证信息等。([GitHub Docs](https://docs.github.com/en/rest/commits/commits?utm_source=chatgpt.com "REST API endpoints for commits"))
|
||||
|
||||
- **获取单个提交详情(Get a Commit)**
|
||||
`GET /repos/{owner}/{repo}/commits/{commit_sha}`
|
||||
获取指定提交的详细信息。([GitHub Docs](https://docs.github.com/en/rest/commits?utm_source=chatgpt.com "REST API endpoints for commits"))
|
||||
|
||||
- **比较两个提交(Compare Commits)**
|
||||
`GET /repos/{owner}/{repo}/compare/{base}...{head}`
|
||||
用于比较两个 commit 或两个 tag 之间的差异。([Stack Overflow](https://stackoverflow.com/questions/61359461/get-all-commits-in-a-git-tag-through-github-api-return-only-the-first-commit?utm_source=chatgpt.com "get all commits in a Git tag through GitHub API return only ..."))
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 综合流程示例
|
||||
|
||||
下面是一个常见逻辑,例如想获取最新发布对应的 commit SHA:
|
||||
|
||||
1. 调用 `GET /repos/{owner}/{repo}/releases/latest` 获取最新 release 的 `tag_name`。
|
||||
|
||||
2. 调用 `GET /repos/{owner}/{repo}/git/refs/tags/{tag_name}` 获取 TAG_SHA。
|
||||
|
||||
3. 调用 `GET /repos/{owner}/{repo}/git/tags/{tag_sha}` 获取该标签对象的 commit SHA(object.sha)。
|
||||
|
||||
|
||||
这套流程常用于从发布版本跳转到对应的 Git 提交。([Stack Overflow](https://stackoverflow.com/questions/67040794/how-can-i-get-the-commit-hash-of-the-latest-release-from-github-api?utm_source=chatgpt.com "How can I get the commit hash of the latest release from ..."))
|
||||
|
||||
---
|
||||
|
||||
## 表格总结
|
||||
|
||||
|功能需求|接口路径 / 方法|
|
||||
|---|---|
|
||||
|最新发布版本信息|`GET /repos/{owner}/{repo}/releases/latest`|
|
||||
|列出所有发布版本|`GET /repos/{owner}/{repo}/releases`|
|
||||
|通过 tag 查询发布|`GET /repos/{owner}/{repo}/releases/tags/{tag}`|
|
||||
|获取标签列表|`GET /repos/{owner}/{repo}/tags`|
|
||||
|获取标签引用(TAG_SHA)|`GET /repos/{owner}/{repo}/git/refs/tags/{tag_name}`|
|
||||
|获取标签对象详情|`GET /repos/{owner}/{repo}/git/tags/{tag_sha}`|
|
||||
|列出提交|`GET /repos/{owner}/{repo}/commits`|
|
||||
|获取指定 commit 信息|`GET /repos/{owner}/{repo}/commits/{commit_sha}`|
|
||||
|比较两个 commit/tag|`GET /repos/{owner}/{repo}/compare/{base}...{head}`|
|
||||
|
||||
---
|
||||
|
||||
62
mengyanote-backend/data/mengyanote/Git/Github公共API总结2.md
Normal file
62
mengyanote-backend/data/mengyanote/Git/Github公共API总结2.md
Normal file
@@ -0,0 +1,62 @@
|
||||
|
||||
---
|
||||
|
||||
## 🔹 通用公共(无认证)REST API 端点
|
||||
|
||||
这些端点均可通过简单的 HTTP 请求访问,无需提供 `Authorization` 令牌即可获取公共资源:
|
||||
|
||||
### 📌 基础信息 / 元数据
|
||||
|
||||
以下端点可获取 GitHub 系统信息和服务配置:
|
||||
|
||||
|端点路径|说明|
|
||||
|---|---|
|
||||
|`GET https://api.github.com/`|GitHub REST API 根目录,列出可用资源和链接(Public)|
|
||||
|`GET https://api.github.com/meta`|获取 GitHub 服务的元数据,如 IP 地址列表等|
|
||||
|`GET https://api.github.com/octocat`|获取 Octocat ASCII/示例资源|
|
||||
|
||||
|
||||
---
|
||||
|
||||
### 📌 公共仓库及用户信息
|
||||
|
||||
这些调用通常只读且针对 _公共仓库或用户信息_:
|
||||
|
||||
|请求方法 + 路径|说明|
|
||||
|---|---|
|
||||
|`GET /users/{username}`|获取指定用户名的公开用户信息|
|
||||
|`GET /users/{username}/repos`|获取用户所有公开仓库列表|
|
||||
|`GET /repos/{owner}/{repo}`|获取公开仓库的详细信息(如 README、描述等)|
|
||||
|`GET /repos/{owner}/{repo}/branches`|列出公开仓库的分支|
|
||||
|`GET /repos/{owner}/{repo}/contributors`|列出公开仓库的贡献者|
|
||||
|`GET /repos/{owner}/{repo}/commits`|列出公开仓库的提交历史|
|
||||
|`GET /repos/{owner}/{repo}/issues`|列出公开仓库的问题(不需要鉴权即可获取公开 issue)|
|
||||
|`GET /repos/{owner}/{repo}/pulls`|列出公开仓库的拉取请求(无需 token 访问公开 PR)|
|
||||
|`GET /gists/public`|列出所有公共 Gists|
|
||||
|`GET /events`|获取公共事件流|
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 📌 调用示例
|
||||
|
||||
### 获取公开仓库信息
|
||||
|
||||
```bash
|
||||
curl https://api.github.com/repos/octocat/Hello-World
|
||||
```
|
||||
|
||||
### 列出用户公开仓库
|
||||
|
||||
```bash
|
||||
curl https://api.github.com/users/octocat/repos
|
||||
```
|
||||
|
||||
### 获取公共事件流
|
||||
|
||||
```bash
|
||||
curl https://api.github.com/events
|
||||
```
|
||||
|
||||
|
||||
---
|
||||
13
mengyanote-backend/data/mengyanote/Git/Github学生认证.md
Normal file
13
mengyanote-backend/data/mengyanote/Git/Github学生认证.md
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
## **Verification Report**
|
||||
|
||||
| | |
|
||||
| ------------------- | :--------------------------------- |
|
||||
| **Name** | **Shu Mengya** |
|
||||
| **ID** | **202431062146** |
|
||||
| **School** | **SouthWest Petroleum University** |
|
||||
| **Form** | **Full time** |
|
||||
| **Status** | **Distance Learning** |
|
||||
| **Graduation Date** | **2028.6** |
|
||||
| **Time** | **2024.9.6** |
|
||||
|
||||
60
mengyanote-backend/data/mengyanote/Git/Github获取仓库密钥.md
Normal file
60
mengyanote-backend/data/mengyanote/Git/Github获取仓库密钥.md
Normal file
@@ -0,0 +1,60 @@
|
||||
这个地方要注意:
|
||||
|
||||
你输入 `git push` 时出现
|
||||
|
||||
```
|
||||
Username for 'https://github.com': shumengya
|
||||
Password for 'https://shumengya@github.com':
|
||||
```
|
||||
|
||||
这里的 **Password** 已经不是 GitHub 登录密码了。
|
||||
从 2021 年 8 月开始,GitHub **禁用了账户密码推送**,必须用 **Personal Access Token (PAT)** 或 **SSH Key** 来认证。
|
||||
|
||||
---
|
||||
|
||||
### ✅ 方案一:生成 Personal Access Token(HTTPS 推荐)
|
||||
|
||||
1. 登录 GitHub → 右上角头像 → **Settings**
|
||||
2. 左侧栏 → **Developer settings** → **Personal access tokens** → **Tokens (classic)**
|
||||
3. 点击 **Generate new token (classic)**
|
||||
|
||||
* 勾选 **repo**(访问和推送仓库必须要有)
|
||||
* 设置有效期(比如 90 天或无期限)
|
||||
* 点击生成
|
||||
4. 复制生成的 Token(只会显示一次)
|
||||
|
||||
之后推送时:
|
||||
|
||||
* **Username**:填 GitHub 用户名(`shumengya`)
|
||||
* **Password**:填刚生成的 Token
|
||||
|
||||
---
|
||||
|
||||
### ✅ 方案二:改用 SSH Key(更方便)
|
||||
|
||||
1. 本地生成 SSH Key:
|
||||
|
||||
```bash
|
||||
ssh-keygen -t ed25519 -C "你的邮箱"
|
||||
```
|
||||
|
||||
按回车保存,默认会在 `~/.ssh/id_ed25519` 和 `~/.ssh/id_ed25519.pub`。
|
||||
2. 查看公钥:
|
||||
|
||||
```bash
|
||||
cat ~/.ssh/id_ed25519.pub
|
||||
```
|
||||
3. 复制内容 → GitHub → **Settings → SSH and GPG keys → New SSH key** → 粘贴保存。
|
||||
4. 修改仓库地址为 SSH:
|
||||
|
||||
```bash
|
||||
git remote set-url origin git@github.com:shumengya/你的仓库名.git
|
||||
```
|
||||
5. 之后直接 `git push` 就不用输密码了。
|
||||
|
||||
---
|
||||
|
||||
👉 建议你选 **SSH Key**,因为用一次就永久生效,不会过期。
|
||||
|
||||
要不要我给你写一份 **完整 SSH Key 配置和测试流程**(从生成到验证)?
|
||||
|
||||
260
mengyanote-backend/data/mengyanote/Git/Git使用SSH提交下载方法总结.md
Normal file
260
mengyanote-backend/data/mengyanote/Git/Git使用SSH提交下载方法总结.md
Normal file
@@ -0,0 +1,260 @@
|
||||
# Gitea SSH 上传下载命令总结
|
||||
|
||||
## 目录
|
||||
1. [SSH 密钥配置](#ssh-密钥配置)
|
||||
2. [仓库克隆与下载](#仓库克隆与下载)
|
||||
3. [代码上传与推送](#代码上传与推送)
|
||||
4. [分支操作](#分支操作)
|
||||
5. [标签操作](#标签操作)
|
||||
6. [常见问题排查](#常见问题排查)
|
||||
|
||||
---
|
||||
|
||||
## SSH 密钥配置
|
||||
|
||||
### 1. 生成 SSH 密钥
|
||||
```bash
|
||||
# 生成新的 SSH 密钥(默认使用 RSA)
|
||||
ssh-keygen -t rsa -b 4096 -C "mail@smyhub.com"
|
||||
|
||||
# 或者使用 Ed25519(更安全)
|
||||
ssh-keygen -t ed25519 -C "mail@smyhub.com"
|
||||
```
|
||||
|
||||
### 2. 复制公钥到剪贴板
|
||||
```bash
|
||||
# macOS
|
||||
cat ~/.ssh/id_rsa.pub | pbcopy
|
||||
|
||||
# Linux(需要安装 xclip)
|
||||
cat ~/.ssh/id_rsa.pub | xclip -sel clip
|
||||
|
||||
# Windows(Git Bash)
|
||||
cat ~/.ssh/id_rsa.pub | clip
|
||||
```
|
||||
|
||||
### 3. 测试 SSH 连接
|
||||
```bash
|
||||
ssh -T git@gitea.example.com
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 仓库克隆与下载
|
||||
|
||||
### 1. 克隆仓库(SSH方式)
|
||||
```bash
|
||||
# 标准克隆
|
||||
git clone git@gitea.example.com:username/repository.git
|
||||
|
||||
# 克隆到指定目录
|
||||
git clone git@gitea.example.com:username/repository.git my-project
|
||||
|
||||
# 克隆特定分支
|
||||
git clone -b branch-name git@gitea.example.com:username/repository.git
|
||||
```
|
||||
|
||||
### 2. 更新已克隆的仓库
|
||||
```bash
|
||||
# 拉取最新更改
|
||||
git pull origin main
|
||||
|
||||
# 或指定远程和分支
|
||||
git pull origin branch-name
|
||||
```
|
||||
|
||||
### 3. 下载特定文件/目录
|
||||
```bash
|
||||
# 使用 sparse checkout(部分检出)
|
||||
git clone --filter=blob:none --sparse git@gitea.example.com:username/repository.git
|
||||
cd repository
|
||||
git sparse-checkout init --cone
|
||||
git sparse-checkout set path/to/directory
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 代码上传与推送
|
||||
|
||||
### 1. 初始化本地仓库并推送到 Gitea
|
||||
```bash
|
||||
# 初始化本地仓库
|
||||
git init
|
||||
git add .
|
||||
git commit -m "Initial commit"
|
||||
|
||||
# 添加远程仓库
|
||||
git remote add origin git@gitea.example.com:username/repository.git
|
||||
|
||||
#非22标准端口
|
||||
git remote set-url gitea ssh://git@repo.shumengya.top:8022/shumengya/mengyalinkfly.git
|
||||
|
||||
# 首次推送
|
||||
git push -u origin main # 或 master
|
||||
```
|
||||
|
||||
### 2. 日常推送更改
|
||||
```bash
|
||||
# 添加所有更改
|
||||
git add .
|
||||
# 或添加特定文件
|
||||
git add file1.txt file2.txt
|
||||
|
||||
# 提交更改
|
||||
git commit -m "描述你的更改"
|
||||
|
||||
# 推送到远程仓库
|
||||
git push origin branch-name
|
||||
```
|
||||
|
||||
### 3. 强制推送(谨慎使用)
|
||||
```bash
|
||||
# 强制推送覆盖远程分支
|
||||
git push --force origin branch-name
|
||||
|
||||
# 更安全的强制推送(推荐)
|
||||
git push --force-with-lease origin branch-name
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 分支操作
|
||||
|
||||
### 1. 分支管理
|
||||
```bash
|
||||
# 查看所有分支
|
||||
git branch -a
|
||||
|
||||
# 创建新分支
|
||||
git branch new-branch-name
|
||||
|
||||
# 切换到分支
|
||||
git checkout branch-name
|
||||
# 或使用更短的方式
|
||||
git switch branch-name
|
||||
|
||||
# 创建并切换到新分支
|
||||
git checkout -b new-branch-name
|
||||
|
||||
# 推送本地分支到远程
|
||||
git push -u origin branch-name
|
||||
```
|
||||
|
||||
### 2. 删除分支
|
||||
```bash
|
||||
# 删除本地分支
|
||||
git branch -d branch-name
|
||||
|
||||
# 强制删除本地分支
|
||||
git branch -D branch-name
|
||||
|
||||
# 删除远程分支
|
||||
git push origin --delete branch-name
|
||||
```
|
||||
|
||||
### 3. 同步远程分支
|
||||
```bash
|
||||
# 获取所有远程分支信息
|
||||
git fetch --all
|
||||
|
||||
# 创建并切换到远程分支的本地副本
|
||||
git checkout -b local-branch-name origin/remote-branch-name
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 标签操作
|
||||
|
||||
### 1. 标签管理
|
||||
```bash
|
||||
# 创建轻量标签
|
||||
git tag v1.0.0
|
||||
|
||||
# 创建带注释的标签
|
||||
git tag -a v1.0.0 -m "版本 1.0.0"
|
||||
|
||||
# 查看所有标签
|
||||
git tag
|
||||
|
||||
# 推送单个标签到远程
|
||||
git push origin v1.0.0
|
||||
|
||||
# 推送所有标签到远程
|
||||
git push origin --tags
|
||||
```
|
||||
|
||||
### 2. 删除标签
|
||||
```bash
|
||||
# 删除本地标签
|
||||
git tag -d v1.0.0
|
||||
|
||||
# 删除远程标签
|
||||
git push origin --delete v1.0.0
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 常见问题排查
|
||||
|
||||
### 1. SSH 连接问题
|
||||
```bash
|
||||
# 测试 SSH 连接
|
||||
ssh -vT git@gitea.example.com
|
||||
|
||||
# 检查 SSH 密钥权限
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
chmod 644 ~/.ssh/id_rsa.pub
|
||||
|
||||
# 查看 SSH 配置
|
||||
cat ~/.ssh/config
|
||||
```
|
||||
|
||||
### 2. 权限被拒绝错误
|
||||
如果遇到权限问题,检查:
|
||||
1. SSH 公钥是否正确添加到 Gitea
|
||||
2. 仓库访问权限设置
|
||||
3. SSH 配置文件是否正确
|
||||
|
||||
### 3. 典型 SSH 配置示例
|
||||
```bash
|
||||
# ~/.ssh/config 文件内容示例
|
||||
Host gitea.example.com
|
||||
HostName gitea.example.com
|
||||
User git
|
||||
IdentityFile ~/.ssh/id_rsa
|
||||
PreferredAuthentications publickey
|
||||
```
|
||||
|
||||
### 4. 修改远程仓库地址
|
||||
```bash
|
||||
# 查看当前远程地址
|
||||
git remote -v
|
||||
|
||||
# 修改远程地址
|
||||
git remote set-url origin git@gitea.example.com:username/repository.git
|
||||
|
||||
#非22标准端口
|
||||
git remote set-url gitea ssh://git@repo.shumengya.top:8022/shumengya/mengyalinkfly.git
|
||||
|
||||
# 添加多个远程地址
|
||||
git remote add upstream git@gitea.example.com:otheruser/repository.git
|
||||
|
||||
#非22标准端口
|
||||
git remote set-url gitea ssh://git@repo.shumengya.top:8022/shumengya/mengyalinkfly.git
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 快速参考命令卡
|
||||
|
||||
| 操作 | 命令 |
|
||||
|------|------|
|
||||
| 克隆仓库 | `git clone git@gitea.example.com:user/repo.git` |
|
||||
| 拉取更新 | `git pull origin branch` |
|
||||
| 推送更改 | `git push origin branch` |
|
||||
| 查看状态 | `git status` |
|
||||
| 查看日志 | `git log --oneline` |
|
||||
| 添加远程 | `git remote add origin ssh-url` |
|
||||
| 分支列表 | `git branch -a` |
|
||||
|
||||
---
|
||||
226
mengyanote-backend/data/mengyanote/Git/Git常用命令.md
Normal file
226
mengyanote-backend/data/mengyanote/Git/Git常用命令.md
Normal file
@@ -0,0 +1,226 @@
|
||||
## Git 常用命令总结(适配 Gitea/GitHub)
|
||||
|
||||
### 🔧 **基础配置**
|
||||
```bash
|
||||
# 配置用户信息(全局)
|
||||
git config --global user.name "你的用户名"
|
||||
git config --global user.email "你的邮箱"
|
||||
|
||||
# 配置默认分支名称(现代Git推荐)
|
||||
git config --global init.defaultBranch main
|
||||
|
||||
# 查看配置
|
||||
git config --list
|
||||
|
||||
# 为不同平台配置不同身份(可选)
|
||||
# 在项目目录内设置局部配置,会覆盖全局配置
|
||||
git config user.name "项目专用用户名"
|
||||
```
|
||||
|
||||
### 📦 **仓库操作**
|
||||
```bash
|
||||
# 初始化新仓库
|
||||
git init
|
||||
|
||||
# 克隆仓库(通用格式)
|
||||
git clone https://github.com/用户名/仓库名.git # GitHub
|
||||
git clone https://gitea.com/用户名/仓库名.git # Gitea
|
||||
git clone git@github.com:用户名/仓库名.git # SSH方式
|
||||
git clone git@gitea.com:用户名/仓库名.git # SSH方式
|
||||
|
||||
# 查看远程仓库信息
|
||||
git remote -v
|
||||
|
||||
# 添加远程仓库
|
||||
git remote add origin <仓库URL>
|
||||
git remote add upstream <上游仓库URL> # 常用于fork的工作流
|
||||
|
||||
# 修改远程仓库URL
|
||||
git remote set-url origin <新URL>
|
||||
```
|
||||
|
||||
### 📝 **日常开发流程**
|
||||
```bash
|
||||
# 查看状态
|
||||
git status
|
||||
|
||||
# 添加文件到暂存区
|
||||
git add <文件名> # 添加特定文件
|
||||
git add . # 添加所有修改
|
||||
git add -A # 添加所有修改(包括删除)
|
||||
|
||||
# 提交更改
|
||||
git commit -m "提交说明"
|
||||
git commit -am "提交说明" # 添加并提交已跟踪文件
|
||||
|
||||
# 查看提交历史
|
||||
git log --oneline --graph --decorate
|
||||
git log -p # 显示详细修改内容
|
||||
```
|
||||
|
||||
### 🌿 **分支管理**
|
||||
```bash
|
||||
# 查看分支
|
||||
git branch # 本地分支
|
||||
git branch -r # 远程分支
|
||||
git branch -a # 所有分支
|
||||
|
||||
# 创建与切换分支
|
||||
git branch <分支名> # 创建分支
|
||||
git checkout <分支名> # 切换分支
|
||||
git checkout -b <分支名> # 创建并切换
|
||||
|
||||
# 合并分支
|
||||
git merge <分支名> # 合并指定分支到当前分支
|
||||
|
||||
# 删除分支
|
||||
git branch -d <分支名> # 删除本地分支
|
||||
git push origin --delete <分支名> # 删除远程分支
|
||||
```
|
||||
|
||||
### 🔄 **远程同步**
|
||||
```bash
|
||||
# 拉取更新
|
||||
git pull origin <分支名> # 拉取并合并
|
||||
git fetch origin # 仅获取不合并
|
||||
git fetch --prune # 获取并清理已删除的远程分支
|
||||
|
||||
# 推送更改
|
||||
git push origin <分支名>
|
||||
git push -u origin <分支名> # 首次推送并设置上游分支
|
||||
|
||||
# 强制推送(谨慎使用)
|
||||
git push --force-with-lease # 比--force更安全
|
||||
```
|
||||
|
||||
### 🗑️ **撤销操作**
|
||||
```bash
|
||||
# 撤销工作区修改
|
||||
git checkout -- <文件名>
|
||||
|
||||
# 撤销暂存区文件
|
||||
git reset HEAD <文件名>
|
||||
|
||||
# 修改最后一次提交
|
||||
git commit --amend -m "新提交信息"
|
||||
|
||||
# 撤销提交(保留更改)
|
||||
git reset --soft HEAD~1
|
||||
|
||||
# 撤销提交(丢弃更改)
|
||||
git reset --hard HEAD~1
|
||||
|
||||
# 恢复已删除的文件
|
||||
git checkout <提交哈希> -- <文件名>
|
||||
```
|
||||
|
||||
### 🏷️ **标签管理**
|
||||
```bash
|
||||
# 创建标签
|
||||
git tag v1.0.0 # 轻量标签
|
||||
git tag -a v1.0.0 -m "版本说明" # 附注标签
|
||||
|
||||
# 推送标签
|
||||
git push origin v1.0.0 # 推送单个标签
|
||||
git push origin --tags # 推送所有标签
|
||||
|
||||
# 删除标签
|
||||
git tag -d v1.0.0 # 删除本地标签
|
||||
git push origin :refs/tags/v1.0.0 # 删除远程标签
|
||||
```
|
||||
|
||||
### 🧹 **清理与维护**
|
||||
```bash
|
||||
# 清理未跟踪文件
|
||||
git clean -n # 预览将被删除的文件
|
||||
git clean -f # 强制删除未跟踪文件
|
||||
git clean -fd # 删除未跟踪文件和目录
|
||||
|
||||
# 查看仓库大小
|
||||
git count-objects -vH
|
||||
```
|
||||
|
||||
### 🔗 **Gitea/GitHub 特定注意事项**
|
||||
|
||||
#### 1. **SSH 密钥配置(通用)**
|
||||
```bash
|
||||
# 生成SSH密钥
|
||||
ssh-keygen -t ed25519 -C "your_email@example.com"
|
||||
|
||||
# 测试连接
|
||||
ssh -T git@github.com
|
||||
ssh -T git@gitea.example.com
|
||||
```
|
||||
|
||||
#### 2. **仓库URL格式**
|
||||
```bash
|
||||
# HTTPS格式(需输入凭据)
|
||||
https://github.com/用户名/仓库.git
|
||||
https://gitea.example.com/用户名/仓库.git
|
||||
|
||||
# SSH格式(需配置密钥)
|
||||
git@github.com:用户名/仓库.git
|
||||
git@gitea.example.com:用户名/仓库.git
|
||||
```
|
||||
|
||||
#### 3. **Pull Request 工作流**
|
||||
```bash
|
||||
# Fork 工作流示例
|
||||
git clone <自己fork的仓库>
|
||||
git remote add upstream <原始仓库>
|
||||
git fetch upstream
|
||||
git merge upstream/main
|
||||
git push origin main
|
||||
```
|
||||
|
||||
#### 4. **大文件处理**
|
||||
```bash
|
||||
# 使用Git LFS(如果平台支持)
|
||||
git lfs install
|
||||
git lfs track "*.psd"
|
||||
git add .gitattributes
|
||||
```
|
||||
|
||||
### 📊 **实用别名配置**
|
||||
在 `~/.gitconfig` 中添加:
|
||||
```ini
|
||||
[alias]
|
||||
co = checkout
|
||||
br = branch
|
||||
ci = commit
|
||||
st = status
|
||||
lg = log --oneline --graph --decorate
|
||||
last = log -1 HEAD
|
||||
unstage = reset HEAD --
|
||||
undo = reset --soft HEAD~1
|
||||
```
|
||||
|
||||
### ⚠️ **注意事项**
|
||||
1. **强制推送**:避免在公共分支使用 `git push --force`
|
||||
2. **敏感信息**:切勿提交密码、密钥等敏感数据
|
||||
3. **`.gitignore`**:提前配置忽略文件
|
||||
4. **commit信息**:使用清晰的提交说明
|
||||
5. **定期同步**:开发前先 `git pull` 获取最新代码
|
||||
|
||||
### 📁 **常用 .gitignore 模板**
|
||||
```gitignore
|
||||
# 操作系统文件
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# 编辑器文件
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*.swo
|
||||
|
||||
# 依赖目录
|
||||
node_modules/
|
||||
vendor/
|
||||
|
||||
# 环境变量
|
||||
.env
|
||||
.env.local
|
||||
```
|
||||
|
||||
这些命令在 Gitea 和 GitHub 上完全通用,主要区别在于仓库 URL 格式和部分 Web 界面功能。
|
||||
41
mengyanote-backend/data/mengyanote/Git/Git提交临时禁用https.md
Normal file
41
mengyanote-backend/data/mengyanote/Git/Git提交临时禁用https.md
Normal file
@@ -0,0 +1,41 @@
|
||||
在 Git 中临时禁用 HTTPS 证书认证(主要用于解决自签名证书、证书过期或不可信证书导致的连接问题),可以通过修改 Git 的 http.sslVerify 配置实现
|
||||
|
||||
### **1. 单次命令临时禁用(推荐)**
|
||||
在执行具体 Git 命令(如 clone、pull、push 等)时,通过 -c 参数临时指定禁用 SSL 验证,仅对当前命令生效:
|
||||
|
||||
```bash
|
||||
# 示例1:克隆仓库时临时禁用
|
||||
git clone -c http.sslVerify=false https://远程仓库地址.git
|
||||
# 示例2:拉取代码时临时禁用
|
||||
git pull -c http.sslVerify=false origin 分支名
|
||||
# 示例3:推送代码时临时禁用
|
||||
git push -c http.sslVerify=false origin 分支名
|
||||
```
|
||||
|
||||
### **2. 当前仓库临时禁用(有效期至手动恢复)**
|
||||
如果需要在当前仓库中临时禁用(多次操作生效),可修改当前仓库的局部配置:
|
||||
|
||||
```bash
|
||||
# 进入仓库目录后执行,禁用当前仓库的HTTPS证书验证
|
||||
git config http.sslVerify false
|
||||
# 此时执行 pull/push 等操作会跳过证书验证
|
||||
git pull origin 分支名
|
||||
```
|
||||
|
||||
**使用完毕后务必恢复验证**(避免长期暴露风险):
|
||||
|
||||
```bash
|
||||
# 恢复当前仓库的HTTPS证书验证(默认值)
|
||||
git config http.sslVerify true
|
||||
```
|
||||
|
||||
### **3. 全局临时禁用(不推荐,影响所有仓库)**
|
||||
如果需要对所有仓库临时禁用(不建议,风险较高),可修改全局配置:
|
||||
|
||||
```bash
|
||||
# 全局禁用(所有仓库生效)
|
||||
git config --global http.sslVerify false
|
||||
# 恢复全局默认设置
|
||||
git config --global http.sslVerify true
|
||||
```
|
||||
|
||||
52
mengyanote-backend/data/mengyanote/Git/Linux下使用git探索.md
Normal file
52
mengyanote-backend/data/mengyanote/Git/Linux下使用git探索.md
Normal file
@@ -0,0 +1,52 @@
|
||||
**修改全局代理为http1**
|
||||
```
|
||||
git config --global http.version HTTP/1.1
|
||||
```
|
||||
|
||||
**相当于 git fetch + git merge,会把远程最新提交合并到你当前分支。**
|
||||
```
|
||||
git pull
|
||||
```
|
||||
|
||||
**这会把你的本地提交临时“挪开”,先更新远程提交,然后再把你的提交放回去,避免多余的合并记录。**
|
||||
```
|
||||
git pull --rebase
|
||||
```
|
||||
|
||||
**如果只想下载最新提交但不合并**
|
||||
```
|
||||
git fetch
|
||||
```
|
||||
|
||||
**树萌芽GitHub仓库提交代码通用密钥:**
|
||||
```
|
||||
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
|
||||
```
|
||||
|
||||
### 1. 添加所有改动
|
||||
```
|
||||
git add .
|
||||
```
|
||||
### 2. 提交,写上提交说明
|
||||
```
|
||||
git commit -m "更新说明"
|
||||
```
|
||||
### 3. 推送到远程仓库(假设分支是 main)
|
||||
```
|
||||
git push origin main
|
||||
```
|
||||
|
||||
|
||||
**压缩成一条命令实现:**
|
||||
```
|
||||
git add . && git commit -m "update" && git push origin main
|
||||
```
|
||||
|
||||
**或者设置命令别名,比如写进 ~/.bashrc 或 ~/.zshrc:**
|
||||
```
|
||||
alias gopush='git add . && git commit -m "update" && git push origin main'
|
||||
```
|
||||
|
||||
|
||||
注意:校园网可能会屏蔽梯子,必要时开热点提交
|
||||
|
||||
111
mengyanote-backend/data/mengyanote/Git/linux常用git命令.md
Normal file
111
mengyanote-backend/data/mengyanote/Git/linux常用git命令.md
Normal file
@@ -0,0 +1,111 @@
|
||||
下面给你整理了一份 **Linux 下常用的 Git 命令速查表**,涵盖从初始化到协作的常见操作:
|
||||
|
||||
---
|
||||
|
||||
## 🔹 基础配置
|
||||
|
||||
```bash
|
||||
git config --global user.name "你的名字" # 设置用户名
|
||||
git config --global user.email "你的邮箱" # 设置邮箱
|
||||
git config --global core.editor "vim" # 设置默认编辑器
|
||||
git config --list # 查看当前配置
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔹 仓库初始化与克隆
|
||||
|
||||
```bash
|
||||
git init # 初始化一个本地仓库
|
||||
git clone <repo_url> # 克隆远程仓库
|
||||
git clone <repo_url> myproj # 克隆并重命名文件夹
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔹 文件操作
|
||||
|
||||
```bash
|
||||
git status # 查看仓库当前状态
|
||||
git add <file> # 添加文件到暂存区
|
||||
git add . # 添加所有修改到暂存区
|
||||
git reset <file> # 从暂存区撤销已添加的文件
|
||||
git rm <file> # 删除文件并记录到暂存区
|
||||
git mv old new # 重命名文件并记录到暂存区
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔹 提交相关
|
||||
|
||||
```bash
|
||||
git commit -m "说明" # 提交暂存区到仓库
|
||||
git commit -am "说明" # 添加修改并提交(跳过 git add)
|
||||
git log # 查看提交历史
|
||||
git log --oneline --graph # 图形化查看分支提交记录
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔹 分支操作
|
||||
|
||||
```bash
|
||||
git branch # 查看分支
|
||||
git branch <name> # 创建分支
|
||||
git checkout <name> # 切换分支
|
||||
git checkout -b <name> # 新建并切换分支
|
||||
git merge <name> # 合并分支到当前分支
|
||||
git branch -d <name> # 删除分支
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔹 远程仓库
|
||||
|
||||
```bash
|
||||
git remote -v # 查看远程仓库地址
|
||||
git remote add origin <url> # 添加远程仓库
|
||||
git remote remove origin # 删除远程仓库
|
||||
git push origin master # 推送 master 分支到远程
|
||||
git push -u origin <branch> # 推送并设置默认分支
|
||||
git pull origin master # 拉取远程更新并合并
|
||||
git fetch origin # 抓取远程分支(不合并)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔹 回退与撤销
|
||||
|
||||
```bash
|
||||
git checkout -- <file> # 撤销工作区修改
|
||||
git reset HEAD <file> # 取消暂存区文件
|
||||
git reset --hard HEAD~1 # 回退到上一个提交
|
||||
git revert <commit_id> # 撤销指定提交,生成新提交
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔹 标签管理
|
||||
|
||||
```bash
|
||||
git tag # 查看标签
|
||||
git tag v1.0 # 打标签
|
||||
git tag -a v1.0 -m "说明" # 创建附注标签
|
||||
git push origin v1.0 # 推送标签到远程
|
||||
git push origin --tags # 推送所有标签
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔹 常用技巧
|
||||
|
||||
```bash
|
||||
git stash # 临时保存修改
|
||||
git stash pop # 恢复最近一次保存
|
||||
git diff # 查看未暂存的修改
|
||||
git diff --cached # 查看已暂存的修改
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
||||
125
mengyanote-backend/data/mengyanote/Git/修改hosts方式来直连Github.md
Normal file
125
mengyanote-backend/data/mengyanote/Git/修改hosts方式来直连Github.md
Normal file
@@ -0,0 +1,125 @@
|
||||
通过修改 hosts 文件来直连 GitHub,是解决国内访问 GitHub 时连接不稳定、速度慢甚至无法访问的有效方法。其原理是绕过 DNS 解析,直接将 GitHub 的主要域名指向其真实、稳定的 IP 地址
|
||||
|
||||
#### 核心原理
|
||||
|
||||
当你在浏览器输入 github.com 时,系统会先查询 DNS 服务器来获取对应的 IP 地址。由于网络环境问题,这个查询过程可能失败或返回不理想的 IP。修改 hosts 文件就是手动在本地建立“域名 -> IP”的映射关系,跳过不可靠的 DNS 查询,直达目标服务器。
|
||||
|
||||
---
|
||||
|
||||
#### 方法一:手动查找并更新(推荐用于理解过程)
|
||||
|
||||
##### 第一步:获取最新的 GitHub IP 地址
|
||||
|
||||
IP 地址会变化,所以不能一直用网上搜到的老旧 IP。你需要自己查询最新的。
|
||||
|
||||
1. 访问 IPAddress.com 网站查询以下关键域名的当前 IP 地址。
|
||||
2. 需要查询的域名包括:
|
||||
· github.com
|
||||
· assets-cdn.github.com
|
||||
· github.global.ssl.fastly.net
|
||||
· codeload.github.com
|
||||
· gist.github.com
|
||||
3. 查询方法:
|
||||
· 打开 https://www.ipaddress.com/
|
||||
· 在搜索框中分别输入每个域名进行查询。
|
||||
· 在结果页面中找到对应的 IP 地址(通常是 A Record 或 AAAA Record)。例如,查询 github.com 可能会得到 140.82.113.4(这是一个示例,请以你查询到的为准)。
|
||||
注意:github.global.ssl.fastly.net 可能是一个 CDN 域名,有时会解析出多个 IP,选择一个延迟较低的即可。对于 assets-cdn.github.com,它可能指向多个 CloudFront 地址,也选择一个稳定的 IP。
|
||||
|
||||
##### 第二步:修改 hosts 文件
|
||||
|
||||
hosts 文件位于系统的特定位置,修改需要管理员权限。
|
||||
|
||||
###### Windows 系统:
|
||||
|
||||
1. hosts 文件路径:C:\Windows\System32\drivers\etc\hosts
|
||||
2. 在开始菜单搜索 “记事本”,右键点击,选择 “以管理员身份运行”。
|
||||
3. 在记事本中,点击 文件 -> 打开,导航到 C:\Windows\System32\drivers\etc,将文件类型改为“所有文件 ( . )”,就能看到 hosts 文件,选择它打开。
|
||||
4. 在文件末尾,添加如下格式的内容(将 IP地址 替换为你第一步查到的真实 IP):
|
||||
```bash
|
||||
# GitHub Start
|
||||
140.82.113.4 github.com
|
||||
185.199.108.153 assets-cdn.github.com
|
||||
151.101.65.194 github.global.ssl.fastly.net
|
||||
140.82.114.9 codeload.github.com
|
||||
140.82.113.5 gist.github.com
|
||||
# GitHub End
|
||||
```
|
||||
注意:IP 和域名之间用空格或制表符隔开。# 开头的是注释,方便管理。
|
||||
5. 保存文件。如果无法直接保存,可以先将文件另存到桌面,修改后再拖回原目录覆盖。
|
||||
|
||||
###### macOS / Linux 系统:
|
||||
|
||||
1. 打开终端(Terminal)。
|
||||
2. 使用 sudo 权限编辑 hosts 文件:
|
||||
```bash
|
||||
sudo nano /etc/hosts
|
||||
```
|
||||
输入你的电脑密码。
|
||||
3. 光标移动到最后,同样添加上述格式的内容。
|
||||
4. 按下 Ctrl + O 写入保存,再按 Ctrl + X 退出 nano 编辑器。
|
||||
|
||||
##### 第三步:刷新 DNS 缓存
|
||||
|
||||
修改 hosts 后,需要清除系统旧的 DNS 缓存才能使新设置生效。
|
||||
|
||||
· Windows: 以管理员身份打开命令提示符(CMD 或 PowerShell),输入:
|
||||
```cmd
|
||||
ipconfig /flushdns
|
||||
```
|
||||
· macOS: 在终端输入:
|
||||
```bash
|
||||
sudo killall -HUP mDNSResponder
|
||||
```
|
||||
对于不同版本的 macOS,命令可能略有不同,如 sudo dscacheutil -flushcache。
|
||||
· Linux: 根据发行版不同,命令可能不同。常见的是:
|
||||
```bash
|
||||
sudo systemctl restart nscd
|
||||
或
|
||||
sudo /etc/init.d/networking restart
|
||||
```
|
||||
|
||||
##### 第四步:测试连接
|
||||
|
||||
1. 打开命令提示符或终端,ping 一下域名,看是否解析到你设置的 IP:
|
||||
```bash
|
||||
ping github.com
|
||||
```
|
||||
2. 直接打开浏览器访问 github.com,看是否能正常加载。
|
||||
|
||||
---
|
||||
|
||||
#### 方法二:使用开源工具自动更新(更省心)
|
||||
|
||||
手动更新比较麻烦,推荐使用开源工具 SwitchHosts,它可以自动从远程获取最新的 hosts 规则并应用。
|
||||
|
||||
1. 下载 SwitchHosts:
|
||||
· 访问其 GitHub 发布页:https://github.com/oldj/SwitchHosts/releases
|
||||
· 下载对应你操作系统的版本(如 SwitchHosts_windows_arch.exe)。
|
||||
2. 配置远程规则:
|
||||
· 打开 SwitchHosts,点击 “+” 添加一个新规则。
|
||||
· 选择 “远程”。
|
||||
· 在规则名中填写 GitHub Hosts。
|
||||
· 在 URL 地址中填入一个持续更新的 hosts 源,例如:
|
||||
· ineo6/hosts(推荐): https://gitee.com/ineo6/hosts/raw/master/hosts
|
||||
· 或者其他在 GitHub/Gitee 上维护的知名 hosts 项目。
|
||||
· 设置自动刷新时间(如 1 小时)。
|
||||
· 点击 “确定” 保存。
|
||||
3. 启用规则:
|
||||
· 在 SwitchHosts 主界面,点击你刚添加的 GitHub Hosts 规则旁边的开关,将其启用(变为绿色)。
|
||||
· 软件可能会请求管理员权限,同意即可。
|
||||
|
||||
此后,SwitchHosts 会自动定期从你设置的 URL 拉取最新的 GitHub IP 地址并更新你的 hosts 文件,无需你再手动操作。
|
||||
|
||||
常见问题与解决
|
||||
|
||||
· 修改后仍无法访问?
|
||||
· 检查 IP 是否正确: 你使用的 IP 可能已经过期。请重新用 IPAddress.com 查询或使用 SwitchHosts。
|
||||
· 检查 hosts 文件格式: 确保 IP 和域名之间只有空格,没有多余字符。
|
||||
· 彻底清除浏览器缓存和 DNS 缓存: 关闭浏览器再重新打开,并再次执行 ipconfig /flushdns。
|
||||
· 尝试 HTTPS 访问: 有些工具会劫持 HTTP 请求,直接访问 https://github.com。
|
||||
· 安全性问题?
|
||||
· 手动从 IPAddress.com 查询是安全的。
|
||||
· 使用 SwitchHosts 时,请确保你使用的远程规则源是可信的(如上述推荐的 Gitee 源,访问速度较快)。
|
||||
· 修改 hosts 是永久解决方案吗?
|
||||
· 不是永久的。因为 GitHub 的服务器 IP 可能会变更。一旦变更,旧的映射就会失效。这就是为什么推荐使用 SwitchHosts 这类工具来自动更新。
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user