No description
- Go 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Codeberg is the primary source; GitHub is a mirror. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
| .vscode | ||
| .gitignore | ||
| .goreleaser.yaml | ||
| CHANGELOG.md | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| main.go | ||
| main_test.go | ||
| README.md | ||
| ROADMAP.md | ||
| task-plus.yml | ||
| Taskfile.yml | ||
godocs-watcher
Directory watcher that monitors a folder for new files, waits for them to settle (no writes for a configurable duration), then uploads them to a godocs server.
Install
go install github.com/drummonds/godocs-watcher@latest
Or download from releases.
Usage
Generate a config file:
godocs-watcher -init
Edit godocs-watcher.yaml:
godocs_server: http://localhost:8000
watch_dir: /home/user/scans
settle_time: 30s
delete_after_upload: false
Run:
godocs-watcher
The watcher will:
- Scan existing files in
watch_diron startup - Watch for new/modified files via fsnotify
- Wait until a file has no writes for
settle_time - Upload to godocs via
POST /api/document/upload - Optionally delete the source file after successful upload
Dotfiles and directories are ignored.
Config
| Field | Default | Description |
|---|---|---|
godocs_server |
(required) | URL of the godocs server |
watch_dir |
(required) | Directory to watch |
settle_time |
30s |
Duration with no writes before uploading |
delete_after_upload |
false |
Remove source file after successful upload |
Build
task build # build binary
task check # fmt + vet + test
Links
| Documentation | https://h3-godocs-watcher.statichost.page/ |
| Source (Codeberg) | https://codeberg.org/hum3/godocs-watcher |
| Mirror (GitHub) | https://github.com/drummonds/godocs-watcher |