Clean up some debug commands
This commit is contained in:
parent
2a4ea9b3e1
commit
5f90d7244a
@ -41,6 +41,7 @@ functions:
|
||||
path: "./page.ts:deletePage"
|
||||
command:
|
||||
name: "Page: Delete"
|
||||
|
||||
# Backlinks
|
||||
indexLinks:
|
||||
path: "./page.ts:indexLinks"
|
||||
@ -138,7 +139,14 @@ functions:
|
||||
path: "./template.ts:insertTemplateText"
|
||||
slashCommand:
|
||||
name: task
|
||||
description: Insert a task
|
||||
value: "* [ ] |^|"
|
||||
insertTaskToday:
|
||||
path: "./template.ts:insertTemplateText"
|
||||
slashCommand:
|
||||
name: task-today
|
||||
description: Insert a task with today as the deadline
|
||||
value: "* [ ] |^| 📅 {{today}}"
|
||||
insertQuery:
|
||||
path: "./template.ts:insertTemplateText"
|
||||
slashCommand:
|
||||
@ -147,11 +155,6 @@ functions:
|
||||
<!-- #query |^| -->
|
||||
|
||||
<!-- /query -->
|
||||
insertTaskToday:
|
||||
path: "./template.ts:insertTemplateText"
|
||||
slashCommand:
|
||||
name: task-today
|
||||
value: "* [ ] |^| 📅 {{today}}"
|
||||
quickNoteCommand:
|
||||
path: ./template.ts:quickNoteCommand
|
||||
command:
|
||||
@ -187,7 +190,7 @@ functions:
|
||||
path: ./text.ts:quoteSelection
|
||||
command:
|
||||
name: "Text: Quote Selection"
|
||||
key: "Ctrl->"
|
||||
key: "Ctrl-Shift-."
|
||||
mac: "Cmd-Shift-."
|
||||
listifySelection:
|
||||
path: ./text.ts:listifySelection
|
||||
@ -238,12 +241,6 @@ functions:
|
||||
- get-plug:github
|
||||
|
||||
# Debug commands
|
||||
parseServerCommand:
|
||||
path: ./debug.ts:parseServerPageCommand
|
||||
command:
|
||||
name: "Debug: Parse Document on Server"
|
||||
parsePage:
|
||||
path: ./debug.ts:parsePage
|
||||
parseCommand:
|
||||
path: ./debug.ts:parsePageCommand
|
||||
command:
|
||||
|
@ -8,16 +8,11 @@ import { parseMarkdown } from "@silverbulletmd/plugos-silverbullet-syscall/markd
|
||||
import { getServerLogs } from "@silverbulletmd/plugos-silverbullet-syscall/sandbox";
|
||||
import { invokeFunction } from "@silverbulletmd/plugos-silverbullet-syscall/system";
|
||||
|
||||
export async function parseServerPageCommand() {
|
||||
console.log(await invokeFunction("server", "parsePage", await getText()));
|
||||
}
|
||||
|
||||
export async function parsePageCommand() {
|
||||
parsePage(await getText());
|
||||
}
|
||||
|
||||
export async function parsePage(text: string) {
|
||||
console.log("AST", JSON.stringify(await parseMarkdown(text), null, 2));
|
||||
console.log(
|
||||
"AST",
|
||||
JSON.stringify(await parseMarkdown(await getText()), null, 2)
|
||||
);
|
||||
}
|
||||
|
||||
export async function showLogsCommand() {
|
||||
|
Loading…
Reference in New Issue
Block a user