GithubHelp home page GithubHelp logo

pythonar's Introduction

PythonAR

This project intend to provide a very simple way to restart applications when you change source code or resources, thus providing a better workflow.

usage:

reloader.py [-h] [-p PATH] [-a ACTION] [-f SECONDS] [-i IGNORELIST] [-s SECONDS] command

Allows to start a program, and to monitor changes in a folder, when changes are detected in the folder, the command is restarted. This can be useful to test a software you are developping and having immediate feedback. Or to restart a daemon when configuration or data changes. Or any other use, the sky is the limit :)

/!\ if still alive before a restart, the process will be killed, your program has to be able to be killed without corrupting anything, which is always a nice feature for a software anyway :).

positional arguments:

command

optional arguments:

-h, --help            show this help message and exit

-p PATH, --path PATH  set the path to monitor for changes

-a ACTION, --action ACTION
                    what action to perform when changes are detected

-i FILES, --ignorelist FILES
                    list of filepatterns to ignore use * as glob,
                    used on complete filename

-f SECONDS, --focus SECONDS
                    (linux only for now) Will prevent anything from
                    stealing focus for SECONDS seconds.

-s SECONDS, --sleep SECONDS
                    ignore all events SECONDS seconds after the last
                    restart

dummy exemple:

./reloader.py -p testdir -i *.sw* -s 2 -a restart ls -l

will restart a ls process every time a file is created/changed/deleted in testdir folder, ignoring all vim swapfiles, and won't listen to any event less than 2 seconds after the last restart.

pythonar's People

Contributors

dessant avatar johnpapps avatar keyweeusr avatar tshirtman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.