From d35d59410a2bfa20534aaf297379711fe8f0cd63 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 24 Apr 2016 19:02:40 -0700 Subject: Improving kanjidic format --- util/compile.py | 2 +- util/tmpl/kanji-list.html | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 util/tmpl/kanji-list.html diff --git a/util/compile.py b/util/compile.py index 1b69bd83..842dfa9a 100755 --- a/util/compile.py +++ b/util/compile.py @@ -161,7 +161,7 @@ def parse_kanji_dic(path): character = segments[0] kunyomi = ' '.join(filter(lambda x: list(filter(is_hiragana, x)), segments[1:])) onyomi = ' '.join(filter(lambda x: list(filter(is_katakana, x)), segments[1:])) - glossary = '; '.join(re.findall('\{([^\}]+)\}', line)) + glossary = re.findall('\{([^\}]+)\}', line) results[character] = (kunyomi or None, onyomi or None, glossary) return results diff --git a/util/tmpl/kanji-list.html b/util/tmpl/kanji-list.html new file mode 100644 index 00000000..b0e43634 --- /dev/null +++ b/util/tmpl/kanji-list.html @@ -0,0 +1,7 @@ +{{> header.html}} +{{#each defs}} +
+ {{> kanji.html}} +
+{{/each}} +{{> footer.html}} -- cgit v1.2.3