I've been making progress, but I'm not sure how to proceed from here. I'm using
inotifywait with the
-d (daemon) switch to output a file that lists the video files that are put into the watched folder.
The list is desired because adjusting volume levels and recoding is very time consuming and I don't want to miss any events. My problem lies in how to actually manipulate the data into something I can use in a
zsh script. The individual lines use the following format
/path/to/file containing/white spaces/ CLOSE_WRITE,CLOSE file name with white spaces
What I need is
/path/to/file\ containing/white\ spaces/filename\ with\ white\ spaces.extension
The path, changes as does the number of levels of subfolders, as do the file names. What is consistent is
** CLOSE_WRITE,CLOSE ** (one white space preceding and one following) and if somebody would be kind enough to educate me on how to remove this portion of the line in a
zsh script I think (hope, actually) I know enough that I can precede the remaining white spaces with back slashes and remove the line after it is no longer needed using
Vim from the command line with a snippet I came across.
I have most of what I need, in fact I've written scripts that will chug along for hours automatically converting files OR adjusting volume levels, I just need this to tie it all together (I even have a plan to check for unconverted files at boot - plus figure out how to create an atomic file/folder lock, create a new tmux session so I can logout but leave my computer running - at least until I repair my desktop and maybe even learn to use parallel, but that all comes later)
Any and all help greatly appreciated.