예제 #1
0
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

import argparse
import os
from watch import FileWatcher

if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument("fileName")
    args = parser.parse_args()
    filename = args.fileName
    path = os.getcwd()

    print("pdflatexdeamon Copyright (C) 2015 Jappie Klooster")
    print("This program comes with ABSOLUTELY NO WARRANTY.")
    print("For details see the source code.")
    print("----")
    print("watching the file {} in the directory {}".format(filename, path))

    watcher = FileWatcher(
        filename,
        path
    )
    # first time just do it
    watcher.executeActions()
    # then start watching
    watcher.start()


예제 #2
0
파일: cagibi.py 프로젝트: khamidou/cagibi
def setup_filewatcher_thread():
    fw = FileWatcher(path=cagibi_folder)
    fw.addHandler(push_filewatcher_changes)
    fw.watch()