Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

FreeDOS Wittr.in Weather Viewer

A weather forecast viewer for DOjS on FreeDOS. It fetches wttr.in's real ASCII-art forecast (box-drawn borders, weather pictograms, wind arrows) and renders it with wttr.in's own colors on a real DOS screen.

Why this exists

FreeDOS console can't decode or display UTF-8 text, and wttr.in's ASCII-art forecast is full of it -- box-drawing characters, a degree sign, compass arrows. Rather than relying on font glyph lookups (tried first, broke badly on real hardware for reasons documented in weather.js's header comment), every non-ASCII glyph is decoded from the raw response bytes and hand-drawn with graphics primitives (Line()/Circle()). Colors come from wttr.in's own ANSI escape codes, mapped to DOjS's 16 EGA colors, not guessed.

Requirements

  • dojs.exe, a jsboot/ directory (specifically jsboot/fonts/pc8x16.fnt), and curl.DXE, all reachable from wherever weather.js runs (same convention as this project's sibling DOjS apps -- see the header comment in weather.js).
  • LoadLibrary("curl") support. No CACERT.PEM needed -- this app fetches over plain http://, not https:// (see weather.js for why).

Usage

DOJS -r WEATHER.JS [location] [flags]

Location has no built-in default. It's resolved in this order:

  1. The command-line argument (DOJS WEATHER.JS London)
  2. A location= line in WEATHER.INI, in the same directory
  3. If neither is set, the app starts empty and drops straight into the location-entry prompt (same as pressing L) instead of guessing a city.

Flags follow the same precedence (argument, then flags= in WEATHER.INI), defaulting to d2nQF (2-day forecast, narrow, quiet, no "Follow" line) if nothing else is set. See wttr.in's flag list for the full set -- just don't add T, since that strips the ANSI colors this app relies on.

WEATHER.INI example (; or # starts a comment line):

; default city for the weather viewer
location=London
flags=1Qn

Keys

Key Action
F5 or R Refresh the current location
L Type a new location (Enter to confirm, empty Enter cancels)
Left / Right Scroll horizontally, if the forecast is wider than the screen
Esc Quit (DOjS's built-in default exit key)

There's no vertical scrolling -- the default forecast reliably fits the default 640x480 screen.

Diagnostics

Every fetch overwrites WXDEBUG.TXT with the raw response bytes (hex) and exactly how they were parsed (every text run and hand-drawn glyph, with position and color). If something ever renders wrong, that file is the fastest way to see why.

License

MIT -- see LICENSE.


Software is presented as is, with no updates planned. This is a hobby project generated by Claude, feel free to make changes with the same MIT licensing terms.

About

A DOJS client for properly viewing wttr.in forecasts on FreeDOS36

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages