@spec.get_opts.each do |name, opt| options[name] = opt.value counts[name] = opt.count end @spec.get_args.each do |name, arg| args << arg.value named[name] = arg.value end args.flatten! args += trailing @report = Report.new(args, named, trailing, options, counts) if @report.opt(:help) self.print_usage() end unless @spec.get_args.values.all? {|arg| arg.fulfilled? } raise InterfaceError, "Required argument '#{name.upcase}' was not given." end if @spec.trailing_error && !@report.trailing.empty? raise InterfaceError, "Error: got trailing argument(s): #{trailing.join

Software

I have a monitor hooked up to a headless server to passively display some information on the console. I decided I wanted to add weather information to it, so I created weatherman.

weatherman is a simple console widget implemented in node.js with the blessed TUI library. It displays the current weather for one or more configurable locations.

Currently I'm using wttr.in as a backend, which I'd like to move away from; the service experiences outages and the weather information itself seems to be unreliable. The blessed 👼 library is great, on the other hand — building the interface was completely painless and I'll probably use it again in the future.

This is also my first project built from the ground up using ES modules 🥳

Directory