Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/happy-machine/file-hook

Lightweight sensor that waits and sends requests for new files / folders.
https://github.com/happy-machine/file-hook

Last synced: about 1 month ago
JSON representation

Lightweight sensor that waits and sends requests for new files / folders.

Awesome Lists containing this project

README

        

drawing

# file-hook

Very lightweight Rust webhook for notifications on creation of files / folders.

### What is file-hook?

file-hook will wait indefinetely and send a request to a specified endpoint for every file or folder recieved, this will contain a key of 'file' or 'folder' and value of corresponding name. It's fast and lightweight so you can leave it running as a background task or in a persistent container.

### How to use

To run:
`cargo run` or `cargo build --release`, then `./file-hook`



### Environment variables

**ENDPOINT**="https://apimocha.com/test/example"
Endpoint to sent REST request to on file/folder arrival.

**REQUEST_SENSOR_PATH**="/Users/me/files-to-watch"
Folder to watch for new files/folders.

**RECURSIVE_MODE**=True
Notify of recursive events (events inside folders recursively), defaults to false