/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __markAsModule = (target) => __defProp(target, "__esModule", { value: true }); var __export = (target, all) => { __markAsModule(target); for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __reExport = (target, module2, desc) => { if (module2 && typeof module2 === "object" || typeof module2 === "function") { for (let key of __getOwnPropNames(module2)) if (!__hasOwnProp.call(target, key) && key !== "default") __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable }); } return target; }; var __toModule = (module2) => { return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2); }; var __async = (__this, __arguments, generator) => { return new Promise((resolve, reject) => { var fulfilled = (value) => { try { step(generator.next(value)); } catch (e) { reject(e); } }; var rejected = (value) => { try { step(generator.throw(value)); } catch (e) { reject(e); } }; var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected); step((generator = generator.apply(__this, __arguments)).next()); }); }; // main.ts __export(exports, { DEFAULT_SETTINGS: () => DEFAULT_SETTINGS, default: () => PackratPlugin }); var import_obsidian = __toModule(require("obsidian")); var DEFAULT_SETTINGS = { deletion_trigger: "%%done_del%%", bottom_trigger: "%%done_end%%", archive_trigger: "%%done_log%%", archive_filepath: "archive.md" }; var PackratPlugin = class extends import_obsidian.Plugin { onload() { return __async(this, null, function* () { console.log("Packrat: Loading..."); yield this.loadSettings(); this.addSettingTab(new PackratSettingTab(this.app, this)); this.addCommand({ id: "run", name: "Process completed recurring Tasks within the active note", checkCallback: (checking) => { const { workspace } = this.app; const activeFile = workspace.getActiveFile(); if (activeFile && activeFile.extension == "md") { if (checking) { return true; } this.ProcessCompletedRecurringTasks(activeFile); } else { return false; } } }); }); } onunload() { console.log("Packrat: Unloading..."); } loadSettings() { return __async(this, null, function* () { this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData()); }); } saveSettings() { return __async(this, null, function* () { yield this.saveData(this.settings); }); } ProcessCompletedRecurringTasks(activeFile) { return __async(this, null, function* () { try { const { vault } = this.app; const rruleSignifier = "\u{1F501}".normalize(); const deleteTrigger = this.settings.deletion_trigger; const archiveTrigger = this.settings.archive_trigger; const bottomTrigger = this.settings.bottom_trigger; const archiveFilename = this.settings.archive_filepath; const archiveFile = vault.getAbstractFileByPath(archiveFilename) || (yield vault.create(archiveFilename, "")); let deletedTaskCount = 0; let movedTaskCount = 0; let archivedTaskCount = 0; let thisLine = ""; let writebackLines = []; let appendLines = []; let archiveLines = []; let results = []; let fileContents = yield vault.read(activeFile); fileContents = fileContents.split("\n"); for (let i = 0; i < fileContents.length; i++) { thisLine = fileContents[i]; let firstFive = thisLine.substring(0, 5).toUpperCase(); if (firstFive === "- [X]" && thisLine.indexOf(rruleSignifier) != -1) { if (0 < thisLine.indexOf(deleteTrigger)) { deletedTaskCount += 1; continue; } if (0 < thisLine.indexOf(archiveTrigger)) { archiveLines.push(thisLine); archivedTaskCount += 1; continue; } if (0 < thisLine.indexOf(bottomTrigger)) { appendLines.push(thisLine); movedTaskCount += 1; continue; } writebackLines.push(thisLine); } else { writebackLines.push(thisLine); } } if (archivedTaskCount > 0) { let archiveFileContents = yield vault.read(archiveFile); archiveFileContents = archiveFileContents.split("\n"); archiveFileContents = archiveFileContents.concat(archiveLines); vault.modify(archiveFile, archiveFileContents.join("\n")); } results = writebackLines.concat(appendLines); vault.modify(activeFile, results.join("\n")); var tdMsg = `${deletedTaskCount} tasks deleted `; var tmMsg = `${movedTaskCount} tasks moved to end of note `; var taMsg = `${archivedTaskCount} tasks archived `; const noticeText = tdMsg + tmMsg + taMsg; new import_obsidian.Notice(noticeText); } catch (err) { new import_obsidian.Notice(err); console.log(err); return; } }); } }; var PackratSettingTab = class extends import_obsidian.PluginSettingTab { constructor(app, plugin) { super(app, plugin); this.defaultDeletionTrigger = "%%done_del%%"; this.defaultBottomTrigger = "%%done_move%%"; this.defaultArchiveTrigger = "%%done_log%%"; this.defaultArchiveFilepath = "logfile.md"; this.plugin = plugin; } display() { const { containerEl } = this; containerEl.empty(); containerEl.createEl("h2", { text: "Packrat plugin settings" }); new import_obsidian.Setting(containerEl).setName("Deletion trigger").setDesc("Text to trigger deletion of completed recurring Task instance").addText((text) => text.setPlaceholder(this.defaultDeletionTrigger).setValue(this.plugin.settings.deletion_trigger).onChange((value) => __async(this, null, function* () { console.log("deletion_trigger: " + value); this.plugin.settings.deletion_trigger = value; yield this.plugin.saveSettings(); }))); new import_obsidian.Setting(containerEl).setName('"Move to end of file" trigger').setDesc("Text to trigger moving completed recurring Task instance to bottom of Active note").addText((text) => text.setPlaceholder(this.defaultbottomTrigger).setValue(this.plugin.settings.bottom_trigger).onChange((value) => __async(this, null, function* () { console.log("bottom_trigger: " + value); this.plugin.settings.bottom_trigger = value; yield this.plugin.saveSettings(); }))); new import_obsidian.Setting(containerEl).setName("Archive trigger").setDesc("Text to trigger moving completed recurring Task instance to archive note").addText((text) => text.setPlaceholder(this.defaultarchiveTrigger).setValue(this.plugin.settings.archive_trigger).onChange((value) => __async(this, null, function* () { console.log("archive_trigger: " + value); this.plugin.settings.archive_trigger = value; yield this.plugin.saveSettings(); }))); new import_obsidian.Setting(containerEl).setName("Archive file").setDesc('Relative filepath to archive file (include ".md" extension)').addText((text) => text.setPlaceholder(this.defaultArchiveFilepath).setValue(this.plugin.settings.archive_filepath).onChange((value) => __async(this, null, function* () { console.log("archive_filepath: " + value); this.plugin.settings.archive_filepath = value; yield this.plugin.saveSettings(); }))); } }; //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsibWFpbi50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