All Projects → sam09 → rorshach

sam09 / rorshach

Licence: MIT license
A watchman for your directories. Rorshach allows you to listen to file system changes and run commands when these events occur.

Programming Languages

rust
11053 projects
shell
77523 projects
C++
36643 projects - #6 most used programming language

Projects that are alternatives of or similar to rorshach

fswatch
File/Directory Watcher for Modern C++
Stars: ✭ 56 (+115.38%)
Mutual labels:  filesystem, watcher
watcher
The file system watcher that strives for perfection, with no native dependencies and optional rename detection support.
Stars: ✭ 37 (+42.31%)
Mutual labels:  filesystem, watcher
chokidar-socket-emitter
a simple chokidar watcher which emits events to all connected socket.io clients
Stars: ✭ 28 (+7.69%)
Mutual labels:  filesystem, watcher
Chokidar
Minimal and efficient cross-platform file watching library
Stars: ✭ 8,538 (+32738.46%)
Mutual labels:  filesystem, watcher
SwiftFSWatcher
A simple easy to use / extend File System watcher using Swift
Stars: ✭ 35 (+34.62%)
Mutual labels:  filesystem, watcher
Notify
🔭 Cross-platform filesystem notification library for Rust.
Stars: ✭ 1,123 (+4219.23%)
Mutual labels:  filesystem, watcher
jquery.filebrowser
File browser jQuery plugin
Stars: ✭ 29 (+11.54%)
Mutual labels:  filesystem
juicefs-csi-driver
JuiceFS CSI Driver
Stars: ✭ 117 (+350%)
Mutual labels:  filesystem
SacredUtils
Configuration utility for Sacred & Sacred Underworld with Material Design. Abandoned 05/07/2020.
Stars: ✭ 27 (+3.85%)
Mutual labels:  utilities
save-file
Save any data to file in browser or node
Stars: ✭ 40 (+53.85%)
Mutual labels:  filesystem
Meteor-logger-file
🔖 Meteor Logging: Store application log messages into file (FS)
Stars: ✭ 24 (-7.69%)
Mutual labels:  filesystem
TOFileSystemObserver
A bullet-proof mechanism for detecting any changes made to the contents of a folder in iOS and macOS.
Stars: ✭ 35 (+34.62%)
Mutual labels:  filesystem
Enchilada
Enchilada is a filesystem abstraction layer written in C#
Stars: ✭ 29 (+11.54%)
Mutual labels:  filesystem
rebellion
A collection of core libraries for Racket
Stars: ✭ 78 (+200%)
Mutual labels:  utilities
fs-fuse
Export any Node.js `fs`-like object as a FUSE filesystem
Stars: ✭ 32 (+23.08%)
Mutual labels:  filesystem
lfs
Lightweight file system
Stars: ✭ 12 (-53.85%)
Mutual labels:  filesystem
Dazinator.Extensions.FileProviders
No description or website provided.
Stars: ✭ 34 (+30.77%)
Mutual labels:  filesystem
Windows-System-Wide-Filter
Windows WDM driver filters to filter IO to devices and file systems
Stars: ✭ 49 (+88.46%)
Mutual labels:  filesystem
PHP-FileUpload
Simple and convenient file uploads — secure by default
Stars: ✭ 53 (+103.85%)
Mutual labels:  filesystem
Aqeous
(Inactive, Checkout AvanaOS, Rewrite of this) This is a New Operating System (Kernel right now). Made completely from scratch, We aim to make a complete OS for Learning purpose
Stars: ✭ 23 (-11.54%)
Mutual labels:  filesystem

License: MIT Build

Rorshach rorschach.gif

A watchman for your directories. Rorshach allows you to watch your directories for changes and trigger certain commands when these events occur.

Installlation

At the moment the only way to install is from crates.io (https://crates.io/crates/rorshach). Run cargo install rorshach to install it on a linux machine.

Usage

  • ./rorshach -f <dir> [-config <config_path>] [-t <seconds_to_wait_before_reload>]

The default config file lies at ~/.rorshach.conf

Config

Configuration file is a tab separated values (TSV) file, and has the following format:

EVENT  PATTERN   ACTION
...     ...       ...

Sample Configuration File

Please ensure you have physical TAB characters as delimiters. If you are using vim, you can use :set list to show invisible characters. It would look like this:

image

Otherwise, you will receive an error during start.

Events

EVENTS can be CREATE, DELETE RENAME or MODIFY. Each event is trigger when a file in the directory being watched is CREATED, DELETED, MODIFIED or RENAMED respectively. PATTERNS are patterns to match the files in a directory. Example *.cpp matches all the C++ files in a directory. ACTIONS are commands that can be executed when a EVENT occures

There are following environment variable available while executing an action, they are :- {FULLPATH} - Full path to the file, {BASEDIR} - Path to the directory that rorshach is watching {NEWFULLPATH} - New Path to the file, when a file is renamed else empty.

Examples

CREATE  *   echo " New file named ${FULLPATH} created"

The above will print a line of the form New file named <file-name> created every time a new file is created.

MODIFY  *.cpp   g++ ${FULLPATH} {BASEDIR}/test

Whenver a change is detected in a c++ file, rorshach will compile that file and create an executable named test in the base directory

TODO

  • Add more events to listen like Rename
  • Support execution of a chain of commands for a single event
  • Move Command Line passing to a different struct
  • Add a threadpool to execute each task once an event is spawned
  • Add a pub-sub mechanism for events
  • Add Tests?
  • Move parse_rules to an enclosing struct
  • Use log create for logging.
  • Provide better messages for errors.
  • Add a pub sub mechanism to listening to events and consuming them
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].