sift:directory_watchers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
sift:directory_watchers [2025/02/06 16:22] – sgranger | sift:directory_watchers [2025/02/06 16:49] (current) – sgranger | ||
---|---|---|---|
Line 5: | Line 5: | ||
Watchers are stored as a XML file within you PCs AppData folder, it is possible to create, remove, and edit these files directly as long as the formatting is maintained. This can even be done through external scripting tools allowing you to even automate the process of creating and editing watchers. | Watchers are stored as a XML file within you PCs AppData folder, it is possible to create, remove, and edit these files directly as long as the formatting is maintained. This can even be done through external scripting tools allowing you to even automate the process of creating and editing watchers. | ||
- | " | + | " |
- | [pic] | + | {{sift_watcher_xml.png}} \\ |
- | the AppData folder is hidden by default on most windows systems | + | the AppData folder is hidden by default on most windows systems file explorer can be set to show hidden files by accessing **View** |
- | + | {{windows_hidden_items.png}} \\ | |
- | [pic] | + | |
===== Creating, Editing, and Deleting Watchers ===== | ===== Creating, Editing, and Deleting Watchers ===== | ||
- | In addition to interacting with the files directly Watchers controlled through the following commands on the Sift command line: | + | In addition to interacting with the files directly, Watchers |
---- | ---- | ||
Line 26: | Line 25: | ||
This is the directory that will be watched, this can be passed more than once to watch multiple directories \\ | This is the directory that will be watched, this can be passed more than once to watch multiple directories \\ | ||
== Script (Required) == | == Script (Required) == | ||
- | This is a script to be executed upon triggering the watcher, the script can be a .v3s pipeline or a .bat script in the case of a .bat script the first line of the script must be ##SIFT (This ensures only scripts fully intended for sift are executed), the script command can be passed multiple times to execute multiple scripts, the scripts will be executed in the order they are passed. \\ | + | This is a script to be executed upon triggering the watcher, the script can be a .v3s pipeline or a .bat script in the case of a .bat script the first line of the script must be ::SIFT (This ensures only scripts fully intended for sift are executed), the script command can be passed multiple times to execute multiple scripts, the scripts will be executed in the order they are passed. \\ |
== Recursive == | == Recursive == | ||
If this is passed all sub-directories within a watched directory will also be watched. \\ | If this is passed all sub-directories within a watched directory will also be watched. \\ | ||
Line 41: | Line 40: | ||
---- | ---- | ||
This command will list all watchers and their parameters | This command will list all watchers and their parameters | ||
- | [pic] | ||
---- | ---- | ||
Line 75: | Line 73: | ||
- | ==Using | + | ===== Using Watchers ===== |
- | For watchers to work Sift must be running in the background, from the system tray, to launch Sift in background mode you can either pass the command -LaunchMinimized, | + | For watchers to work Sift must be running in the background, from the system tray, to launch Sift in background mode you can either pass the command -LaunchMinimized, |
once sift is running in the background you can interact with it via the system tray icon | once sift is running in the background you can interact with it via the system tray icon | ||
- | from here you can | + | {{sift_tray.png}} \\ |
+ | from here you can \\ | ||
+ | * **Open GUI** - this will open a standard instance of sift with a GUI | ||
+ | * **Open Console** - this will open a console instance of sift, only one console instance of sift can run at a time | ||
+ | * **Quit** - this will close the background instance of sift, all other instances will remain open | ||
+ | * **Disable Start in Tray** - If you have sift set to launch in the background by default, this will disable it | ||
+ | * **Watchers** - if you have any active watchers they will be found here, within this list you can enable or disable individual watchers or enable or disable all watchers | ||
+ | {{sift_tray_watchers.png}} \\ | ||
- | open gui - this will open a standard instance of sift with a GUI | + | when a watcher is triggered all v3d pipelines will be run in the background, however all .bat scripts |
- | open console - this will open a console instance of sift, only one console instance of sift can run at a time | + | |
- | quit - this will close the background | + | ==== BATCH Files ==== |
- | Disable start in tray - If you have sift set to launch in the background by default, this will disable it | + | Any .bat file can be executed via Directory |
- | Watchers | + | |
+ | === Example === | ||
+ | < | ||
+ | ::SIFT | ||
- | when a watcher is triggered all v3d pipelines will be run in the background, however all .bat scripts will open a commandline interface, if you are running sift commands a command line instance of sift will open, this will not work if you already have sift open on the console, or if a script is triggered while another is still be processed. | + | " |
+ | </ | ||
- | [batch example] | + | Windows BATCH scripting is a powerful tool and much more logic can be put into them, see the [[sift: |
sift/directory_watchers.1738858935.txt.gz · Last modified: 2025/02/06 16:22 by sgranger