diff --git a/bin/mkmobilelist.py b/bin/mkmobilelist.py index 78c45c9..4ae1a2e 100755 --- a/bin/mkmobilelist.py +++ b/bin/mkmobilelist.py @@ -3,6 +3,7 @@ import sys import json import os.path +import types import _pathfix @@ -10,67 +11,65 @@ from mhapi.db import MHDB from mhapi.util import get_utf8_writer -def print_header_nav(current_page_id): - pages = [("page-skilltrees", "Skill Trees"), - ("page-items", "Items"), - ("page-gather", "Gather"), - ("page-carve", "Carve"), - ("page-hunterarts", "Hunter Arts"), - ("page-monsters", "Monsters")] +def print_header_nav(title, pid): print """ -
-
- -
-
-""".strip("\n") +
+ Home +

%s

+""".strip() % title + + alt_pid = None + if pid.endswith("-en"): + alt_pid = pid.replace("-en", "-jp") + alt_title = "jp" + if pid.endswith("-jp"): + alt_pid = pid.replace("-jp", "-en") + alt_title = "en" + if alt_pid is not None: + print """ + %s +""".strip() % (alt_pid, alt_title) -def mk_html_list(dict_list, keys, sort_keys, divider_fn=None): - if divider_fn is None: + print "
" + + +def mk_html_list(dict_list, keys, sort_keys, divider_fn="auto"): + if divider_fn == "auto": print ('