Was wondering if there was a src or js script that will requst a raw ansi file over http and then do a console.printfile within an external program or to display a hotlink?
echicken wrote to Bill McGarrity on 04-02-18 22:11 <=-
Re: js script?
By: Bill McGarrity to All on Mon Apr 02 2018 20:55:37
Was wondering if there was a src or js script that will requst a raw ansi file over http and then do a console.printfile within an external program or to display a hotlink?
It's doable. I host an ANSI archive on my BBS, which is viewable
remotely via the ansiview external program. The files are fetched via HTTP.
There's no simple script just to fetch and display a .ans file that I'm aware of, but it would be easy to do. I can make it for you, but I
might need a few more details.
One gotcha is that if the file is hosted on a Synchronet webserver, the server might convert it to an HTML rendering of the graphic before
sending it to the client. (See ctrl/web_handler.ini, and whether asc_handler.js is set up to serve .ans files.) There are ways around that, starting with just giving the file something other than a .ans extension.
There's two ways I can do this. Fetch a raw ansi from the following:
http://games.bbslink.net/score.php?door=lord&type=ansi
or... do a hotlink to the following:
http://games.bbslink.net/score.php?door=lord&type=image
I'll await your reply to see what else you'll need.
There's two ways I can do this. Fetch a raw ansi from the following:
http://games.bbslink.net/score.php?door=lord&type=ansi
echicken wrote to Bill McGarrity on 04-03-18 11:49 <=-
Re: js script?
By: Bill McGarrity to echicken on Tue Apr 03 2018 06:18:00
There's two ways I can do this. Fetch a raw ansi from the following:
http://games.bbslink.net/score.php?door=lord&type=ansi
Give this a shot:
https://github.com/echicken/bbslink-things
The 'scores.js' module has two modes:
- clear the screen, display a particular score file, pause, then exit
- launch as a full-screen lightbar score browser
Execute it with an argument (eg. 'lord') to run it in the first mode,
or without arguments to run it in the other mode. Valid arguments can
be found in settings.ini. If new score files are added to the site at some point, they can be added to settings.ini.
Give this a shot:
https://github.com/echicken/bbslink-things
The 'scores.js' module has two modes:
As I previously stated, it works perfectl but just a thought. The line in the code: console.putmsg(bbs.text(563)); really isn't needed. It gives a double Hit a Key at the end of the file.
echicken wrote to Bill McGarrity on 04-03-18 15:30 <=-
Re: js script?
By: Bill McGarrity to echicken on Tue Apr 03 2018 15:06:34
As I previously stated, it works perfectl but just a thought. The line in the code: console.putmsg(bbs.text(563)); really isn't needed. It gives a double Hit a Key at the end of the file.
Okay, I've removed that.
Also I should point out that this thing caches the .ans files locally.
The 'cache_ttl' setting in 'settings.ini' controls how long a cached
file remains valid for, in seconds. The default value is 86400 (one
day). You can turn caching off by setting that to 0.
Now this is strange. Everytime I choose the Assassin score ansi, it loads it on the screen but it also sends it to the printer. This is the only one
that does it. Possible 'print' command snuck in there? For now I just removed it as it's not that popular of a game.
Now this is strange. Everytime I choose the Assassin score ansi, it loads it on the screen but it also sends it to the printer. This is the only one
echicken wrote to Bill McGarrity on 04-03-18 21:55 <=-
Re: js script?
By: Bill McGarrity to echicken on Tue Apr 03 2018 20:10:00
Now this is strange. Everytime I choose the Assassin score ansi, it loads it on the screen but it also sends it to the printer. This is the only one
To ... your actual ... printer? That's interesting.
that does it. Possible 'print' command snuck in there? For now I just removed it as it's not that popular of a game.
I guess there could be something strange in that particular file that's causing this. The script just downloads the file (or reads the cached copy from disk) and writes it to the terminal. It does use the JS console.putmsg() method, which interprets various special codes
(ctrl-A, at-symbol, pipe, etc.) - not sure if anything funky could be happening there.
Are you using SyncTERM when this happens? Something else?
echicken wrote to Bill McGarrity on 04-03-18 22:12 <=-
Re: js script?
By: Bill McGarrity to echicken on Tue Apr 03 2018 20:10:00
Now this is strange. Everytime I choose the Assassin score ansi, it loads it on the screen but it also sends it to the printer. This is the only one
The last (non-empty) line in that file is a bit odd and appears to
contain an esc[i sequence (among others), which seems to mean 'print screen' if your terminal supports it. Something funny going on with
that player's name perhaps - 'ASSasin' followed by some junk, with
'sin' mixed in; botched attempt at fixing a typo? I dunno. Maybe the BBSLink operator can correct it.
Are you using SyncTERM when this happens? Something else?
PC+
echicken wrote to Bill McGarrity on 04-04-18 10:52 <=-
Re: js script?
By: Bill McGarrity to echicken on Wed Apr 04 2018 00:20:00
Are you using SyncTERM when this happens? Something else?
PC+
I'm going to guess it interprets "print screen" very literally, then. Interesting quirk with this particular file, but it probably won't
affect many people.
Give this a shot:
https://github.com/echicken/bbslink-things
Sysop: | fluid |
---|---|
Location: | wickliffe, ohio |
Users: | 4 |
Nodes: | 10 (0 / 10) |
Uptime: | 140:36:56 |
Calls: | 50 |
Files: | 15,838 |
Messages: | 49,862 |