Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/happy-machine/file-hook
- Owner: happy-machine
- Created: 2022-10-01T13:08:06.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-19T20:18:00.000Z (about 2 years ago)
- Last Synced: 2023-03-08T05:37:35.461Z (almost 2 years ago)
- Language: Rust
- Size: 74.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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