I'm looking for a dos, command-line ANSI to gif or jpg converter. I've found many that convert GIF to ANSI but not the other way around. The reason? I'm wanting to create web pages with door game scores on the synchronet server. My plan would be to use a batch file that would convert the ansi score file to a gif or jpg file and then copy it to the web directory after the door game is exited out of and then use synchronet's web server to host the scores, with a link from the worldgroup web server to it.
Any help would be appreciated
ANSI to GIF/JPG Converter?
Moderator: Mod Squad
My main reason to want to do an ansi to jpg conversion on the fly was so that I wouldn't have to manually change the files over and over again manually. My original thoughts were that I could use the door game's batch file, after the door game was closed, to auto convert and copy the file over to a certain directory, one where the web server could access. That way, every time some one left the door, the newest score file would be on the web.
There actually is a program that may do that via command line (don't know, haven't tried it yet), but I've found two PHP scripts that do ansi to png conversions on demand. So, I just have to figure out how to run those PHP scripts on the door game server, and we'll be all set lol.
There actually is a program that may do that via command line (don't know, haven't tried it yet), but I've found two PHP scripts that do ansi to png conversions on demand. So, I just have to figure out how to run those PHP scripts on the door game server, and we'll be all set lol.
Thanks.. I just tested it out manually, and it converts the file really fast and seems to do a good job too.
It'll probably be a few days or more before I get to working on the door game server to see how well I can do some batch files.
I searched long and hard for a better way to do this, and what few synchronet boards I've seen online that had score boards, they always used php or some other type of web script. Maybe this will give other bbs sysops some ideas..
It'll probably be a few days or more before I get to working on the door game server to see how well I can do some batch files.
I searched long and hard for a better way to do this, and what few synchronet boards I've seen online that had score boards, they always used php or some other type of web script. Maybe this will give other bbs sysops some ideas..
After a little bit of work, I've found an easy way to make this work with synchronet, as long as each door has a configurable directory where the scores can be kept in.
Basically what I originally tried was to put the commands in to convert, copy over, move, and copy over the score files in the web directory. This worked but many of the doors I have setup don't even use batch files.
The easiest but longest way to get around this would be to create multiple batch files, one for each node (filename%#.bat. The harder thing would probably be to create a single batch file that passed on the node information based on a number after the batchfile name (filename %#)
Synchronet actually has a cleanup function that will run a batch file after the door closes, and this would probably be the most ideal situation if it wasn't for synchronet not passing all batch file commands to it.
My first attempts were something like:
cd\sbbs\xtrn\usurper\score
ansi2png -y uscores.ans
copy uscores.ans.png c:\sbbs\web\html /y
Although that would work on a batch file if I just run it in a command prompt, all but the last part would run as a cleanup function.
So, I replaced the copy with:
move /y uscores.ans.png c:\sbbs\web\html
still, it didn't work.
Finally what I did to get it to work correctly is to actually set the score file location from the door game in to the directory I wanted them to be in,
which I then decided to be the html\scores directory, and the uscores.ans file to usurper.ans, and I updated the batch file with this:
cd\sbbs\web\html\scores
ansi2png -y usurper.ans
And it worked... So, I tried to do both the user scores and the team scores:
cd\sbbs\web\html\scores
ansi2png -y usurper.ans
ansi2png -y usurptm.ans
and it worked too. I summoned the png files from a web browser, and eventually, the synchronet web server will have its port changed so that both the worldgroup and sbbs web servers will be accessible to every one.
if there are any bbs door games that don't allow you to change the score directories, I can still get by put making all the magic happen in the actual door summoning batch file... it might be a pain with some multi-node doors but it's possible.
Basically what I originally tried was to put the commands in to convert, copy over, move, and copy over the score files in the web directory. This worked but many of the doors I have setup don't even use batch files.
The easiest but longest way to get around this would be to create multiple batch files, one for each node (filename%#.bat. The harder thing would probably be to create a single batch file that passed on the node information based on a number after the batchfile name (filename %#)
Synchronet actually has a cleanup function that will run a batch file after the door closes, and this would probably be the most ideal situation if it wasn't for synchronet not passing all batch file commands to it.
My first attempts were something like:
cd\sbbs\xtrn\usurper\score
ansi2png -y uscores.ans
copy uscores.ans.png c:\sbbs\web\html /y
Although that would work on a batch file if I just run it in a command prompt, all but the last part would run as a cleanup function.
So, I replaced the copy with:
move /y uscores.ans.png c:\sbbs\web\html
still, it didn't work.
Finally what I did to get it to work correctly is to actually set the score file location from the door game in to the directory I wanted them to be in,
which I then decided to be the html\scores directory, and the uscores.ans file to usurper.ans, and I updated the batch file with this:
cd\sbbs\web\html\scores
ansi2png -y usurper.ans
And it worked... So, I tried to do both the user scores and the team scores:
cd\sbbs\web\html\scores
ansi2png -y usurper.ans
ansi2png -y usurptm.ans
and it worked too. I summoned the png files from a web browser, and eventually, the synchronet web server will have its port changed so that both the worldgroup and sbbs web servers will be accessible to every one.
if there are any bbs door games that don't allow you to change the score directories, I can still get by put making all the magic happen in the actual door summoning batch file... it might be a pain with some multi-node doors but it's possible.
