forked from joh/when-changed
-
Notifications
You must be signed in to change notification settings - Fork 0
Execute a command when a file is changed
License
dinnawin/when-changed
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
when-changed Run a command when a file is changed ~ What is it? Tired of switching to the shell to test the changes you just made to your code? Starting to feel like a mindless drone, manually running pdflatex for the 30th time to see how your resume now looks? Worry not, when-changed is here to help! Whenever it sees that you have changed the file, when-changed runs any command you specify. So to generate your latex resume automatically, you can do this: $ when-changed CV.tex pdflatex CV.tex Sweetness! ~ What do I need? Python 2.6+ watchdog ~ Installation pip install https://github.com/joh/when-changed/archive/master.zip # PegasusWang add color output when file changed, just see source code (Bcolor class) pip install https://github.com/PegasusWang/when-changed/archive/master.zip ~ Usage when-changed FILE COMMAND... when-changed FILE [FILE ...] -c COMMAND ~ Demo when-changed -r -v -1 . python main.py when-changed -r -v -1 . go run main.go # you can add alias alias whenchanged_run="when-changed -r -v -1 . " whenchanged_run python main.py ~ Video https://zhuanlan.zhihu.com/p/68631157
About
Execute a command when a file is changed
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- Python 100.0%