/* THIS IS A GENERATED/BUNDLED FILE BY ESBUILD if you want to view the source, please visit the github repository of this plugin */ var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // main.ts var main_exports = {}; __export(main_exports, { DEFAULT_SETTINGS: () => DEFAULT_SETTINGS, default: () => PackratPlugin }); module.exports = __toCommonJS(main_exports); var import_obsidian = 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 { async onload() { console.log("Packrat: Loading..."); await this.loadSettings(); this.addSettingTab(new PackratSettingTab(this.app, this)); this.addCommand({ // (to the Command Palette) 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..."); } async loadSettings() { this.settings = Object.assign({}, DEFAULT_SETTINGS, await this.loadData()); } async saveSettings() { await this.saveData(this.settings); } async ProcessCompletedRecurringTasks(activeFile) { try { const { vault } = this.app; const rruleSignifier = "\u{1F501}".normalize(); const dv_rruleSignifier = "[repeat::"; 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) || await vault.create(archiveFilename, ""); let deletedTaskCount = 0; let movedTaskCount = 0; let archivedTaskCount = 0; let thisLine = ""; let writebackLines = []; let appendLines = []; let archiveLines = []; let results = []; let fileContents = await vault.read(activeFile); fileContents = fileContents.split("\n"); for (let i = 0; i < fileContents.length; i++) { thisLine = fileContents[i]; let firstFive = thisLine.trim().substring(0, 5).toUpperCase(); if (firstFive === "- [X]" && (thisLine.indexOf(rruleSignifier) != -1 || thisLine.indexOf(dv_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 = await 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(async (value) => { console.log("deletion_trigger: " + value); this.plugin.settings.deletion_trigger = value; await 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(async (value) => { console.log("bottom_trigger: " + value); this.plugin.settings.bottom_trigger = value; await 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(async (value) => { console.log("archive_trigger: " + value); this.plugin.settings.archive_trigger = value; await 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(async (value) => { console.log("archive_filepath: " + value); this.plugin.settings.archive_filepath = value; await this.plugin.saveSettings(); })); } }; //# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsibWFpbi50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiaW1wb3J0IHsgQXBwLCBOb3RpY2UsIFBsdWdpbiwgUGx1Z2luU2V0dGluZ1RhYiwgU2V0dGluZywgVEZpbGUgfSBmcm9tICdvYnNpZGlhbic7XHJcblxyXG5leHBvcnQgaW50ZXJmYWNlIFBhY2tyYXRTZXR0aW5ncyB7XHJcblx0ZGVsZXRpb25fdHJpZ2dlcjogc3RyaW5nO1xyXG5cdGJvdHRvbV90cmlnZ2VyOiBzdHJpbmc7XHJcblx0YXJjaGl2ZV90cmlnZ2VyOiBzdHJpbmc7XHJcblx0YXJjaGl2ZV9maWxlcGF0aDogc3RyaW5nO1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