Watched-Metadata
approvedby Nail Ahmed
Watches for changes in metadata and performs user-specified actions based on these changes.
MetadataWatcher Plugin for Obsidian
MetadataWatcher is a plugin for Obsidian that monitors changes in metadata fields of your notes and performs specific actions based on these changes. It allows you to configure header replacements and command executions triggered by metadata updates.
Features
- Header Replacement: Automatically replace specific headers in your notes with metadata values when they change.
- Command Execution: Execute predefined commands when metadata fields are updated.
❤️ Support the project directly:
Installation
- Download the latest release of the plugin.
- Extract the files to your Obsidian plugins directory:
<vault>/.obsidian/plugins/metadata-watcher. - Enable the plugin in the Obsidian settings.
Configuration
The plugin can be configured through the settings tab in Obsidian. There are two main configuration sections: Header Groups and Command Groups.
Header Groups
Header Groups allow you to replace headers in your notes based on metadata values.
Adding a Header Group
- Go to the plugin settings.
- Switch to the Header Groups tab.
- Click on Add Header Group.
- Configure the field name to watch, the header text, and set it to active.
Example
If you want to replace a header with the value of exampleField, configure the group as follows:
- Field Name:
exampleField - Header:
## Example Header - Active: true
Command Groups
Command Groups allow you to execute commands when metadata fields change.
Adding a Command Group
- Go to the plugin settings.
- Switch to the Command Groups tab.
- Click on Add Command Group.
- Configure the field name to watch, select the command to execute, and set it to active.
Example
If you want to execute a command when exampleField changes, configure the group as follows:
- Field Name:
exampleField - Command: Select the desired command from the list.
- Active: true
Usage
Once configured, the plugin will monitor changes to the specified metadata fields in your notes. When changes are detected, it will either replace headers or execute commands based on your settings.
Development
To build and modify this plugin, you'll need to have Node.js installed. Follow these steps:
- Clone the repository.
- Run
npm installto install dependencies. - Make your changes to the code.
- Run
npm run buildto build the plugin. - Copy the built files to your Obsidian plugins directory.
Issues and Contributions
If you encounter any issues or have suggestions for improvements, please open an issue on the GitHub repository. Contributions are welcome!
License
This plugin is licensed under the MIT License.
This README provides an overview of the MetadataWatcher plugin, how to install it, configure it, and how to contribute to its development. For more detailed information, refer to the source code and inline documentation within the plugin.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.
