From 432b287b918739d4a82fa016ff8b3267a4b87f81 Mon Sep 17 00:00:00 2001 From: dwrz Date: Fri, 23 Oct 2026 15:08:20 +0000 Subject: [PATCH] Add README --- README.org | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 README.org diff --git a/README.org b/README.org new file mode 100644 index 0000000..3f22b9e --- /dev/null +++ b/README.org @@ -0,0 +1,37 @@ +* Sun + +~sun~ wraps [[https://github.com/nathan-osman/go-sunrise][go-sunrise]] to calculate sunrise, sunset, and day length for a location. + +** Usage + +#+begin_src shell +sun -c LAT,LON [-d YYYY-MM-DD] [-z TIMEZONE] [-f FORMAT] +#+end_src + +Flags: + +- =-c= — coordinates as =latitude,longitude= (required) +- =-d= — date in =YYYY-MM-DD= format (default: today) +- =-z= — timezone (default: UTC) +- =-f= — output time format, [[https://pkg.go.dev/time#Time.Format][Go reference layout]] (e.g. =15:04= for HH:MM; default: RFC 3339) + +The tool outputs three values: sunrise (time), sunset (time), and day length (duration). + +** Examples + +#+begin_src shell +$ sun -c 51.4769,0.0005 +2026-10-23T06:37:08Z 2026-10-23T16:51:16Z 10h14m8s + +$ sun -c -77.8419,166.6863 \ + -d 2026-03-20 \ + -z Antarctica/McMurdo \ + -f "15:04" +07:38 20:23 12h45m28s +#+end_src + +** Installation + +#+begin_src shell +go install code.chimeric.al/dwrz/sun/cmd/sun@latest +#+end_src