https://github.com/glitchybyte/tanuki
Utility for watching directories and running actions when they change.
https://github.com/glitchybyte/tanuki
cpp directory-watcher
Last synced: over 1 year ago
JSON representation
Utility for watching directories and running actions when they change.
- Host: GitHub
- URL: https://github.com/glitchybyte/tanuki
- Owner: GlitchyByte
- License: apache-2.0
- Created: 2023-12-28T19:40:04.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-21T12:35:58.000Z (about 2 years ago)
- Last Synced: 2024-05-01T09:44:10.079Z (about 2 years ago)
- Topics: cpp, directory-watcher
- Language: C++
- Homepage:
- Size: 334 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# tanuki

Utility for watching directories and running actions when they change.
The utility can be used in immediate mode and directly watch and run an action, or with a json config file that allows you to have modules with directory groups and an action each.
## Use it!
tanuki [config_file]
tanuki -i watch_dir [action]
run Runs actions in all modules.
watch Watches modules for changes and runs actions on them.
config_file Tanuki config file. If empty, "tanuki.json" in the current
directory is used.
-i Immediate mode. In this mode tanuki watches a single directory and
runs the action when it is modified. if no action is specified
it simply exits.
watch_dir Directory to watch.
action Action to run when directory is modified.
Tanuki json configuration file schema is as follows:
{
"modules": [
{
"name": "My module name",
"rootDir": "path/to/module",
"watchDirs": [
"watched1",
"subdir/watched2"
],
"action": "echo 'This will run in rootDir.'"
}
]
}
## Get it!
It is highly recommended that you build it yourself on your platform.
If you want a pre-compiled binary for macOS, Windows, or Ubuntu, check the [latest release](https://github.com/GlitchyByte/tanuki/releases).
These are built using GitHub Actions on GitHub Runners.
## Build it!
Clone this repo. Then:
./build MinSizeRel clean
### Receive your tasty binary!
After building, `tanuki` executable is in the `code/bin` directory.