steeloverseer: A file watcher.

[ bsd3, development, library, program ] [ Propose Tags ]

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]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.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, 2.0, 2.0.0.1, 2.0.1.0, 2.0.2.0, 2.1.0.0, 2.1.0.1
Dependencies ansi-terminal (>=0.6 && <0.7), base (>=4.5 && <4.9), filepath (>=1.4 && <1.5), fsnotify (>=0.2 && <0.3), process (>=1.1.0.2), regex-tdfa (>=1.1.8), time (>=1.4), unix (>=2.6.0.1) [details]
License BSD-3-Clause
Author Schell Scivally
Maintainer efsubenovex@gmail.com
Category Development
Home page https://github.com/schell/steeloverseer
Bug tracker https://github.com/schell/steeloverseer/issues
Source repo head: git clone git://github.com/schell/steeloverseer.git
Uploaded by SchellScivally at 2015-08-13T17:42:46Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables sos
Downloads 13332 total (51 in the last 30 days)
Rating 2.25 (votes: 2) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2015-11-25 [all 6 reports]

Readme for steeloverseer-1.0.1.0

[back to package description]

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