App::Askell - Execute commands defined by the user when files are created, modified or deleted
version 0.132850
foo.yml ======= '/project/foo/src/less/': 'app.less': 'c,m': lessc --compress @p > @d@b.css askell --file foo.yml baz.yml ======= '/project/baz/': '\w+.mpg': 'c': mv @p /files/mpg/ '\w+.mp3': 'c': mv @p /files/mp3/ '\w+.xml': 'd': rm /files/xml/@f askell --file /project/baz.yml --silent
This application allows you to execute commands when some files are created, modified or deleted in directories.
The configuration is done via a YAML file where you can specify multiple directories, and several types of files per directory in the form of regular expressions.
The following events can be used:
'c' --> 'c'reated
'm' --> 'm'odified
'd' --> 'd'eleted
They can also be combined:
'c,m' --> 'c'reated or 'm'odifed
The following variables can also be used, they will be replaced by their values at runtime:
@p --> full path name (directory and filename)
@d --> only directory
@f --> only filename
@b --> file basename if filename like '*.*' else empty string
@e --> file extension if filename like '*.*' else empty string
See askell for the syntax of the command line.
Loïc TROCHET <losyme@cpan.org>
This software is copyright (c) 2013 by Loïc TROCHET.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::Askell, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::Askell
CPAN shell
perl -MCPAN -e shell install App::Askell
For more information on module installation, please visit the detailed CPAN module installation guide.