udoprog / c10t

A minecraft cartography tool
Other
225 stars 50 forks source link

Bug - google-api.sh wipes index.html #147

Closed carbontwelve closed 12 years ago

carbontwelve commented 13 years ago

When I run the google-api.sh routine it creates all the map files correctly however rather than updating the index.html it wipes it.

udoprog commented 13 years ago

What behaviour would you expect?

carbontwelve commented 13 years ago

From looking at the previous versions source code with the current version I would expect it to open the index.html replace the "template" variables in there with the names of the applicable generated js scripts and then save it rather than just wiping index.html and leaving it as a empty file.

The previous version had the html template built into the generation code and it would output the generated html to index.html upon execution, it looks like the current version doesn't have that code in the script and instead loads the template from index.html to write it back out to index.html which is nonsensical.

I have quickly fixed the issue at current by replacing index.html with the original from source, editing the template variables manually to include the generated javascripts and then copied that to index.bkup.html once i run the map generation script i then cp index.bkup.html index.html and it "fixes" it.

When I get some spare time I will have a look at what is causing the script to leave a blank index.html unless someone beats me to it :)

I have to say, once you get this working it works really great.

On Wed, Mar 23, 2011 at 6:07 PM, udoprog < reply@reply.github.com>wrote:

What behaviour would you expect?

Reply to this email directly or view it on GitHub: https://github.com/udoprog/c10t/issues/147#comment_908859

udoprog commented 12 years ago

Nice!