The steeloverseer package

[Tags: bsd3, program]

A command line tool that responds to filesystem events. Allows the user to automatically execute commands after files are added or updated. Watches files using regular expressions.


[Skip to ReadMe]

Properties

Versions0.1.0.1, 0.1.0.2, 0.2.0.0, 0.5.0.0, 0.5.0.1, 1.0.1.0, 1.1.0.0, 1.1.0.1, 1.1.0.2, 1.1.0.3, 1.1.0.4, 1.1.0.5, 1.1.0.6, 1.1.1.0
Change logNone available
Dependenciesansi-terminal (==0.6.*), base (>=4.5 && <4.9), filepath (==1.4.*), fsnotify (==0.2.*), process (>=1.1.0.2), regex-tdfa (>=1.1.8), time (>=1.4), unix (>=2.6.0.1) [details]
LicenseBSD3
AuthorSchell Scivally
Maintainerefsubenovex@gmail.com
Stabilitystable
CategoryDevelopment
Home pagehttps://github.com/schell/steeloverseer
Bug trackerhttps://github.com/schell/steeloverseer/issues
Source repositoryhead: git clone git://github.com/schell/steeloverseer.git
Executablessos
UploadedThu Aug 13 17:49:32 UTC 2015 by SchellScivally
Downloads1331 total (150 in last 30 days)
Votes
0 []
StatusDocs not available [build log]
Last success reported on 2015-08-13 [all 1 reports]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for steeloverseer-1.1.1.0

Steel Overseer

flavor text

The world is already run by all manner of machines. One day, they'll remind us of that fact.

-Sargis Haz, artificer

Build Status

It is

A development tool that runs commands when certain files are updated, added or deleted.

Steeloverseer watches files whose names match a regular expression and then runs a series of commands when those files are updated.

Specifically

A filesystem event occurs when a file is added, deleted or updated. If this event happens on a file that matches one of the patterns provided with the -p PATTERN flag then steeloverseer will run the commands provided with the -c COMMAND flag. These commands will be performed in serial until one hangs, fails or all exit successfully.

You can provide multiple patterns and multiple commands, ie:

sos -c "git status" -c "echo hi world" -p "hs" -p "md"

You can seperately specify the directory to run in with -d DIRECTORY. The default is ..

This will execute git status followed by echo hi world whenever files matching "hs" or "md" are changed. -d DIRECTORY is not provided above, so it's assumed to be ./.

Also, since -p PATTERN are regular expressions we can do the same as above with:

sos -c "git status" -c "echo hi world" -p "hs|md"

Of course this would run whenever any match on "hs|md" is found, for instance on the filepath /Users/home/mdman/file.txt. For extensions it may make sense to use the endline matcher:

sos -c "git status" -c "echo hi world" -p "hs$|md$"

Installation

Using cabal, cabal install steeloverseer.

Usage

sos: Usage: sos [v] -c command -p pattern
  -v            --version              show version info
  -c COMMAND    --command=COMMAND      add command to run on file event
  -p PATTERN    --pattern=PATTERN      add pattern to match on file path
  -d DIRECTORY  --directory=DIRECTORY  set directory to watch for changes (default is ./)

steeloverseer screencast

Future

Project .sosrc file for specifying multiple sos commands while working on a project (@see issue #4)

Art above by Chris Rahn for Wizards of the Coast