https://github.com/codexlynx/notify-fs
Connecting filesystem events with instant messaging
https://github.com/codexlynx/notify-fs
events filesystem inotify notification telegram
Last synced: 3 months ago
JSON representation
Connecting filesystem events with instant messaging
- Host: GitHub
- URL: https://github.com/codexlynx/notify-fs
- Owner: codexlynx
- License: gpl-3.0
- Created: 2022-07-05T23:04:13.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-07-06T18:49:00.000Z (almost 3 years ago)
- Last Synced: 2025-01-06T01:11:23.700Z (5 months ago)
- Topics: events, filesystem, inotify, notification, telegram
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## notify-fs
[](LICENSE) [](https://goreportcard.com/report/github.com/codexlynx/notify-fs)Connecting filesystem events with instant messaging.
### Behaviour:
When a file is created in the watched directory, it is automatically sent to the configured chat.### Technology:
This service uses the [fsnotify](https://github.com/fsnotify/fsnotify) library. This library
uses the system call `SYS_INOTIFY_INIT1` (294) on Linux systems and `ReadDirectoryChangesW` on Windows systems.### Configuration:
This service is configured via environment variables.| Variable Name | Description |
|--------------------|-------------------------|
| `TARGET_DIRECTORY` | Directory to watch |
| `TELEGRAM_TOKEN` | Telegram bot token |
| `TARGET_CHAT_ID` | Telegram target chat id |
| `ONLY_IMAGES` | Send only images |### Run:
You can compile the binary.
#### Compile:
* Requirements:
* A version of __Docker__ with __BuildKit__ support.
* GNU __make__ utility.* Procedure:
* Run: `make`.
* Check the correct creation of `dist` directory.