Skip to main content

tools like vscode file-watcher but for command only

Project description

something like File-Watcher for vscode

Usage

cqh_file_watcher -c ***.conf

conf example

use pattern

{"command_list":[
    {
        "pattern": "*.py",
        "command": "sudo supervisorctl restart redis"
    }
]
"directory": "/home/vagrant/code/code1"
}

no pattern

{"command_list":[

    {
        "command": "echo things changed"
    }
]
"directory": "/home/vagrant/code/code1"
}

directory for command

{"command_list":[
    {
        "pattern": "*.py",
        "command": "sudo supervisorctl restart redis"
        "directory":  "/home/vagrant"
    }
]
"directory": "/home/vagrant/code/code1"
}

add ignore pattern for one

{"command_list":[
    {
        "pattern": "*.py",
        "ignore_pattern": ["_build/.*"],
        "command": "sudo supervisorctl restart redis"
        "directory":  "/home/vagrant"
    }
]
"directory": "/home/vagrant/code/code1"
}

add ignore pattern for multi

{"command_list":[
    {
        "pattern": "*.py",
        "ignore_pattern": ["_build/.*" , "_download/.*", "^css/.*", "^_static/.*"],
        "command": "sudo supervisorctl restart redis"
        "directory":  "/home/vagrant"
    }
]
"directory": "/home/vagrant/code/code1"
}

ChangeLog

0.0.31

  • add ignore_pattern

  • add event IN_MOVED_TO, IN_MOVED_FROM

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cqh_file_watcher-0.0.32.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distribution

cqh_file_watcher-0.0.32-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page