oneautumnmango142 downloadsDetects when YAML frontmatter properties are edited and runs supplied scripts.
An Obsidian plugin that detects when YAML frontmatter properties are edited and automatically runs specified scripts.
status, closed, tags)C:\Scripts\my-script.bat or /usr/local/bin/my-script.sh) (haven't tested with a .sh)Your script receives these environment variables:
PROPERTY_NAME - Name of the edited propertyPROPERTY_VALUE - New value of the propertyPREVIOUS_VALUE - Previous value of the property (this will be blank unless changed previously in the same obsidian instance)FILE_PATH - Path to the file (relative to vault)FILE_NAME - Name of the fileVAULT_PATH - Full path to the vaultWatch for a closed property and move the file when set to true:
@echo off
if /I "%PROPERTY_VALUE%"=="true" (
move "%VAULT_PATH%\%FILE_PATH%" "C:\Archive\%FILE_NAME%"
)