diff --git a/bin/mktranslatesite.py b/bin/mktranslatesite.py
index 5d08783..fcd4f68 100755
--- a/bin/mktranslatesite.py
+++ b/bin/mktranslatesite.py
@@ -11,7 +11,7 @@ from mako.runtime import Context
import _pathfix
-from mhapi.db import MHDB
+#from mhapi.db import MHDB
from mhapi.util import get_utf8_writer
tlookup = TemplateLookup(directories=["templates/translate"],
@@ -86,7 +86,7 @@ def _main():
ctx = Context(f)
index_template.render_context(ctx)
- db = MHDB()
+ #db = MHDB(game="mhx")
#strees = db.get_skill_trees()
#items = db.get_items(item_types=("Tool", "Book", "Consumable", "Ammo"))
#gather_items = db.get_items(item_types=
@@ -94,7 +94,7 @@ def _main():
#carve_items = db.get_items(item_types=("Flesh",))
- stree_path = os.path.join(_pathfix.project_path, "db", "mhx",
+ stree_path = os.path.join(_pathfix.project_path, "db", "mhxx",
"skill_tree_list.json")
with open(stree_path) as f:
stree_list = json.load(f)
@@ -154,7 +154,7 @@ def _main():
# ha_list, ("name_jp", "name", "section", "description"),
# jplen_sort_fn, divider_fn=jplen_divider_fn)
- monster_path = os.path.join(_pathfix.project_path, "db", "mhx",
+ monster_path = os.path.join(_pathfix.project_path, "db", "mhxx",
"monster_list.json")
with open(monster_path) as f:
monster_list = json.load(f)
diff --git a/bin/parse-wikia-monsters.py b/bin/parse-wikia-monsters.py
index c20040d..7b42b7d 100755
--- a/bin/parse-wikia-monsters.py
+++ b/bin/parse-wikia-monsters.py
@@ -57,7 +57,7 @@ def parse_wikia_monsters(f):
section = m.group(1)
print >>sys.stderr, "section", section
continue
- if section != "Large Monsters":
+ if section not in ["Large Monsters", "Small Monsters"]:
continue
for m in MONSTER_LINK_RE.finditer(line):
monster = dict(href=m.group(1), name=m.group(2))
diff --git a/bin/parse-wikia-skills.py b/bin/parse-wikia-skills.py
index 972f044..02022f0 100755
--- a/bin/parse-wikia-skills.py
+++ b/bin/parse-wikia-skills.py
@@ -26,8 +26,10 @@ import requests
TREE_RE = re.compile('^
]*>(?:)?([^<]*)(?:)?([^<]*)')
# | Guard +1 ガード性能+1
+# | Cold Surge 寒さ倍加
+# | Charm Up  護石系統倍加
SKILL_RE = re.compile(
- '(?: | )?]*>([^<>]+)((?: ]* alt="New" [^>]*>)?)(?:<[^>]+>)* (.*)')
def parse_wikia_skill_trees(f):
@@ -35,6 +37,7 @@ def parse_wikia_skill_trees(f):
skills = []
seen = set()
in_tree = 0
+ is_new = False
while True:
line = f.readline()
if not line:
@@ -46,24 +49,40 @@ def parse_wikia_skill_trees(f):
continue
m = SKILL_RE.match(line)
if m:
- skill = dict(name=m.group(1), name_jp=m.group(2))
+ assert len(m.groups()) == 3
+ is_new = len(m.group(2)) > 0
+ stree = strees[-1]
+ skill = dict(name=m.group(1).strip(), new=is_new,
+ name_jp=m.group(3).strip(),
+ tree=stree["name"],
+ tree_jp=stree["name_jp"])
skills.append(skill)
+ if is_new:
+ stree["new"] = True
+ else:
+ stree["new"] = False
+ # next line should be number of points
+ next_line = f.readline()
+ points = next_line[next_line.rfind('>')+1:].strip()
+ skill["points"] = points
continue
m = TREE_RE.match(line)
if m:
- stree = dict(name=m.group(1), name_jp=m.group(2))
+ stree = dict(name=m.group(1).strip(), name_jp=m.group(2).strip())
if stree["name"] not in seen:
strees.append(stree)
seen.add(stree["name"])
# three blank lines divides skill tree rows
in_tree = 3
+ is_new = False
return strees, skills
def _main():
if len(sys.argv) != 4:
print "Usage: %s infile out_strees.json out_skills.json" % sys.argv[0]
+ sys.exit(1)
with open(sys.argv[1]) as f:
strees, skills = parse_wikia_skill_trees(f)
with open(sys.argv[2], "w") as f:
diff --git a/templates/translate/list.html b/templates/translate/list.html
index a478c12..120eb8c 100644
--- a/templates/translate/list.html
+++ b/templates/translate/list.html
@@ -44,6 +44,8 @@
% elif icon_prev:
${value}
<% icon_prev = False %>
+ % elif k == "name" and item.get("new", False):
+ ${value} [XX]
% else:
${value}
% endif
diff --git a/web/translate/monster-titles.html b/web/translate/monster-titles.html
index 812cd1f..f75d408 100644
--- a/web/translate/monster-titles.html
+++ b/web/translate/monster-titles.html
@@ -50,7 +50,7 @@
クリムゾン・ベアー
- Crimson Helmet Arzuros
+ Redhelm Arzuros
@@ -59,7 +59,7 @@
ダークネスロード
- Black Flame King Rathalos
+ Dreadking Rathalos
@@ -68,7 +68,25 @@
デッドリープリンセス
- Violet Poison Princess Rathian
+ Dreadqueen Rathian
+
+
+
+
+
+
+ ライトニングリヴォルト
+
+ Blue Thunder Lord Astalos
+
+
+
+
+
+
+ 世界最強峰
+
+ Silver Ridge Gammoth
@@ -100,6 +118,15 @@
+
+
+
+
垂皮竜
@@ -113,7 +140,7 @@
夜鳥
- Hororohoruru
+ Malfestio
@@ -131,7 +158,7 @@
大雪主
- Heavy Snow Lord Lagombi
+ Snowbaron Lagombi
@@ -145,6 +172,15 @@
+
+
+
+
奇猿狐
@@ -158,7 +194,7 @@
宝纏
- Treasure Clad Uragaan
+ Crystalbeard Uragaan
@@ -172,6 +208,15 @@
+
+
+
+
崩竜
@@ -185,7 +230,7 @@
嵐龍
- Amatsumagatsuchi
+ Amatsu
@@ -194,7 +239,7 @@
巨獣
- Gamuto
+ Gammoth
@@ -217,6 +262,15 @@
+
+
+
+
徹甲虫
@@ -257,7 +311,7 @@
悪相の千両役者
- Rock Piercing Tetsucabra
+ Drilltusk Tetsucabra
@@ -266,7 +320,25 @@
斬竜
- Dinovaldo
+ Glavenus
+
+
+
+
+
+
+ 斬鉄鎌
+
+ Armor Shredder Shogun Ceanataur
+
+
+
+
+
@@ -307,11 +379,20 @@
+
+
+
+
泡狐竜
- Tamamitsune
+ Mizutsune
@@ -381,18 +462,18 @@
- 煌黒龍
+ 無明に咲く天華
- Alatreon
+ Heavenly Eye Mizutsune
- 燼滅刃
+ 煌黒龍
- Incinerating Blade Dinovaldo
+ Alatreon
@@ -406,6 +487,15 @@
+
+
+ 狂炎の黒騎士
+
+ Hellblade Glavenus
+
+
+
+
狗竜
@@ -464,7 +554,7 @@
真なる覚醒
- Golden Thunder Prince Zinogre
+ Thunderlord Zinogre
@@ -473,7 +563,7 @@
砂竜
- Cephadrome
+ Cephalos
@@ -482,7 +572,7 @@
砂竜
- Cephalos
+ Cephadrome
@@ -496,6 +586,33 @@
+
+
+ 砕竜
+
+ Raging Brachydios
+
+
+
+
+
+
+ 祖龍
+
+ White Fatalis
+
+
+
+
+
+
+ 紅龍
+
+ Crimson Fatalis
+
+
+
+
絞蛇竜
@@ -514,6 +631,15 @@
+
+
+ 老山龍
+
+ Lao-Shan Lung
+
+
+
+
草食竜
@@ -527,7 +653,7 @@
荒鉤爪
- Ruinous Hook Claw Tigrex
+ Grimclaw Tigrex
@@ -536,7 +662,7 @@
蟹城壁
- Spearbreaker Daimyo Hermitaur
+ Stonefist Hermitaur
@@ -550,6 +676,15 @@
+
+
+
+
赤甲獣
@@ -563,7 +698,7 @@
跳狗竜
- Great Maccau
+ Great Maccao
@@ -649,11 +784,29 @@
+
+
+
+
+
+
+
+
隻眼
- One-Eyed Yian Garuga
+ Deadeye Yian Garuga
@@ -680,7 +833,7 @@
雲羊鹿
- Mufa
+ Moofah
@@ -698,7 +851,7 @@
電竜
- Raizekusu
+ Astalos
@@ -725,7 +878,7 @@
風斬る白影
- White Gale Nargacuga
+ Silverwind Nargacuga
@@ -743,7 +896,7 @@
首鳴竜
- Rimosetosu
+ Larinoth
@@ -752,7 +905,7 @@
骸龍
- Osutogaroa
+ Nakarkos
@@ -782,6 +935,24 @@
Gore Magala
+
+
+
+
+ 黒蝕竜
+
+ Chaotic Gore Magala
+
+
+
+
+
+
|