From 4a1a0950cb839d2dd3928c76c01cee1663e64513 Mon Sep 17 00:00:00 2001 From: Al0cam Date: Sat, 27 Sep 2025 19:16:57 +0200 Subject: [PATCH] doc: updated readme, bumped version, moved tags above exclusions --- README.md | 8 ++++++++ Settings/SettingsTab.ts | 34 ++++++++++------------------------ manifest.json | 2 +- package.json | 6 +++--- versions.json | 2 +- 5 files changed, 23 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index d8bb777..6e332c2 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,13 @@ Other examples could include: 3. 72:30:00 -> triggers every 3 days and 30 minutes (if your Device is online and obsidian runnning for that long) +### Tag rules UI +From patch 1.0.6 onwards, you can move files using tags. +It takes into account the first rule that is a match, +**if it first matches with a FileName rule, it won't check the Tag rules.** +There are no pictures for this one, as it is identical to the previous ruleset. + + ### Exclusion rules UI From patch 1.0.2 onwards, you can exclude files and folders from being moved. The UI that is used for the exclusion rules is the same as the one used for the search criteria. @@ -193,6 +200,7 @@ Thank you! - [x] Exposing the move files button to the left toolbar - [x] Exposing the move files to the commands accessible via command palette - [x] Add import and export of rules +- [x] Add #tag rule support - [ ] Add a file like .gitignore which contains all the moving rules (i am assuming the list can grow quite big for some people) - [ ] Auto tagging of moved files with the destination folder name (last folder in the path) - [ ] Add undo button to the notification popup for the moved files diff --git a/Settings/SettingsTab.ts b/Settings/SettingsTab.ts index 1394d04..5f46b6f 100644 --- a/Settings/SettingsTab.ts +++ b/Settings/SettingsTab.ts @@ -14,7 +14,6 @@ export class SettingsTab extends PluginSettingTab { this.plugin = plugin; } - // how to call rerendering from child section? display = () => { const { containerEl } = this; containerEl.empty(); @@ -39,10 +38,7 @@ export class SettingsTab extends PluginSettingTab { if (importedSettings) { this.plugin.settings = importedSettings; await this.plugin.saveData(this.plugin.settings); - this.plugin.app.workspace.trigger( - "AutoMover:automatic-moving-update", - this.plugin.settings, - ); + this.plugin.app.workspace.trigger("AutoMover:automatic-moving-update", this.plugin.settings); this.display(); } }); @@ -60,9 +56,7 @@ export class SettingsTab extends PluginSettingTab { new Setting(containerEl) .setName("Manually move") - .setDesc( - "Execute the command to go through your notes and move them according to the rules specified below.", - ) + .setDesc("Execute the command to go through your notes and move them according to the rules specified below.") .addButton((button) => { button.setButtonText("Move files"); button.onClick(async () => { @@ -81,17 +75,12 @@ export class SettingsTab extends PluginSettingTab { ) .setClass("timer-setting") .addToggle((cb) => - cb - .setValue(this.plugin.settings.automaticMoving) - .onChange(async (value) => { - this.plugin.settings.automaticMoving = value; - await this.plugin.saveData(this.plugin.settings); - this.app.workspace.trigger( - "AutoMover:automatic-moving-update", - this.plugin.settings, - ); - this.display(); - }), + cb.setValue(this.plugin.settings.automaticMoving).onChange(async (value) => { + this.plugin.settings.automaticMoving = value; + await this.plugin.saveData(this.plugin.settings); + this.app.workspace.trigger("AutoMover:automatic-moving-update", this.plugin.settings); + this.display(); + }), ) .addText((cb) => cb @@ -101,10 +90,7 @@ export class SettingsTab extends PluginSettingTab { .onChange(async (value) => { this.plugin.settings.timer = timerUtil.parseTimeToMs(value); await this.plugin.saveData(this.plugin.settings); - this.app.workspace.trigger( - "AutoMover:automatic-moving-update", - this.plugin.settings, - ); + this.app.workspace.trigger("AutoMover:automatic-moving-update", this.plugin.settings); }), ); @@ -158,7 +144,7 @@ export class SettingsTab extends PluginSettingTab { // TUTORIAL END movingRuleSection(containerEl, this.plugin, this.display); - exclusionSection(containerEl, this.plugin, this.display); tagSection(containerEl, this.plugin, this.display); + exclusionSection(containerEl, this.plugin, this.display); }; } diff --git a/manifest.json b/manifest.json index 3609020..1222bb5 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "auto-mover", "name": "AutoMover", - "version": "1.0.5", + "version": "1.0.6", "minAppVersion": "0.15.0", "description": "Moves files with specified names into the same folder.", "author": "Al0cam", diff --git a/package.json b/package.json index fbaee84..bc002ff 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "obsidian-sample-plugin", - "version": "1.0.0", - "description": "This is a sample plugin for Obsidian (https://obsidian.md)", + "name": "AutoMover", + "version": "1.0.6", + "description": "AutoMover: Moves files with specified names/tags where you want.", "main": "main.js", "scripts": { "dev": "node esbuild.config.mjs", diff --git a/versions.json b/versions.json index 26382a1..94fc44d 100644 --- a/versions.json +++ b/versions.json @@ -1,3 +1,3 @@ { - "1.0.0": "0.15.0" + "1.0.6": "0.15.0" }