FreeCiv map to html

Can you help improve your favourite game? Hardcore C mages, talented artists, and players with any level of experience are welcome!
Post Reply
Gouda
Posts: 2
Joined: Tue Mar 17, 2015 10:54 pm

FreeCiv map to html

Post by Gouda »

Hello all. Here is a Mac OS X bash script file which will convert a .sav file map (base terrain and river overlay) to a self-contained html file using embedded tile graphics at 1/4 size.

View source at PasteBin: http://pastebin.com/kQLxzvSR
or Download zip file: http://s000.tinyupload.com/index.php?fi ... 4202750210

Run it in Terminal like so:

Code: Select all

~/Desktop/FreeCiv_map2html.sh /opt/com.bitaxis/share/freeciv/scenario/earth-72x36-v1-1.sav
Here is a picture of the html page:
Image
The Square Cow
Veteran
Posts: 53
Joined: Wed Nov 19, 2014 5:47 pm

Re: FreeCiv map to html

Post by The Square Cow »

Looks good, however I don't have a Mac, so I can't test it.
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: FreeCiv map to html

Post by louis94 »

The Square Cow wrote:Looks good, however I don't have a Mac, so I can't test it.
I think it would work on Linux too.
The Square Cow
Veteran
Posts: 53
Joined: Wed Nov 19, 2014 5:47 pm

Re: FreeCiv map to html

Post by The Square Cow »

I tried it on Debian with no modifications and it gave me an error:
"Couldn't get a file descriptor referring to the console"
louis94
Hardened
Posts: 270
Joined: Thu Apr 25, 2013 10:17 pm
Location: Belgium

Re: FreeCiv map to html

Post by louis94 »

The Square Cow wrote:I tried it on Debian with no modifications and it gave me an error:
"Couldn't get a file descriptor referring to the console"
It worked for me on Arch, just got an error at the very last line, but the HTML was created anyway.
Gouda
Posts: 2
Joined: Tue Mar 17, 2015 10:54 pm

Re: FreeCiv map to html

Post by Gouda »

Thank you for the feedback, much appreciated. The error on the "last line" is because the "open" command is Mac OS X specific. https://developer.apple.com/library/mac ... pen.1.html
Post Reply