Skip to content

Commit

Permalink
terrain2wiki uses the image of the stable github branch instead of ma…
Browse files Browse the repository at this point in the history
…ster

So the wikipage won't break if images get removed in master
The next update of the wikipage will probably be for 1.14
  • Loading branch information
sevu committed Nov 25, 2016
1 parent 06d9909 commit bccdb54
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions data/tools/terrain2wiki.py
Expand Up @@ -4,6 +4,7 @@
"""
A script to create the "Terrain Table" on the TerrainCodeTableWML wiki page.
Add the output to the wiki whenever a new terrain is added to mainline.
The terrain_url below should point to the latest stable release.
"""

import os
Expand All @@ -12,7 +13,7 @@
import argparse

# Where to get terrain images
terrain_url = "https://raw.github.com/wesnoth/wesnoth/master/data/core/images/terrain/%s.png"
terrain_url = "https://raw.github.com/wesnoth/wesnoth/1.14/data/core/images/terrain/%s.png"


def parse_terrain(data):
Expand Down Expand Up @@ -92,7 +93,7 @@ def parse_terrain(data):
output_path = args.output_path

if not os.path.exists(path) or not path.endswith('.cfg'):
print("Invalid path: '%s' does not exist or not a .cfg file." % path)
print("Invalid path: '%s' does not exist or is not a .cfg file." % path)
sys.exit(1)

with open(path, "r", encoding="utf8") as input_file:
Expand Down

0 comments on commit bccdb54

Please sign in to comment.