Skip to content
Snippets Groups Projects
Commit 1422011a authored by echicken's avatar echicken :chicken:
Browse files

Notes on config and format

parent d5d582e0
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ Contents
1) About
2) Installation
3) Customization
4) Notes
1) About
......@@ -13,6 +14,15 @@ Contents
the terminal. wttr.in is a console-oriented weather forecast service
created and hosted by Igor Chubin (https://github.com/chubin/wttr.in).
The output that you see on your BBS was generated entirely by wttr.in,
except that this script translates their xterm colours to ANSI-BBS. See
the 'Customization' section below for information on changing the format.
I can't (won't) change the look any further (different icons, etc.).
Geolocation is provided automatically by wttr.in. In a future update, we
might use our own geolocation provider, but I'd rather avoid it for
simplicity's sake.
2) Installation
In SCFG, go to 'External Programs', then 'Online Programs (Doors)', and
......@@ -33,21 +43,45 @@ Contents
3) Customization
The default query URL is https://wttr.in/?AFn for ANSI, no 'Follow' line,
and narrow output. You can override this by supplying an alternate URL on
the command line, such as:
See https://wttr.in/:help for details on query parameters.
By default, this script will query https://wttr.in/?AFn and will cache
non-error responses for 3600 seconds (one hour). If the user's IP address
is available, wttr.in will use it for geolocation. If the user's IP
address is not available, your BBS' external IP address will be used for
geolocation.
If you wish to override any of this behaviour, create this file:
ctrl/modopts.d/wttr.ini
Paste this into the file:
[wttr.in]
base_url = https://wttr.in/
units = m
view = AFn
cache_ttl = 3600
All of the above settings are optional and any may be omitted. Substitute
the default values shown above with your preferred settings (obviously).
You may also add either of these optional settings:
fallback_location = Mountain View
fallback_ip = 8.8.8.8
Command Line ?wttr.js https://wttr.in/?m0AFn
If fallback_location is set, it will be used instead of your BBS' external
IP address to find the default weather report.
See https://wttr.in/:help for possible query paths and parameters.
If fallback_ip is set, it will be used instead of your BBS' external IP
address. If present, this setting will override fallback_location.
Responses are cached in your OS temp directory and remain valid for 3600
seconds (one hour). You can override this default cache TTL by supplying
a numeric value (in seconds) on the command line, such as:
4) Notes
Command Line ?wttr.js 1800
Ensure that your ctrl/modopts.ini file includes this line:
You can combine the parameters in whichever order you prefer:
!include modopts.d/*.ini
Command Line ?wttr.js https://wttr.in/?m0AFn 1800
Command Line ?wttr.js 1800 https://wttr.in/?m0AFn
If this line does not exist, add it to the bottom of the file. This
ensures that everything in your ctrl/modopts.d directory is loadable.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment