sandreas / tone

tone is a cross platform audio tagger and metadata editor to dump and modify metadata for a wide variety of formats, including mp3, m4b, flac and more. It has no dependencies and can be downloaded as single binary for Windows, macOS, Linux and other common platforms.
https://pilabor.com
Apache License 2.0
410 stars 17 forks source link

`watch` command to run a script on filesystem changes #38

Open sandreas opened 1 year ago

sandreas commented 1 year ago

I would like to have a watch command to watch a directory for filesystem changes and run shell commands, so that it is possible to watch a directory with audio books and start a conversion tool, as soon as new files are put in.

Important Note: Maybe this exceeds the scope of tone as an audio tagger and has to be extracted in an extra tool (like fswatch, fswatcher, fsmon or baywatch - last name is to prevent name conflicts with existing more popular tools like https://github.com/emcrisostomo/fswatch)

Tasks:

Optional tasks / ideas:

Example:

tone watch --directory="/tmp/dir/" --debounce-milliseconds="300000" ls /tmp/dir