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.
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.
dojs.exe, ajsboot/directory (specificallyjsboot/fonts/pc8x16.fnt), andcurl.DXE, all reachable from whereverweather.jsruns (same convention as this project's sibling DOjS apps -- see the header comment inweather.js).LoadLibrary("curl")support. NoCACERT.PEMneeded -- this app fetches over plainhttp://, nothttps://(seeweather.jsfor why).
DOJS -r WEATHER.JS [location] [flags]
Location has no built-in default. It's resolved in this order:
- The command-line argument (
DOJS WEATHER.JS London) - A
location=line inWEATHER.INI, in the same directory - 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| 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.
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.
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.