Add topic to dictd and Anki.
--- a/py/gadict_c5.py Fri Nov 18 23:53:31 2016 +0200
+++ b/py/gadict_c5.py Sat Nov 19 09:45:33 2016 +0200
@@ -135,6 +135,11 @@
FOUT.write(sense.pos)
FOUT.write("» ")
need_sep = False
+ if sense.topic_list and len(sense.topic_list) > 0:
+ FOUT.write("⌊")
+ FOUT.write(", ".join(["{"+s+"}" for s in sense.topic_list]))
+ FOUT.write("⌉")
+ need_sep = True
if sense.ant_list and len(sense.ant_list) > 0:
FOUT.write(" ant: ")
FOUT.write("; ".join(["{"+s+"}" for s in sense.ant_list]))
--- a/py/gadict_srs_anki.py Fri Nov 18 23:53:31 2016 +0200
+++ b/py/gadict_srs_anki.py Sat Nov 19 09:45:33 2016 +0200
@@ -380,6 +380,11 @@
buf.append(sense.pos)
buf.append("</span>")
have_ref = False
+ if sense.topic_list and len(sense.topic_list) > 0:
+ have_ref = True
+ buf.append(u" <span class='topic'>⌊")
+ buf.append(u", ".join(sense.topic_list))
+ buf.append(u"⌉</span>")
if sense.ant_list and len(sense.ant_list) > 0:
have_ref = True
buf.append(" <span class='ant'>ant: ")