#!/usr/bin/env python import sys import json import os.path import types import _pathfix from mhapi.db import MHDB from mhapi.util import get_utf8_writer def print_header_nav(title, pid): print """
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) print "
" def mk_html_list(dict_list, keys, sort_keys, divider_fn="auto"): if divider_fn == "auto": print ('