From 10251de71c149cd1ca16179fe7397fc2eb284da7 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Wed, 28 Sep 2022 13:18:37 +0200 Subject: [PATCH] added timestamp format setting --- README.md | 1 - src/main.ts | 2 +- src/settings-tab.ts | 18 +++++++++++-- src/settings.ts | 4 ++- src/tracker.ts | 7 ++--- .../obsidian-simple-time-tracker/data.json | 3 +++ .../obsidian-simple-time-tracker/main.js | 26 ++++++++++++++----- 7 files changed, 46 insertions(+), 15 deletions(-) create mode 100644 test-vault/.obsidian/plugins/obsidian-simple-time-tracker/data.json diff --git a/README.md b/README.md index 9609af9..095347c 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,6 @@ The tracker's information is stored in the code block as JSON data. The names, s # 🛣️ Roadmap Super Simple Time Tracker is still in its early stages! There are a lot of plans for it, including: -- A setting to allow users to decide what format timestamps should be displayed in - A setting to link segments to corresponding daily notes automatically - A neat interface to edit previous segments' names and time stamps - The ability to copy the table in various formats, including as text, markdown, and csv diff --git a/src/main.ts b/src/main.ts index 7b8a8ee..2918211 100644 --- a/src/main.ts +++ b/src/main.ts @@ -15,7 +15,7 @@ export default class SimpleTimeTrackerPlugin extends Plugin { this.registerMarkdownCodeBlockProcessor("simple-time-tracker", (s, e, i) => { let tracker = loadTracker(s); e.empty(); - displayTracker(tracker, e, () => i.getSectionInfo(e)); + displayTracker(tracker, e, () => i.getSectionInfo(e), this.settings); }); this.addCommand({ diff --git a/src/settings-tab.ts b/src/settings-tab.ts index b9fad76..05f5398 100644 --- a/src/settings-tab.ts +++ b/src/settings-tab.ts @@ -1,5 +1,6 @@ -import { App, PluginSettingTab } from "obsidian"; +import { App, PluginSettingTab, Setting } from "obsidian"; import SimpleTimeTrackerPlugin from "./main"; +import { defaultSettings } from "./settings"; export class SimpleTimeTrackerSettingsTab extends PluginSettingTab { @@ -14,7 +15,20 @@ export class SimpleTimeTrackerSettingsTab extends PluginSettingTab { this.containerEl.empty(); this.containerEl.createEl("h2", { text: "Super Simple Time Tracker Settings" }); - this.containerEl.createEl("p", { text: "Settings coming soon!" }); + new Setting(this.containerEl) + .setName("Timestamp Display Format") + .setDesc(createFragment(f => { + f.createSpan({ text: "The way that timestamps in time tracker tables should be displayed. Uses " }); + f.createEl("a", { text: "moment.js", href: "https://momentjs.com/docs/#/parsing/string-format/" }); + f.createSpan({ text: " syntax. Clear to reset to default." }); + })) + .addText(t => { + t.setValue(String(this.plugin.settings.timestampFormat)); + t.onChange(async v => { + this.plugin.settings.timestampFormat = v.length ? v : defaultSettings.timestampFormat; + await this.plugin.saveSettings(); + }); + }); this.containerEl.createEl("hr"); this.containerEl.createEl("p", { text: "If you like this plugin and want to support its development, you can do so through my website by clicking this fancy image!" }); diff --git a/src/settings.ts b/src/settings.ts index e0eb31a..35256e1 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -1,7 +1,9 @@ export const defaultSettings: SimpleTimeTrackerSettings = { - + timestampFormat: "YY-MM-DD hh:mm:ss" }; export interface SimpleTimeTrackerSettings { + timestampFormat: string; + } diff --git a/src/tracker.ts b/src/tracker.ts index 3558e0e..f5f95fe 100644 --- a/src/tracker.ts +++ b/src/tracker.ts @@ -1,4 +1,5 @@ import { moment, App, MarkdownSectionInformation, ButtonComponent, TextComponent } from "obsidian"; +import { SimpleTimeTrackerSettings } from "./settings"; export class Tracker { entries: Entry[]; @@ -52,7 +53,7 @@ export function loadTracker(json: string): Tracker { return { entries: [] }; } -export function displayTracker(tracker: Tracker, element: HTMLElement, getSectionInfo: () => MarkdownSectionInformation): void { +export function displayTracker(tracker: Tracker, element: HTMLElement, getSectionInfo: () => MarkdownSectionInformation, settings: SimpleTimeTrackerSettings): void { // add start/stop controls let running = isRunning(tracker); let btn = new ButtonComponent(element) @@ -92,9 +93,9 @@ export function displayTracker(tracker: Tracker, element: HTMLElement, getSectio for (let entry of tracker.entries) { let row = table.createEl("tr"); row.createEl("td", { text: entry.name }); - row.createEl("td", { text: moment.unix(entry.startTime).format("YY-MM-DD hh:mm:ss") }); + row.createEl("td", { text: moment.unix(entry.startTime).format(settings.timestampFormat) }); if (entry.endTime) { - row.createEl("td", { text: moment.unix(entry.endTime).format("YY-MM-DD hh:mm:ss") }); + row.createEl("td", { text: moment.unix(entry.endTime).format(settings.timestampFormat) }); let duration = moment.unix(entry.endTime).diff(moment.unix(entry.startTime)); row.createEl("td", { text: getCountdownDisplay(moment.duration(duration)) }); } diff --git a/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/data.json b/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/data.json new file mode 100644 index 0000000..3a84795 --- /dev/null +++ b/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/data.json @@ -0,0 +1,3 @@ +{ + "timestampFormat": "YY-MM-DD hh:mm:ss" +} \ No newline at end of file diff --git a/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/main.js b/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/main.js index ae9c74b..d042e68 100644 --- a/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/main.js +++ b/test-vault/.obsidian/plugins/obsidian-simple-time-tracker/main.js @@ -53,7 +53,9 @@ __export(exports, { var import_obsidian3 = __toModule(require("obsidian")); // src/settings.ts -var defaultSettings = {}; +var defaultSettings = { + timestampFormat: "YY-MM-DD hh:mm:ss" +}; // src/settings-tab.ts var import_obsidian = __toModule(require("obsidian")); @@ -65,7 +67,17 @@ var SimpleTimeTrackerSettingsTab = class extends import_obsidian.PluginSettingTa display() { this.containerEl.empty(); this.containerEl.createEl("h2", { text: "Super Simple Time Tracker Settings" }); - this.containerEl.createEl("p", { text: "Settings coming soon!" }); + new import_obsidian.Setting(this.containerEl).setName("Timestamp Display Format").setDesc(createFragment((f) => { + f.createSpan({ text: "The way that timestamps in time tracker tables should be displayed. Uses " }); + f.createEl("a", { text: "moment.js", href: "https://momentjs.com/docs/#/parsing/string-format/" }); + f.createSpan({ text: " syntax. Clear to reset to default." }); + })).addText((t) => { + t.setValue(String(this.plugin.settings.timestampFormat)); + t.onChange((v) => __async(this, null, function* () { + this.plugin.settings.timestampFormat = v.length ? v : defaultSettings.timestampFormat; + yield this.plugin.saveSettings(); + })); + }); this.containerEl.createEl("hr"); this.containerEl.createEl("p", { text: "If you like this plugin and want to support its development, you can do so through my website by clicking this fancy image!" }); this.containerEl.createEl("a", { href: "https://ellpeck.de/support" }).createEl("img", { attr: { src: "https://ellpeck.de/res/generalsupport.png" }, cls: "simple-time-tracker-support" }); @@ -111,7 +123,7 @@ function loadTracker(json) { } return { entries: [] }; } -function displayTracker(tracker, element, getSectionInfo) { +function displayTracker(tracker, element, getSectionInfo, settings) { let running = isRunning(tracker); let btn = new import_obsidian2.ButtonComponent(element).setButtonText(running ? "End" : "Start").onClick(() => __async(this, null, function* () { if (running) { @@ -137,9 +149,9 @@ function displayTracker(tracker, element, getSectionInfo) { for (let entry of tracker.entries) { let row = table.createEl("tr"); row.createEl("td", { text: entry.name }); - row.createEl("td", { text: import_obsidian2.moment.unix(entry.startTime).format("YY-MM-DD hh:mm:ss") }); + row.createEl("td", { text: import_obsidian2.moment.unix(entry.startTime).format(settings.timestampFormat) }); if (entry.endTime) { - row.createEl("td", { text: import_obsidian2.moment.unix(entry.endTime).format("YY-MM-DD hh:mm:ss") }); + row.createEl("td", { text: import_obsidian2.moment.unix(entry.endTime).format(settings.timestampFormat) }); let duration = import_obsidian2.moment.unix(entry.endTime).diff(import_obsidian2.moment.unix(entry.startTime)); row.createEl("td", { text: getCountdownDisplay(import_obsidian2.moment.duration(duration)) }); } @@ -189,7 +201,7 @@ var SimpleTimeTrackerPlugin = class extends import_obsidian3.Plugin { this.registerMarkdownCodeBlockProcessor("simple-time-tracker", (s, e, i) => { let tracker = loadTracker(s); e.empty(); - displayTracker(tracker, e, () => i.getSectionInfo(e)); + displayTracker(tracker, e, () => i.getSectionInfo(e), this.settings); }); this.addCommand({ id: `insert-simple-time-tracker`, @@ -211,4 +223,4 @@ var SimpleTimeTrackerPlugin = class extends import_obsidian3.Plugin { }); } }; -//# source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XdhaXQgYXBwLnZhdWx0Lm1vZGlmeShmaWxlLCBjb250ZW50KTtcclxufVxyXG5cclxuZXhwb3J0IGZ1bmN0aW9uIGxvYWRUcmFja2VyKGpzb246IHN0cmluZyk6IFRyYWNrZXIge1xyXG4gICAgaWYgKGpzb24pIHtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICByZXR1cm4gSlNPTi5wYXJzZShqc29uKTtcclxuICAgICAgICB9IGNhdGNoIChlKSB7XHJcbiAgICAgICAgICAgIGNvbnNvbGUubG9nKGBGYWlsZWQgdG8gcGFyc2UgVHJhY2tlciBmcm9tICR7anNvbn1gKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICByZXR1cm4geyBlbnRyaWVzOiBbXSB9O1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gZGlzcGxheVRyYWNrZXIodHJhY2tlcjogVHJhY2tlciwgZWxlbWVudDogSFRNTEVsZW1lbnQsIGdldFNlY3Rpb25JbmZvOiAoKSA9PiBNYXJrZG93blNlY3Rpb25JbmZvcm1hdGlvbik6IHZvaWQge1xyXG4gICAgLy8gYWRkIHN0YXJ0L3N0b3AgY29udHJvbHNcclxuICAgIGxldCBydW5uaW5nID0gaXNSdW5uaW5nKHRyYWNrZXIpO1xyXG4gICAgbGV0IGJ0biA9IG5ldyBCdXR0b25Db21wb25lbnQoZWxlbWVudClcclxuICAgICAgICAuc2V0QnV0dG9uVGV4dChydW5uaW5nID8gXCJFbmRcIiA6IFwiU3RhcnRcIilcclxuICAgICAgICAub25DbGljayhhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgICAgIGlmIChydW5uaW5nKSB7XHJcbiAgICAgICAgICAgICAgICBlbmRFbnRyeSh0cmFja2VyKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHN0YXJ0RW50cnkodHJhY2tlciwgbmFtZS5nZXRWYWx1ZSgpKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICA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ygpID4gMClcclxuICAgICAgICByZXQgKz0gZHVyYXRpb24uaG91cnMoKSArIFwiaCBcIjtcclxuICAgIGlmIChkdXJhdGlvbi5taW51dGVzKCkgPiAwKVxyXG4gICAgICAgIHJldCArPSBkdXJhdGlvbi5taW51dGVzKCkgKyBcIm0gXCI7XHJcbiAgICByZXQgKz0gZHVyYXRpb24uc2Vjb25kcygpICsgXCJzXCI7XHJcbiAgICByZXR1cm4gcmV0O1xyXG59XHJcblxyXG5mdW5jdGlvbiBzZXRDb3VudGRvd25WYWx1ZXModHJhY2tlcjogVHJhY2tlciwgY3VycmVudDogSFRNTEVsZW1lbnQsIHRvdGFsOiBIVE1MRWxlbWVudCwgY3VycmVudERpdjogSFRNTERpdkVsZW1lbnQpIHtcclxuICAgIGxldCBjdXJyRW50cnkgPSB0cmFja2VyLmVudHJpZXMubGFzdCgpO1xyXG4gICAgaWYgKGN1cnJFbnRyeSkge1xyXG4gICAgICAgIGlmICghY3VyckVudHJ5LmVuZFRpbWUpIHtcclxuICAgICAgICAgICAgbGV0IGN1cnJEdXJhdGlvbiA9IG1vbWVudCgpLmRpZmYobW9tZW50LnVuaXgoY3VyckVudHJ5LnN0YXJ0VGltZSkpO1xyXG4gICAgICAgICAgICBjdXJyZW50LnNldFRleHQoZ2V0Q291bnRkb3duRGlzcGxheShtb21lbnQuZHVyYXRpb24oY3VyckR1cmF0aW9uKSkpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgbGV0IHRvdGFsRHVyYXRpb24gPSAwO1xyXG4gICAgICAgIGZvciAobGV0IGVudHJ5IG9mIHRyYWNrZXIuZW50cmllcykge1xyXG4gICAgICAgICAgICBsZXQgZW5kVGltZSA9IGVudHJ5LmVuZFRpbWUgPyBtb21lbnQudW5peChlbnRyeS5lbmRUaW1lKSA6IG1vbWVudCgpO1xyXG4gICAgICAgICAgICB0b3RhbER1cmF0aW9uICs9IGVuZFRpbWUuZGlmZihtb21lbnQudW5peChlbnRyeS5zdGFydFRpbW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QubW9kaWZ5KGZpbGUsIGNvbnRlbnQpO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gbG9hZFRyYWNrZXIoanNvbjogc3RyaW5nKTogVHJhY2tlciB7XHJcbiAgICBpZiAoanNvbikge1xyXG4gICAgICAgIHRyeSB7XHJcbiAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGpzb24pO1xyXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcclxuICAgICAgICAgICAgY29uc29sZS5sb2coYEZhaWxlZCB0byBwYXJzZSBUcmFja2VyIGZyb20gJHtqc29ufWApO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiB7IGVudHJpZXM6IFtdIH07XHJcbn1cclxuXHJcbmV4cG9ydCBmdW5jdGlvbiBkaXNwbGF5VHJhY2tlcih0cmFja2VyOiBUcmFja2VyLCBlbGVtZW50OiBIVE1MRWxlbWVudCwgZ2V0U2VjdGlvbkluZm86ICgpID0+IE1hcmtkb3duU2VjdGlvbkluZm9ybWF0aW9uLCBzZXR0aW5nczogU2ltcGxlVGltZVRyYWNrZXJTZXR0aW5ncyk6IHZvaWQge1xyXG4gICAgLy8gYWRkIHN0YXJ0L3N0b3AgY29udHJvbHNcclxuICAgIGxldCBydW5uaW5nID0gaXNSdW5uaW5nKHRyYWNrZXIpO1xyXG4gICAgbGV0IGJ0biA9IG5ldyBCdXR0b25Db21wb25lbnQoZWxlbWVudClcclxuICAgICAgICAuc2V0QnV0dG9uVGV4dChydW5uaW5nID8gXCJFbmRcIiA6IFwiU3RhcnRcIilcclxuICAgICAgICAub25DbGljayhhc3luYyAoKSA9PiB7XHJcbiAgICAgICAgICAgIGlmIChydW5uaW5nKSB7XHJcbiAgICAgICAgICAgICAgICBlbmRFbnRyeSh0cmFja2VyKTtcclxuICAgICAgICAgICAgfSBlbHNlIHtcclxuICAgICAgICAgICAgICAgIHN0YXJ0RW50cnkodHJhY2tlciwgbmFtZS5nZXRWYWx1ZSgpKTtccl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GltZSkge1xyXG4gICAgICAgICAgICAgICAgcm93LmNyZWF0ZUVsKFwidGRcIiwgeyB0ZXh0OiBtb21lbnQudW5peChlbnRyeS5lbmRUaW1lKS5mb3JtYXQoc2V0dGluZ3MudGltZXN0YW1wRm9ybWF0KSB9KTtcclxuICAgICAgICAgICAgICAgIGxldCBkdXJhdGlvbiA9IG1vbWVudC51bml4KGVudHJ5LmVuZFRpbWUpLmRpZmYobW9tZW50LnVuaXgoZW50cnkuc3RhcnRUaW1lKSk7XHJcbiAgICAgICAgICAgICAgICByb3cuY3JlYXRlRWwoXCJ0ZFwiLCB7IHRleHQ6IGdldENvdW50ZG93bkRpc3BsYXkobW9tZW50LmR1cmF0aW9uKGR1cmF0aW9uKSkgfSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgc2V0Q291bnRkb3duVmFsdWVzKHRyYWNrZXIsIGN1cnJlbnQsIHRvdGFsLCBjdXJyZW50RGl2KTtcclxuICAgIGxldCBpbnRlcnZhbElkID0gd2luZG93LnNldEludGVydmFsKCgpID0+IHtcclxuICAgICAgICAvLyB3ZSBkZWxldGUgdGhlIGludGVydmFsIHRpbWVyIHdoZW4gdGhlIGVsZW1lbnQgaXMgcmVtb3ZlZFxyXG4gICAgICAgIGlmICghZWxlbWVudC5pc0Nvbm5lY3RlZCkge1xyXG4gICAgICAgICAgICB3aW5kb3cuY2xlYXJJbnRlcnZhbChpbnRlcnZhbElkKTtcclxuICAgICAgICAgICAgcmV0dXJuO1xyXG4gICAgICAgIH1cclxuICAgICAgICBzZXRDb3VudGRvd25WYWx1ZXModHJhY2tlciwgY3VycmVudCwgdG90YWwsIGN1cnJlbnREaXYpO1xyXG4gICAgfSwgMTAwMCk7XHJcbn1cclxuXHJcbmZ1bmN0aW9uIGdldENvdW50ZG93bkRpc3BsYXkoZHVyYXRpb246IG1vbWVudC5EdXJhdGlvbik6IHN0cmluZyB7XHJcbiAgICBsZXQgcmV0ID0gXCJcIjtcclxuICAgIGlmIChkdXJhdGlvbi5ob3VycygpID4gMClcclxuICAgICAgICByZXQgKz0gZHVyYXRpb24uaG91cnMoKSArIFwiaCBcIjtcclxuICAgIGlmIChkdXJhdGlvbi5taW51dGVzKCkgPiAwKVxyXG4gICAgICAgIHJldCArPSBkdXJhdGlvbi5taW51dGVzKCkgKyBcIm0gXCI7XHJcbiAgICByZXQgKz0gZHVyYXRpb24uc2Vjb25kcygpICsgXCJzXCI7XHJcbiAgICByZXR1cm4gcmV0O1xyXG59XHJcblxyXG5mdW5jdGlvbiBzZXRDb3VudGRvd25WYWx1ZXModHJhY2tlcjogVHJhY2tlciwgY3VycmVudDogSFRNTEVsZW1lbnQsIHRvdGFsOiBIVE1MRWxlbWVudCwgY3VycmVudERpdjogSFRNTERpdkVsZW1lbnQpIHtcclxuICAgIGxldCBjdXJyRW50cnkgPSB0cmFja2VyLmVudHJpZXMubGFzdCgpO1xyXG4gICAgaWYgKGN1cnJFbnRyeSkge1xyXG4gICAgICAgIGlmICghY3VyckVudHJ5LmVuZFRpbWUpIHtcclxuICAgICAgICAgICAgbGV0IGN1cnJEdXJhdGlvbiA9IG1vbWVudCgpLmRpZmYobW9tZW50LnVuaXgoY3VyckVudHJ5LnN0YXJ0VGltZSkpO1xyXG4gICAgICAgICAgICBjdXJyZW50LnNldFRleHQoZ2V0Q291bnRkb3duRGlzcGxheShtb21lbnQuZHVyYXRpb24oY3VyckR1cmF0aW9uKSkpO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgbGV0IHRvdGFsRHVyYXRpb24gPSAwO1xyXG4gICAgICAgIGZvciAobGV0IGVudHJ5IG9mIHRyYWNrZXIuZW50cmllcykge1xyXG4gICAgICAgICAgICBsZXQgZW5kVGltZSA9IGVudHJ5LmVuZFRpbWUgPyBtb21lbnQudW5peChlbnRyeS5lbmRUaW1lKSA6IG1vbWVudCgpO1xyXG4gICAgICAgICAgICB0b3RhbER1cmF0aW9uICs9IGVuZFRpbW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