Skip to content

A CLI app to watch a directory and doing something, powered by golang and fsnotify

License

Notifications You must be signed in to change notification settings

thomasoca/goracle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goracle

A CLI app to watch a directory and doing something, powered by golang and fsnotify

Usage

Work is still on progress to make it a proper CLI (see To-Do section for more example), but overall the usage will be:

goracle [options] COMMAND ARGS

There are some options available:

Options:
  -d string
        Directory to watch, set to current working directory as default (default "/home/thomasoca/projects/goracle")
  -e string
        Event to notify, select between create, write, remove, rename, chmod (default "create")
  -n
        Set execution mode to non-blocking
  -p string
        File pattern to notify (default "*")

NOTE: Separate multiple ARGS by space

Usage example

Run a python program over a write event of .csv file

goracle -e write -d /home/users/folder -n -p *.csv python example.py input_argument

The event file name will always be passed to the last ARGS by default

To-do

  • Write more tests to cover most of the statements
  • Create the makefile for CLI installation
  • Re-thinking about the non-blocking option

About

A CLI app to watch a directory and doing something, powered by golang and fsnotify

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages