# HG changeset patch # User Oleksandr Gavenko # Date 1479541533 -7200 # Node ID a9e3b6050544fe5e02195c35f080ad1cff81218b # Parent 9ecc349062a1360048a3ff79920cb9b87e78ddab Add topic to dictd and Anki. diff -r 9ecc349062a1 -r a9e3b6050544 py/gadict_c5.py --- 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])) diff -r 9ecc349062a1 -r a9e3b6050544 py/gadict_srs_anki.py --- 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("") have_ref = False + if sense.topic_list and len(sense.topic_list) > 0: + have_ref = True + buf.append(u" ⌊") + buf.append(u", ".join(sense.topic_list)) + buf.append(u"⌉") if sense.ant_list and len(sense.ant_list) > 0: have_ref = True buf.append(" ant: ")