sunwait

Commits at 1891218828a70b69a4b17f6161c033efa1328d1c

  1. 18912188 Separate arg parser code into several files It was not easy to read, and I'm going to add more logic to arg parsers. Shota FUJI authored at Shota FUJI comitted at
  2. f20b6a42 Fix grammar on help message Shota FUJI authored at Shota FUJI comitted at
  3. 8f2024a8 Update man pages to the new CLI Previous CLI don't fit well to man page format, especially due to its hyphen-less semi-positional sometimes-ignored options. Shota FUJI authored at Shota FUJI comitted at
  4. 237048ce Document how to build man page Shota FUJI authored at Shota FUJI comitted at
  5. 5b18e92e Defaults to the new Zig CLI Every functionality I'm aware of has been migrated. Shota FUJI authored at Shota FUJI comitted at
  6. b1606ed6 Add examples in original USAGE.txt as behavior tests Final check. Shota FUJI authored at Shota FUJI comitted at
  7. 37828fd1 Wait command No behavior tests for this. How should I do CLI program that performs `sleep()`? Shota FUJI authored at Shota FUJI comitted at
  8. fea537ab Offset CLI argument Shota FUJI authored at Shota FUJI comitted at
  9. bdb74658 Fix incorrect offset usage in man page Shota FUJI authored at Shota FUJI comitted at
  10. 024f9127 Fix prints "unknown argument" for incorrect arguments Errors other than UnknownArg, such as MissingValue logs eariler. UnknownArg is also used as a "skip" signal and there were no other error in an error set, that's why the log was here. I simply forgot to remove that when I added other error values. Shota FUJI authored at Shota FUJI comitted at
  11. 30ddee1c Twilight angle CLI argument Shota FUJI authored at Shota FUJI comitted at
  12. 64f0da64 Event type arguments for list command I initially thought these args affects every command. Turned out, only "list" and "wait" commands use those args. That's why I set those as command options rather than global options. This time, I choose correctness and user-friendliness over backwards-compatibility. Shota FUJI authored at Shota FUJI comitted at
  13. 1927160c Fix incorrect sunrise/sunset calculation on non-UTC timezone Shota FUJI authored at Shota FUJI comitted at
  14. 304fec8b Fix invalid CLI argument does not abort parsing Invalid argument, such as "d foo" should abort and prints usage error. Shota FUJI authored at Shota FUJI comitted at
  15. 5be27e01 Parse date args on "report" command Shota FUJI authored at Shota FUJI comitted at
  16. 8e71843d Call "generate_report" on report command Shota FUJI authored at Shota FUJI comitted at
  17. 88c46686 Support hyphen-less "utc" flag Required for behavior matching tests. Shota FUJI authored at Shota FUJI comitted at
  18. f272abe2 Set correct default value for "targetTimet" Shota FUJI authored at Shota FUJI comitted at
  19. 4a52d259 Run "print_list" on "list" command It does not work correctly because the default value of `target_time` being the same as `now` instead of "start of the day of `now`." Anyway, the command prints something and exits with expected status. That's okay for now. Shota FUJI authored at Shota FUJI comitted at
  20. 66781b3d Fix lat/lon accepts negative number with suffix Values like -1.2345N are illegal and confusing. As I've added "--latitude" and "--longitude" options, there are no need for supporting negative suffixed values. Shota FUJI authored at Shota FUJI comitted at
  21. c5402dc6 Add --latitude and --longitude options This is obvious and less error-prone. I'm gonna keep non-flag variants for compatibility. Shota FUJI authored at Shota FUJI comitted at
  22. 74ebda97 Defer getting now/target time CLI does not take argument for "now". Also "target" defaults to "now". Shota FUJI authored at Shota FUJI comitted at
  23. 7b4e63f6 Print poll result to stdout Shota FUJI authored at Shota FUJI comitted at
  24. f2ec1ae9 Parse latitude and longitude CLI args Shota FUJI authored at Shota FUJI comitted at
  25. a3e7b62b Support command argument Shota FUJI authored at Shota FUJI comitted at
  26. 8249d378 UTC flag Instead of "--utc" being an alias for "--gmt", I swapped those too. Shota FUJI authored at Shota FUJI comitted at
  27. d3848966 Debug flag I did not added "verbose" alias because it's incorrect--the "debug" flag shortens wait time and that's not "verbose" or not. Shortening wait time is not appropriate for "--debug" too, but never it is verbosity. The original version also has "-v" alias in flag handling code, but it won't be handled because "version" flag has "-v" alias and it captures the arg eariler. Shota FUJI authored at Shota FUJI comitted at
  28. dab5ef6c Add help flag to Zig main Shota FUJI authored at Shota FUJI comitted at
  29. 81427ae9 Implement version flag to Zig main Shota FUJI authored at Shota FUJI comitted at
  30. 0f68071e Skip tests for features not implemented yet Errors are so noisy. Shota FUJI authored at Shota FUJI comitted at