py/gadict_srs_anki.py
changeset 931 9a5f97027ee7
parent 877 340482715bb0
child 1008 dc218f2b784d
--- a/py/gadict_srs_anki.py	Sun Oct 08 19:20:44 2017 +0300
+++ b/py/gadict_srs_anki.py	Fri Oct 13 01:44:07 2017 +0300
@@ -143,6 +143,15 @@
 .pron {
   color: magenta;
 }
+.attrs {
+  color: blue;
+}
+.homo {
+  font-style: italic;
+}
+.homo i {
+  color: green;
+}
 .pos {
   color: green;
   font-style: italic;
@@ -169,9 +178,6 @@
 .hypo {
   color: #606080;
 }
-.attrs {
-  color: blue;
-}
 span.ex {
   font-style: italic;
   font-size: .85em;
@@ -511,6 +517,10 @@
                 singular = (hw.headword, hw.pron)
             if 'pl' in hw.attrs:
                 plural = (hw.headword, hw.pron)
+            if hw.homo is not None and len(hw.homo) > 0:
+                buf.append("<span class='homo'> <i>homo:</i>")
+                buf.append("; ".join(hw.homo))
+                buf.append("</span>")
             buf.append("</div>")
         direct_from = "".join(buf)
         buf = []