No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Humphrey Drummond 74efaa02d0 Migrate module path from github.com to codeberg.org
Codeberg is the primary source; GitHub is a mirror.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 23:05:41 +00:00
.vscode Initial release 2026-02-28 11:25:31 +00:00
.gitignore Initial commit 2026-02-28 08:25:57 +00:00
.goreleaser.yaml Adding windows dist 2026-02-28 17:19:10 +00:00
CHANGELOG.md Initial release 2026-02-28 11:25:31 +00:00
go.mod Migrate module path from github.com to codeberg.org 2026-03-26 23:05:41 +00:00
go.sum Initial release 2026-02-28 11:25:31 +00:00
LICENSE Initial commit 2026-02-28 08:25:57 +00:00
main.go Migrate module path from github.com to codeberg.org 2026-03-26 23:05:41 +00:00
main_test.go Migrate module path from github.com to codeberg.org 2026-03-26 23:05:41 +00:00
README.md Migrate module path from github.com to codeberg.org 2026-03-26 23:05:41 +00:00
ROADMAP.md Initial release 2026-02-28 11:25:31 +00:00
task-plus.yml Add task-plus.yml and links section to README 2026-03-09 16:24:55 +00:00
Taskfile.yml Initial release 2026-02-28 11:25:31 +00:00

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:

  1. Scan existing files in watch_dir on startup
  2. Watch for new/modified files via fsnotify
  3. Wait until a file has no writes for settle_time
  4. Upload to godocs via POST /api/document/upload
  5. 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
Documentation https://h3-godocs-watcher.statichost.page/
Source (Codeberg) https://codeberg.org/hum3/godocs-watcher
Mirror (GitHub) https://github.com/drummonds/godocs-watcher