vault backup: 2022-12-12 22:43:22

This commit is contained in:
Bram Adams
2022-12-12 22:43:22 -06:00
parent 21107d4bdc
commit 87c9e86979
29 changed files with 2622 additions and 602 deletions

View File

@@ -61,6 +61,7 @@ var DEFAULT_SETTINGS = {
waypointFlag: "%% Waypoint %%",
stopScanAtFolderNotes: false,
showFolderNotes: false,
showNonMarkdownFiles: false,
debugLogging: false,
useWikiLinks: true,
showEnclosingNote: false,
@@ -223,12 +224,19 @@ ${_Waypoint.END_WAYPOINT}`;
return __async(this, null, function* () {
const bullet = " ".repeat(indentLevel) + "-";
if (node instanceof import_obsidian.TFile) {
if (node.path.endsWith(".md")) {
console.log(node);
if (node.extension == "md") {
if (this.settings.useWikiLinks) {
return `${bullet} [[${node.basename}]]`;
} else {
return `${bullet} [${node.basename}](${this.getEncodedUri(rootNode, node)})`;
}
} else if (this.settings.showNonMarkdownFiles) {
if (this.settings.useWikiLinks) {
return `${bullet} [[${node.name}]]`;
} else {
return `${bullet} [${node.name}](${this.getEncodedUri(rootNode, node)})`;
}
}
return null;
} else if (node instanceof import_obsidian.TFolder) {
@@ -368,6 +376,10 @@ var WaypointSettingsTab = class extends import_obsidian.PluginSettingTab {
this.plugin.settings.showFolderNotes = value;
yield this.plugin.saveSettings();
})));
new import_obsidian.Setting(containerEl).setName("Show Non-Markdown Files").setDesc("If enabled, non-Markdown files will be listed alongside other notes in the generated waypoints.").addToggle((toggle) => toggle.setValue(this.plugin.settings.showNonMarkdownFiles).onChange((value) => __async(this, null, function* () {
this.plugin.settings.showNonMarkdownFiles = value;
yield this.plugin.saveSettings();
})));
new import_obsidian.Setting(containerEl).setName("Show Enclosing Note").setDesc("If enabled, the name of the folder note containing the waypoint will be listed at the top of the generated waypoints.").addToggle((toggle) => toggle.setValue(this.plugin.settings.showEnclosingNote).onChange((value) => __async(this, null, function* () {
this.plugin.settings.showEnclosingNote = value;
yield this.plugin.saveSettings();