wendy: Under wendy’s watchful eye

I know we just saw watchfile.sh the other day, but I can’t account for the whims of alphabetical order.

2014-06-22-6m47421-wendy

tsar11 sent a link three or four months ago to a reddit post about wendy, which monitors files (or directories, for that matter) for changes, and then executes a command as a response.

As you see there, it could be something as simple as a message on screen, or it could be as complex as an order to recompile a program.

wendy can discriminate between file modification, file creation and file deletion, which is handy. If I had told it to spawn a warning only when a file was created, that gif probably would have been shorter. 🙄

wendy also knows enough to keep quiet when told, or to poll at distinct intervals. All nice touches.

I don’t have any complaints about wendy. It seems to handle more complex cases than watchfile.sh, works better than fsniper did (for me), and seems to work at least as well as entr.

wendy’s home page shows edits within the past few months, so if you find there’s a feature it lacks (for one, I’d like to see the option to discriminate actions based on either modification, deletion or creation), the author is probably listening.

In the mean time, your homework will be to daisy-chain all four of these together and see what kind of ruckus erupts as a result. 😈

Advertisements

5 thoughts on “wendy: Under wendy’s watchful eye

  1. Pingback: Links 27/6/2014: New Mint 17 Variant, OwnCloud 7 Beta | Techrights

  2. z3bra

    Hi ! I’m the author of wendy.

    First of all, I’d like to say that I’m proud that one of my programs is described on your blog. It’s a blog I have much respect for, so thanks for that.

    Now, speaking about “her”.. I’d like to add a thing, that I think is worth mentionning.

    wendy can handle EVERY inotify event, and pair them together really easily using the -m flag. It means that if you want to check both deletion (event IN_DELETE: 512) and modifications (event IN_MODIFY: 2), you can sum them, and pass them to wendy:

    wendy -m 514 -f .

    You can get the value of all events using `wendy -l`

    Actually, wendy does exactly what I wrote it for. Contrarly to `entr`, wendy can only handle a single node (either a file OR a directory). It can also start only a single command when an event occur. I’d really like to keep it this way, because the tool is really simple, and allow many, many things. As it is really simple and lightweight, I don’t find it would cost to many resources to fire multiple instance of it if you need. example:

    for F in *.md; do
    wendy -q -m 8 -f $F -e markdown $F > ${F/.md/.html}
    done

    This will watch every markdown file in a directory, and generate an html file out of them whenever their content changes

    Anyway, I’m open to any suggestion, and every bug report would be welcomed !

  3. Pingback: inotifywait, inotifywatch and incron: A package deal | Inconsolation

Comments are closed.