Skip to content

Commit 393330e

Browse files
author
Thang
committed
Update README.md
1 parent fe6cbcd commit 393330e

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

README.md

+12-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
incron-recursive
22
================
33

4-
Recursive monitoring with incron, for newly created subdirectories in a parent folder.
4+
What this script does:
5+
- Recursive monitoring with incron, for newly created subdirectories in a parent folder.
6+
- Adds new watches to incrontab for newly created folders
7+
- Updates incrontab when files/folders are arbitrarily renamed/removed [including folders with spaces]
8+
- Add a .alternates folder to every newly created folder under the parent folder.
9+
- On IN_CREATE events [files are added], HandBrakeCLI & ffmpeg are called to create
510

611
My incrontab entry looks something like this:
712

8-
/var/www/examplesite/projects IN_CREATE,IN_DELETE /var/www/examplesite/update.py $# $@ $%
13+
/var/www/examplesite/projects IN_CREATE,IN_DELETE,IN_CLOSE_WRITE,IN_MOVED_TO /var/www/examplesite/update.py $# $@ $%
914

10-
This script will monitor a parent directory, and look for whether a sub-directory has been
11-
added/removed and update incrontab to add a watch on the new sub-dir.
15+
If you want to use this script:
16+
- Change the variables scriptPath/curUser
17+
- chmod +x the script
18+
- Write access the watched folder.
1219

13-
The idea for this script is to monitor a root folder where several other folders/files will be created, [in my case, video files], and run the appropriate actions on them. I've provided a barebones set up that will add/remove watches to incrontab, leaving the processFile function empty.
14-
15-
If you want to use this script, be sure to change the variables scriptPath/curUser, chmod +x the script, and ensure you're able to write to the watched folder.
20+
The use case for this script is to monitor uploaded video files to a (watched) directory, and encode them to a webm and iPad format, for mobile viewing/HTML5 playback in Firefox.
1621

1722
Cheers,
1823
Thang

0 commit comments

Comments
 (0)